How I Set Up Azure Storage for My First Public Website

Published: (May 2, 2026 at 05:19 AM EDT)
2 min read
Source: Dev.to

Source: Dev.to

Introduction

I needed a place to store images and files for a website project. Azure Blob Storage provides a cloud‑based file system that can be accessed via a URL.

Search for Storage Accounts in Azure Portal

  1. Open the Azure portal and search for Storage accounts.
  2. Click + Create.
  3. Create a new resource group (e.g., website-storage).
  4. Name the storage account (e.g., publicwebsite2024).
  5. Click Review + create, then Create.
  6. After deployment finishes, click Go to resource.

Set Up High Availability

  1. In the storage account, go to Data management → Redundancy.
  2. Select Read-access geo-redundant storage (RA‑GRS).
    • This creates a primary and a secondary location, ensuring availability if one region fails.
  3. Open Settings → Configuration.
  4. Turn on Allow Blob anonymous access and click Save.

Create Your Container

  1. Navigate to Data storage → Containers.
  2. Click + Container.
  3. Name the container public.
  4. Click Create.

Make Files Publicly Accessible

  1. Open the public container.
  2. Click Change access level.
  3. Select Blob (anonymous read access for blobs only) and confirm with OK.
  4. Upload a file: click Upload, choose an image or text file, then click Upload.
  5. After the upload, select the file and copy its URL from the Overview tab.
  6. Paste the URL into a new browser tab; the file should display.

Enable Soft Delete (Recycle‑Bin‑like Protection)

  1. Return to the storage account overview.
  2. Under Properties → Blob service, click Blob soft delete.
  3. Check Enable soft delete for blobs, set the retention period to 21 days, and click Save.

Testing Soft Delete

  1. In the container, select a file and click Delete.
  2. Click Show deleted blobs (top right).
  3. Select the deleted file, click the three‑dot menu, and choose Undelete.
    • The file is restored.

Enable Versioning

  1. In the storage account Properties, locate Blob service → Versioning.
  2. Check Enable versioning for blobs and click Save.
    • New uploads will retain previous versions automatically.

One Important Warning

If you encounter any issues, feel free to leave a comment for help. Please consider liking and sharing the guide.

0 views
Back to Blog

Related posts

Read more »