• If you have hosted a static website like your blog or some simple informative website, you must know that it can be a hassle and expensive.
  • With the help of Microsoft Azure, you can now host a static website in Azure Storage which not at all expensive and very fast.
  • Let us go ahead and see a demo of it.

For that, first of all we need to create a storage account. Go to Azure Portal and find Storage Account to create it.

Create a new storage account with your details. Make sure for the account kind, you choose storageV2.

Once the resource gets created, go to it. There you will find an option for static website. Click that.

By default, it will be disabled.

Enable it and you will see that we need two things here. First is the index document name and the second is error document path.

In the index document name, write index.html and in the error document path, write 404.html. Click save.

You will find two endpoint URLs. Copy the primary endpoint URL and save it in a notepad file. We will need that later.

Go to the containers section and you will see that there is blob container called $web. This is the container where we will be uploading our files.

Create an index.html file on your computer and save it.

Inside the container, click Upload.

Upload the index.html that you created.

Once it gets uploaded, go to the URL that you had copied. And you will see your static website hosted on Azure.

  • You can alternatively upload any file i.e. a php file etc.
  • Also, since this runs on Azure storage, this costs almost nothing.
  • And it is amazingly fast!