Deploying a static website on Azure Blob Storage is a cost-effective and scalable solution for website hosting. Azure Blob Storage offers secure and scalable object storage for unstructured data and includes the capability to host static websites directly from a storage account. This blog will walk you through the process of deploying a static website to Azure Storage, enabling you to have a publicly accessible website.
Prerequisites
- An active Azure account. However, if you do not have one, you sign up at Azure
Step 1: Log in Azure
- Go to the Azure Portal and sign in.
Step 2: Create a storage account
- In the middle side menu, Click on "storage account"
- Click on "Create"
2. Configure Storage account
- Basics Tab:
- Select your subscription.
- Choose or create a new resource group.
- Enter a unique storage account name.
- Select a region.
- Choose "Standard" for performance.
- Select "Geo-redundant storage (GRS)" for redundancy
- Click the "Next" button and configure the remaining sections as needed, or leave the default settings in place.
- Click "Review + Create".
Validation and Create
Verify that all configurations are correct.
Click "create"
Deployment complete
- After the creation of the storage account, click on "go to Resource"
Step 3: Navigate to Static website
In the left-hand menu, Click "Data management"
On the data management drop down, click "Static website"
Enable static website
- Click "Enabled"
- Enter 'index.html' as the index document name.
- Enter '404.html'on the error document path
- Click "Save"
Note Down the Endpoints:
After saving, you will see primary and secondary endpoint URLs. Copy the primary endpoint URL.
Step 4:Upload website files
1.** Navigate to containers:**
- In the left-hand menu, On "Data storage" drop down, Click on "Containers".
- Click on the '$web' container.
2. Upload Files from your laptop
- Click on "upload"
- Navigate to where 'my website' folder is saved on your PC
- Drag and drop the website files into the upload box.
- Click "Upload" to transfer your files to the $web container.
Step 5: Testing your Website
- Access your website
- Open a web browser
- Enter the primary endpoint URL copied earlier and paste on your browser.
- Your static website should now be live and accessible anywhere
Conclusion
Hosting a static website on Azure Blob Storage is a straightforward and efficient process. By following these steps, you can quickly deploy and share your static website. Azure’s scalability and robust security features ensure that your site performs optimally and remains secure.
Happy Hosting!!!
Top comments (2)
Adah Okwara's guide on hosting a static website on Azure Blob Storage is an excellent resource for anyone looking to leverage Azure's powerful features for web hosting. The step-by-step instructions are clear and comprehensive, making it accessible even for those with limited technical experience. The use of visuals enhances understanding, and the emphasis on Azure's scalability and security highlights the benefits of this hosting method. Overall, it's a well-structured and informative tutorial that can help users efficiently deploy their static websites.
Beautiful piece. I've come to understand it better. Thank you Adah