In this blog we will learn how setup an Azure Storage Account for static website usage and what the limitations of Azure storage accounts for static websites are.

This is a multi part article with the following parts:

In this part we will take a look at the required Microsoft Azure services for static website hosting and setup the storage account as main part of our website backend.

Azure Services

For the setup, we will be using Azure CLI in Azure Cloud shell. That is the easiest way and it enables us to work completely from our browser. We already created a resourcegroup called staticwebsitedemo, where all resources needed for our website are located.

We will use the following Azure services:

Azure Service Description Comments
Storage Account We will use the “static website” feature of Azure storage accounts to host our website. Custom SSL certificate/domain not supported
CDN Verizon We will use the verizon CDN for caching, redirecting and (free!) SSL certificates. We use the “Premium Verizon” tier to have the rules engine available
DNS Zone We will use the DNS zone to host all necessary DNS records of the site. We need to use a workaround for CNAME apex records for CDN validation
Function App Used for redirection from root domain to subdomain www. Workaround, as root domains can currently not be added to a CDN endpoint

Storage Account

At first, we will setup the storage account name staticsitedemo for our test blog:

Next we need to enable the static website feature on the created storage account:

We have now created the complete hosting backend for our static website. We could already start using it by uploading files into the $web container and visiting the above shown url
But as already described in the overview table, there are several limitation that we need to tackle:

  • Storage Accounts support HTTPS but not for custom domains. A custom domain could be added to the storage account, but HTTPS will not work with it.
  • Storage Accounts don’t support HTTP to HTTPS forwarding
  • Storage Account don’t support caching
  • Storage accounts don’t support PFS

We will implement all listed features in the following parts using only Azure services.

See the next part to learn about how to migrate your DNS zone to Azure and how to configure it for custom domain usage with your static site.