How to Host Static Website on Azure Blob Storage
Leveraging Azure Blob Storage for Seamless Static Website Hosting
- Sign in to the Azure portal
Search for storage account in the search bar
Choose storage accounts
- Click on create
Fill the basic tab
Create new resource group by clicking create new or choose an existing one
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.
Choose a region
Choose primary service
Choose performance
Choose redundancy
Click on review + create button
- Click on create
- Once deployment is complete, click on go to resource
- On the left pane of the resource page, select static website under data management
Click on enable to enable static website
Fill the index document name as index.html
Fill the error document path as 404.html
Click on save
Note that index.html and 404.html are usually constant.
A primary endpoint link will be created
Go to resource
On the left pane, click on containers under data storage
Click on the $web container which is created automatically.
- Click on upload
- 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.
- Click on upload
You can scroll down to see all uploaded files.
Go to resource, under data management select static website.
Copy the primary endpoint link and paste it on a browser.