Keep in Touch!

Contents

C# 9 and .NET 5

Azure Storage Account: Hosting SSL Custom domain static sites

Azure Storage Account: Hosting SSL Custom domain static sites

With Storage Account it’s possible to host a static website on Cloud Azure. You only need steps:

Azure Storage Account

First step is creating a Storage Account - GPv2 on Azure. This is very easy and quick, and once finished you only have to provide the https functionality/security, so the website’s custom domain will be pointed to the CDN endpoint.

Static website

In left column choose Static website .

Enabling static websites on the blob service allows you to host static content. Webpages may include static content and client-side scripts. Server-side scripting is not supported.

Static website

  • Disabled
  • Enabled

An Azure Storage container has been created to host your static website. $web

Choose Enabled, and before saving insert the configuration for the Index and Error pages.

  • Index document name (ex. index.html)
  • Error document path (ex. 404.html)

It’s better if you save the endpoint (ex https:// -containername- .z6.web.core.windows.net/), you’ll use it later.

Upload Files

Next step: in section Overview choose Container and then $web . Choose Change access level and switch to Blob or Container. Than confirm with OK.

Now you only have to upload the files of your static web in $web container.

Now you can use the endpoint of last step.

Advantages / Disadvantages

Why you should use this way to create a static website? It’s easy: The platform Microsoft Cloud Azure , which means reliability and sicurity.

AdvantagesDisadvantages
Simple enablementAzure enablement requires a real credit card -not prepaid-
Cheaper costNot personalised domain -note 1-
SSL certificate
Geolocalization
Zone redundancy -note 2-

Note 1: Domain is costomizable, but as you need more configurtions, costs may change.

Note 2: From Microsoft documentation ( Azure Storage redundancy )

Redundancy in the primary region Data in an Azure Storage account is always replicated three times in the primary region. Azure Storage offers two options for how your data is replicated in the primary region:

  • Locally redundant storage (LRS) copies your data synchronously three times within a single physical location in the primary region. LRS is the least expensive replication option, but is not recommended for applications requiring high availability.
  • Zone-redundant storage (ZRS) copies your data synchronously across three Azure availability zones in the primary region. For applications requiring high availability, Microsoft recommends using ZRS in the primary region, and also replicating to a secondary region.