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
- Open the Azure Portal.
- In the search bar, type and select “Storage accounts”.
- Click + Create.
- For Resource group, click Create new, enter a name like
storage-rg
, and click OK. - Name the storage account
publicwebsitemyezekiel
(add random characters to make it globally unique). - Keep other settings as default.
- Click Review + Create, then Create.
🌐 Step 2: Enable Read-Access Geo-Redundant Storage (RA-GRS)
After deployment, go to the newly created storage account.
- In the Data management section, click Redundancy.
- Select Read-access geo-redundant storage (RA-GRS).
- Review the Primary and Secondary region info.
🔓 Step 3: Allow Anonymous Access
To make your content accessible to everyone:
- In the Settings section, select Configuration.
- Set Allow blob anonymous access to Enabled.
- Click Save.
📁 Step 4: Create a Container for Website Files
- Go to Containers under Data storage.
- Click + Container.
- Name it
public
. - Click Create.
- Select the new
public
container. - On the Overview tab, click Change access level.
- Set it to Blob (anonymous read access for blobs only), then OK.
⬆️ Step 5: Upload and Test a File
- Inside the
public
container, click Upload. - Select any small file (like an image or text file) from your computer.
- Click Upload, then Refresh to see your file.
- Click on the file → Overview tab → copy the URL.
- Paste the URL in a browser tab.
✅ Image files will display; others (e.g. .txt
, .pdf
) will download.
♻️ Step 6: Enable Soft Delete (21 Days)
This helps recover deleted files.
- Go to the storage account’s Overview tab.
- Under Blob service, click Soft delete.
- Enable the setting.
- Set Keep deleted blobs for to 21 days.
- Click Save.
🧪 Step 7: Test Soft Delete and Restore
- Return to your container, select the file, and click Delete → Confirm.
- On the container page, toggle Show deleted blobs.
- Find your deleted file → Click ... → Undelete.
- Refresh the page to confirm it's restored.
🔄 Step 8: Enable Blob Versioning
To keep a history of changes to files:
- Go back to the storage account Overview tab.
- Under Blob service, click Versioning.
- Enable Versioning for blobs.
- Click Save.
⏪ Step 9: Test Blob Versioning
- Upload a new version of the same file (same name) to overwrite it.
- Toggle Show deleted blobs — you’ll see the previous version listed.
✅ 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)
Good!