Provide storage for the public website

Published: (February 13, 2026 at 03:04 AM EST)
3 min read
Source: Dev.to

Source: Dev.to

Objective

Design and implement a secure, scalable, and reliable storage solution for public website assets, ensuring high availability and optimal performance for users worldwide.

Create a storage account

  1. In the Azure portal, search for Storage accounts and select + Create.
  2. For Resource group, choose Create new, give it a name (e.g., publicwebsiterg), and click OK.
  3. Fill in the required fields for the storage account name, then click Review + create and Create.
  4. Wait for deployment to complete, then select Go to resource.

Configure redundancy

  1. In the storage account, go to Data managementRedundancy.
  2. Ensure Read-access Geo-redundant storage (RA‑GRS) is selected.
  3. Review the primary and secondary location information.

Enable anonymous blob access

  1. In SettingsConfiguration, set Allow blob anonymous access to Enabled and click Save.

Create a public container

  1. In Data storageContainers, click + Container.
  2. Name the container public.
  3. Click Create.
  4. Select the newly created container, then on the Overview blade choose Change access level.
  5. Set Public access level to Blob (anonymous read access for blobs only) and click OK.

Upload and test files

  1. Open the public container and click Upload.
  2. Browse to a file (e.g., a small image or text file) and click Upload.
  3. Refresh the page to confirm the file appears.
  4. Select the uploaded file, copy its URL from the Overview tab, and paste it into a new browser tab.
    • If the file is an image, it should display in the browser.

Configure soft delete

  1. In the storage account Overview, go to PropertiesBlob service.
  2. Select Blob soft delete.
  3. Check Enable soft delete for blobs.
  4. Set Keep deleted blobs for (days) to 21.
  5. (Optional) Enable soft delete for containers.
  6. Click Save.

Restore a deleted blob

  1. In the container, select a file and click Delete, then confirm.
  2. On the container Overview page, toggle Show deleted blobs (right of the search box).
  3. Locate the deleted file, click the ellipsis () on the far right, and choose Undelete.
  4. Refresh the container to verify the file has been restored.

Configure blob versioning

  1. In the storage account Overview, go to PropertiesBlob service.
  2. Select Versioning.
  3. Check Enable versioning for blobs.
  4. Choose whether to keep all versions or delete older versions after a certain period.
  5. Click Save.

Test versioning

  1. Upload a new version of an existing file in the public container (this overwrites the current blob).
  2. Use Show deleted blobs (or version view) to see previous versions and experiment with restoring them.
0 views
Back to Blog

Related posts

Read more »