You may be wondering if the juice worth the squeeze when hosting a website on Microsoft Azure. Better yet, can website hosting even be done on Azure? Yes, it can be can be done – in fact, the sky is the limit when thinking in terms of Azure and AWS capabilities. At the end of day, you are simply renting computing space in the cloud.

In reality, there are many options for website hosting, but choosing to host your website cloud hosting with Microsoft Azure is highly dependent on your ultimate goal. (For the record, Microsoft Azure is definitely out of the question if you want to host a free website, but the costs can still be minimal.)

You may want to host your website with Microsoft Azure if you have just a few static images for a site and don’t plan on changing the page. Unlike a dynamic (CMS) site, static websites on Azure aren’t really designed to be meddled with; they’re just there like a street sign and nothing more.

Azure pricing is as follows:

  • Static website on Azure
    • $1- $2/month – Static site with some savings, but a much more complicated setup than any other hosted CMS or website builder platform. If you’re looking for a user-friendly, scalable solution, Azure is not it.
  • Dynamic (CMS) website
    • $9 to $50/month – Definitely go somewhere else for hosting dynamic CMS related sites.
  • For comparison: static website on Namecheap
    • $4/month – for hosting simple static websites, NameCheap is more pricey but way less complicated.

Are you not sure what a static website is?

Static website pages are more difficult to hack because there are less points to attack them from.  Static pages don’t access a database or use external extensions and plugins all of which can be common entry points for attacks. In comparison, dynamic sites are not inherently unsafe, but potential attackers theoretically pose less risk with a static website.

NetworkAntics has a dynamic website. Dynamic websites have to be run on a website site builder or CMS site that suits their needs. The way the information is arranged and connected to your site’s design controls how and when its content is revealed on a page. You may have heard about WordPress hosting, Joomla, Drupal and others; those are all CMS solutions.

Now that you are aware of some of the pros and cons of Azure Static hosting, we can continue with details on how to host on Microsoft Azure – we’ve found it to be one of the best contenders when it comes to accessibility and affordability for cloud storage. Azure’s services are free or close to free, and you have two options to choose from:

  1. Host a static website on Azure Storage 
  1. Use Azure Static Web Apps service – Free tier 

Continue reading below for full instructions on how to get your website hosted with Azure.

How to Host Your Static Website on Azure Storage

1. Enabling your static website

Your first option is to host a static website on Azure Storage. Azure Storage accounts, among other services, offer the Blob storage service which allows users to store all sorts of unstructured data such as images, videos, documents or binary files. These ‘blobs’ of data are organized into containers, which are stored in your Azure account. 

Azure Blob Storage has a built-in feature named Static website. When enabled, it will automatically create an Azure Blob storage container named $web – this is where you can put the data that you want to be served by the Azure Storage Static Website service. Follow the steps below to set up your website storage. 

  1. Open the Azure portal in your web browser. 
  1. Create a new Storage account or open your preexisting account (Cool note: Your Blob Storage will still be tightly locked with private-only access. Content of your static website service will be stored on a different URL than your Azure storage). 
  1. Navigate to your target Storage account. On its menu, under Data management, select the Static website option. 
  1. Select Enabled to enable static website hosting for the storage account. You now have a static website ready for content uploading. 
Computer screenshot of Azure - enabling static website


2. Creating a Default Error Page

As a service provider, you know that it’s important to be transparent with your clients. This is why having a 404 error page is important, so that visitors know that their request cannot be fulfilled (imagine if you went to a restaurant to order food and the waiter just stared at you blankly instead of telling you that menu item wasn’t available). 

  1. In the Index document name field, specify a default index page of index.html. The default index page is displayed when a user navigates to the main page of your static website. 
  1. In the Error document path field, specify a default error page of 404.html. The default error page is displayed when a user attempts to navigate to a page that does not exist in your static website. 
  1. Click Save. The special $web Azure storage container will be created automatically together with the Primary endpoint – the link on which your website will be served.  

Note: Both index.html and 404.html documents must be in the root (the folder where your website data is stored) of the special “$web” container as pictured in the first screenshot in section 3. 

Computer screenshot of static website - default error page

3. Uploading Your Website Content

Now that you’ve begun to host your static website cloud hosting with Microsoft Azure, let’s upload your static website content to the $web container. For simplicity’s sake, we have kept all of the website files in the same folder. If needed, you can also create separate folders for  JavaScript, Images, Styling, etc.  

  1. Switch to the Data storage -> Containers -> select the $web container.  
  1. Click on the Upload button and upload your website content.
Computer screenshot of Azure - importing website contents

Note: If you navigate to the Primary endpoint link you will see your website served with a complementary SSL protection (this helps keep your website and your customers’ information secure).

  1. Switch to the Data storage -> Containers -> select the $web container
  2. Click on the Change access level button to confirm that Public access level is set to private for the Storage container (we want you to see this so that you can have a nice fuzzy feeling knowing that your data is secure).
Computer screenshot of Azure - changing access levels


Congratulations! You now have your data securely uploaded for your website for you and your customers to enjoy.

Website Cloud Hosting with Microsoft Azure Summary

While there are both advantages and disadvantages if you decide to host your website on Microsoft Azure, it’s still a viable option for tech savvy individuals who are looking for an affordable web hosting provider. Because Azure is mainly a cloud storage service, it’s possible to keep the costs to a minimum with a simple website that only requires a few images. We hope these instructions on how to host your website on Microsoft Azure have been helpful!

To personalize and secure your website, be sure to check out Network Antics’ next article, where you’ll find instructions on:

  1. How to give your website a custom domain name
  2. Keeping your website secure by enabling HTTPS

Leave A Comment