Applying Custom Domain Names to Windows Azure Blob Storage

Introduction

If you register a Windows Azure storage service account, you will be prompted to enter a valid account name. This account name by default will be used as your blob URI. The default address would be applicable for the following format:

http://[acccount-name].blob.core.windows.net/[container]/[your-blob].

In example:

http://welystorage2.blob.core.windows.net/images/Desert.jpg

In many cases, we don’t want the “blob.core.windows.net” default domain. Instead, we want to implement our own domain (or sub-domain name), for example: “storage.wely-lau.net”. So that you could have your:

http://storage.wely-lau.net/images/Desert.jpg

I am happy to inform you that, it’s possible for you to do it on Windows Azure Blob Storage.

How To

Prerequisites

In order to perform the custom domain, I assume you have the following items:

  1. Your own Windows Azure Subscription (associated with your Windows Live Id)
  2. Your own domain registered to certain registrar such as http://godaddy.com or http://dynadot.com.

Creating Windows Azure Storage Account

1. Firstly, Login to Windows Azure Developer Portal,  and select the “Hosted Service, Storage Account & CDN” tab at the right hand side and subsequently select the “Storage Accounts”.

image_747B2451

2. As such, the list of Subscriptions that are associated to the Windows Live Id will be shown. Click on New Storage Account button on the ribbon bar.

image_6AB26A81

3. As the Create New Account dialog show up, select the intended subscription and enter your account name. Note that the account name must be globally unique. This will be form your default URL such as http://account-name.blob.core.windows.net/.

Subsequently, select your preferred region or affinity group (if you have any) and click the Create button.

image_31B7C51A

If everything goes well, you will see that the status of the new created storage becomes “Created”.

Adding Your Custom Domain

4. Click on the newly created storage, and then click on Add Domain button on the ribbon bar.

image_46D5A4F5

5. Immediately, a dialog box shows up. You will need to enter your custom domain name there and click Configure.

image_7CE6F777

Verifying Your Domain Name

6. You are not done yet, you will see the instruction to create a CNAME record at your domain registrar portal and point to verify.azure.com. The reason is, Windows Azure requires you to verify you are the owner of that custom domain.

image_59199611

7. Since my domain (wely-lau.net) was registered via http://dynadot.com, I’ll need to perform those action there. I believe it’s more or less the same although you are registering to other domain registrar.

image

Do note that, it may take a few minutes to propagate.

8. Go back to Azure Developer Portal, click on the Storage custom domain, and click on Validate Domain. After a few moments, you can see that your storage custom domain status changes to “Allowed”.

image_2826B8D9

Are we done? No, we are not done yet. What we’ve done so far is to verify the domain belong to us, we have access over it.

Mapping the Custom Domain

9. Now, go back to your domain registrar portal again.

Create another CNAME record, with sub domain “blob” (if you want your address become http://blob.wely-lau.net) and point it to your storage account name (with full address).

image_35010EF7

As usual, it may takes up to a few minutes to update the domain, just be patient.

Let’s Test It Out

10. Since that was newly created azure storage account, obviously it doesn’t have any blob inside.

To test whether the custom domain work, try to upload a blob to that account. You can upload the blobs through many ways including tools such as Cerebrata Cloud Storage Studio, Azure Storage Explorer, and so many more.

image_09401F2E

11. When I type my original blob address on the browser address bar: http://welyazurestorage.blob.core.windows.net/images/Lighthouse.jpg

image_0712FA98

How about using our custom domain name http://blob.wely-lau.net/images/Lighthouse.jpg.

image_0E5A8079

Here you go, it works!

I hope this post is useful to you.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

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

*