In the part 1 of the series, I introduced an option to Host a static website in Azure blobs. In part 2. I discussed how to set the content type of the Azure blob contents so that it is rendered properly across all browsers. Now, In this post, I am going to address following considerations:

1. Mapping our unfriendly azure storage domain name to a friendly domain name like

2. Logging Blob Request in other words logging the site visitors.

3. handling Directory structure of the website (applicable for huge static websites – no kidding – such sites do exist)

Ok, let’s get started. The first concern is to name a domain like to a custom domain name like ; The good news is that is it is easily doable using the Azure management portal. Here is the snapshot of the Azure management portal feature that let’s you do it.

So now you once i have mapped “” with “”, the URL of the site becomes “”  – Here, demo-solidq-site is the name of the public container and default.htm is the Home page. Remember that Azure blobs does not support default document so if you just specify the URL – without adding default.htm at the end you will get an error.

But the above URL “” is not user friendly. Though it’s a little shorter than the original one.

So if you wish to just want the end user specify – then I think you should consider URL forwarding. you could setup the URL forwarding for to Now, I am no SEO expert but based on my little research, I understand that a 301 redirect from “” to “” is the way to go. No 302 redirects and No masked forwarding. A simple 301 redirect that is search engine friendly. The benefit of this mechanism being we can just flaunt and let the domain redirecting mechanism do the rest.

Now, the next consideration is to log the visitors for your static website hosted in Azure blobs. As of now there is no such facility available with Azure storage – so one has to look for third part apps. Update: Azure storage analytics, which was not released when I wrote this post, can be used to get this information, learn more:

[Old: One of them is google analytics. it is very easy to setup. so just paste the javascript code that they provide in the between the tag in every html page of the website. I was easily able to do so. Just remember one thing – when they ask you to provide the website URL – specify the whole URL (along with default.htm)

Now the last consideration is handling the directory structure of the website. I realize that it is important if a static website has lot of content. it is necessary to organize it – now, here we are going to handle it a bit differently since we are not allowed to create another container inside our existing container. But one can add the character ‘/’ in the blob name so when you create names for the blobs – you could name it images/justanimage.jpg which looks then looks like a directory structure. Smart deception – huh!?

Here are two blobs I created which look as if they are in an ‘images’ folder

That’s it. I hope you liked the blog post – do post your comments/feedback.


One of the reader [Nathan Parker, Mallard Computers] of the post emailed an option to map the azure storage domain to a custom domain. I liked it – so posting it here for you (with his consent)

1. Map the to .

2. Forward to /containername/default.htm

Thanks Nathan.