Update: I made a follow up to this post here.

At work, I have a Visual Studio/MSDN subscription which I noticed entitles me to a 50 USD monthly Azure credit. Since I’m on parental leave and have a little bit of extra time, I figured I would do something I always wanted but never had time for; to set up a family website and a blog for myself. I further figured I would give Azure a try as a hosting platform and make use of my free credits. This post describes what I did and what challenges I’ve run in to so far.

I had already decided my website/blog should be a static website; that is, static HTML with no custom server generated content. I further decided on using Jekyll to accomplish this for my blog and picked out a theme I liked on one of the many theme marketplaces. Some initial research made me optimistic that this would be a good fit for Azure, given their support for static website hosting via Azure Storage.

Step 1: Setting up a static blog with Jekyll

Using Jekyll to create a static blog/website is quite straightforward. Since I’m on Windows 10, I followed the steps outlined here using Ruby to get it installed. I then unpacked my theme and was able to compile it straight out of the box. However, some of the links in the website were logical and needed the Jekyll server to be resolved. To mitigate this I had to change a setting in the YAML configuraion file (simply removing the permalink configuration line was sufficient in my case). I made some further customizations to the theme (titles, images, etc) and quickly had my blog ready to be hosted. So far, so good.

Step 2: Setting up a static website on Azure Storage

I now went on to Azure and created an Azure Blob Storage Container to host my website. It was fairly straightforward to create the container and enable static website hosting on it. To upload my files I used the Microsoft Azure Storage Explorer desktop app. Further, I made sure to require HTTPS for traffic to my site.

Step 3: Using a custom domain

I have my own domain which I wanted to use for the site, aamodt.family. Sure enough, there is support for using a custom domain straight onto the Azure Storage Container, but it doesn’t support HTTPS which pretty much means it’s a useless feature for a website in 2019. I was made to jump through several hoops and waste time before this became apparent. The official suggestion for custom domain HTTPS is to use Azure CDN to create an endpoint for your storage container, and to use the custom domain for this endpoint.

Setting up the endpoint is again straightforward, you need to create a CDN profile and then an endpoint within that profile. But using the custom domain is again where it gets wonky.

Problem #1: Using the root domain

The documentation says you need to set up a DNS CNAME record from your domain to the address of the endpoint. However, CNAME is only for subdomains and can’t be used for the root domain. Microsoft says there is a workaround, but the workaround doesn’t support HTTPS*, so it’s not actually an acceptable workaround at all, just a way to waste more time and energy on another dead end.

Problem #2: Not using the root domain

Having bitterly concluded that I wouldn’t be able to use the root of my domain aamodt.family as the URL of my website, I figured I would settle for using the.aamodt.family for the time being. This I was able to do by configuring my CDN endpoint, creating the required DNS CNAME record (Alias record type referencing the endpoint) and enable HTTPS with a CDN managed cert.

I figured I would at least be able to use some type of URL forwarding through DNS (using Azure DNS) so that aamodt.family would point to the.aamodt.family. But even this turns out to be impossible, as there is no DNS record type for this type of action in Azure DNS. Maybe I will consider switching to an external DNS provider, but I was hoping to collect all the administration and configuration of the site in Azure.

Final remarks

So in the end, the website is up, but I’m not quite happy with how convoluted enabling HTTPS turned out to be (this should be a very basic feature in this day and age), and that using a root domain is seemingly impossible. A bit dissapointed in Azure thus far, not quite living up to my expectation of a modern cloud provider. My use case seems very basic and could have been much more streamlined and less convoluted from start to finish.