Host your Static website on Azure Blob Storage

 

Do you have owns 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 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 to 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.

 

 

  • Go to the Settings and select the static website option and click on Enable.

  • 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.

  • 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 and click on the upload folder option.

  • Select the folder needed to be uploaded and then select block type as block blob and click on Upload button to start uploading.
  • Wait till all the files are uploading. You will receive a notification in the activities window of the storage explorer once its uploaded.

  • Once the upload is completed, go to the URL you got in step 2 and hit on 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 around less than few MBs to host the site but 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 is not directly supported but can be achieved via putting a CDN.
  • Deployment Via ARM template is not yet supported.

Comments

comments

Leave a Reply

Your email address will not be published. Required fields are marked *