DEV Community

Ezekiel Umesi
Ezekiel Umesi

Posted on

How to Set Up a High-Availability Azure Storage Account for a Public Website

If you’re hosting static content like images, website files, or documents, Azure Storage is a reliable, cost-effective solution. In this guide, I’ll show you how to:

  • Create a high-availability Azure storage account
  • Enable public blob access for website users
  • Configure soft delete and versioning to protect your files

Let’s get started.


🛠 Step 1: Create the Storage Account

  1. Open the Azure Portal.
  2. In the search bar, type and select “Storage accounts”.
  3. Click + Create.
  4. For Resource group, click Create new, enter a name like storage-rg, and click OK.
  5. Name the storage account publicwebsitemyezekiel (add random characters to make it globally unique).
  6. Keep other settings as default.
  7. Click Review + Create, then Create.

Image description

Image description


🌐 Step 2: Enable Read-Access Geo-Redundant Storage (RA-GRS)

After deployment, go to the newly created storage account.

  1. In the Data management section, click Redundancy.
  2. Select Read-access geo-redundant storage (RA-GRS).
  3. Review the Primary and Secondary region info.

Image description


🔓 Step 3: Allow Anonymous Access

To make your content accessible to everyone:

  1. In the Settings section, select Configuration.
  2. Set Allow blob anonymous access to Enabled.
  3. Click Save.

Image description


📁 Step 4: Create a Container for Website Files

  1. Go to Containers under Data storage.
  2. Click + Container.
  3. Name it public.
  4. Click Create.
  5. Select the new public container.
  6. On the Overview tab, click Change access level.
  7. Set it to Blob (anonymous read access for blobs only), then OK.

Image description


⬆️ Step 5: Upload and Test a File

  1. Inside the public container, click Upload.
  2. Select any small file (like an image or text file) from your computer.
  3. Click Upload, then Refresh to see your file.
  4. Click on the file → Overview tab → copy the URL.
  5. Paste the URL in a browser tab.

✅ Image files will display; others (e.g. .txt, .pdf) will download.

Image description

Image description

Image description


♻️ Step 6: Enable Soft Delete (21 Days)

This helps recover deleted files.

  1. Go to the storage account’s Overview tab.
  2. Under Blob service, click Soft delete.
  3. Enable the setting.
  4. Set Keep deleted blobs for to 21 days.
  5. Click Save.

Image description


🧪 Step 7: Test Soft Delete and Restore

  1. Return to your container, select the file, and click Delete → Confirm.
  2. On the container page, toggle Show deleted blobs.
  3. Find your deleted file → Click ...Undelete.
  4. Refresh the page to confirm it's restored.

Image description

Image description

🔄 Step 8: Enable Blob Versioning

To keep a history of changes to files:

  1. Go back to the storage account Overview tab.
  2. Under Blob service, click Versioning.
  3. Enable Versioning for blobs.
  4. Click Save.

Image description


⏪ Step 9: Test Blob Versioning

  1. Upload a new version of the same file (same name) to overwrite it.
  2. Toggle Show deleted blobs — you’ll see the previous version listed.

Image description


✅ Final Thoughts

By following this guide, you’ve successfully:

  • Set up a highly available storage account with RA-GRS
  • Enabled anonymous blob access for public use
  • Configured soft delete to prevent data loss
  • Turned on versioning to track file history

This setup is perfect for hosting static website content, images, downloads, and more — with built-in protection and global availability.

Top comments (1)

Collapse
 
realcloudprojects profile image
Skill.Sch

Good!