How to Host Static Website on Azure Blob Storage

How to Host Static Website on Azure Blob Storage

Leveraging Azure Blob Storage for Seamless Static Website Hosting

  1. Sign in to the Azure portal

  1. Search for storage account in the search bar

  2. Choose storage accounts

  1. Click on create

  1. Fill the basic tab

    1. Create new resource group by clicking create new or choose an existing one

    2. Storage account name must be unique globally. This simply means no two Azure active accounts can use the same name. Numbers can be added for uniqueness.

    3. Choose a region

    4. Choose primary service

    5. Choose performance

    6. Choose redundancy

  2. Click on review + create button

  1. Click on create

  1. Once deployment is complete, click on go to resource

  1. On the left pane of the resource page, select static website under data management

  1. Click on enable to enable static website

    1. Fill the index document name as index.html

    2. Fill the error document path as 404.html

    3. Click on save

Note that index.html and 404.html are usually constant.

A primary endpoint link will be created

  1. Go to resource

  2. On the left pane, click on containers under data storage

  3. Click on the $web container which is created automatically.

  1. Click on upload

  1. Locate the web files stored in your computer

You can either drag and drop all the files or use the browse for files option

Please note all the files as highlighted above must be chosen.

  1. Click on upload

You can scroll down to see all uploaded files.

  1. Go to resource, under data management select static website.

  2. Copy the primary endpoint link and paste it on a browser.