Hosting Static Website With Azure Storage Service

At Build 2018, Microsoft announced a capability to host the static website with their Azure Storage Service. The feature is in preview and Microsoft is collecting the feedbacks so If you try it and have any suggestions feel free to go to user's voice and pass on the feedback to Microsoft. Also, we won’t suggest you run your production load until it becomes GA.

Do you have own a static website? Are you looking for a solution for hosting a static website which is cheap and fast? If the answer is yes to the above two questions then the following article is going to be pretty helpful to you.

At Build 2018, Microsoft announced a capability to host the static website with their Azure Storage Service. The feature is in preview and Microsoft is collecting the feedbacks so if you try it and have any suggestions feel free to go to user voice and pass on the feedback to Microsoft. Also, we won’t suggest you run your production load until it becomes GA.

Steps to host your static site on Azure.

  • Create a storage account by passing on the required information but make sure that you’re selecting storagev2 as the account type, as this feature of hosting the static sites is only available on V2 of the storage kind.

    Hosting Static Website With Azure Storage Service
  • Go to the Settings and select the static website option and click on Enable,

    Hosting Static Website With Azure Storage Service
  • A URL will be generated for you to reach out to your site, also add the entry point of the application or the default landing page name. For our example, it was index.html, and click on save button. You can also add this in step 2 as well.

    Hosting Static Website With Azure Storage Service

  • Now, you need to upload the content of your static site to the $web container. There are multiple ways to upload the container. We are going to use Azure storage explorer tool from Microsoft to achieve this. And you can follow this tutorial to connect the storage account to Storage Explorer.

  • Add the storage account and then open the web container.

    Hosting Static Website With Azure Storage Service

  • Select the folder you need to upload and then select block type as block blob and click on Upload button to start uploading.

    Hosting Static Website With Azure Storage Service

  • Wait until all the files are uploading. You will receive a notification in the activities window of the storage explorer once it is uploaded.

    Hosting Static Website With Azure Storage Service

  • Once the upload is completed, go to the URL you got in step 2 and hit the URL with a web browser. Your site will be reachable now and you can share the link with people.

Pricing

1x Storage General Purpose V2 Block Blob Storage account with LRS redundancy and hot access tier. We need less than a few MBs to host the site but a minimum available option is to have 1 GB and 100 Write Operations, 100 List operations, 15,500,000 read operations and 0,98 TB data retrieval = 5.64 €/month

Limitations

  • SSL bindings are not directly supported but can be achieved by putting a CDN.
  • Deployment Via ARM template is not yet supported.