Mapping Custom Domain Name to Windows Azure

Introduction

As most of you have known that, when creating service to host our application in Windows Azure, we are provided a special DNS with suffix .cloudapp.net. For example: http://welypersonal.cloudapp.net/ which is personal starter kit that have been moved to the cloud. You can refer to the series of migration post if you want to know more about it.

It’s very common requirement that we have our custom domain name and want to map it to the cloud-based application. For instance, I have my own wely-lau.net domain which was registered on DynaDot. And then, I would like to create subdomain, namely http://azure.wely-lau.net and map it to http://welypersonal.cloudapp.net.

Steve Marx’s post

Steve Marx, the Technical Strategist on Windows Azure blogged this post about it, specifically using GoDaddy as domain registrar . However, we notice that there’s some incorrect image that could lead to confusion. I emailed him before and he said he will fix it later on. We hope so Steve, as there’s so many people refer to your blog Smile.

image_0E873BA4

In the post, Steve mentioned that, in general there’re 2 ways to map domain to point to a location.

  1. Using “A” record to point to a specific address. However,we are unable to do that in Windows Azure. The reason is when we host our application to Azure,the IP address might be changed without our awareness. For example: when we increase the number of instance of our hosted application. The fabric controller, which is acting as the “brain” will look for available machine to move or create the VM for our application. As it, the IP would be change. Whereby, to use A record, we need to point it to static IP address. Thus, this is not an option for us.
  2. Using “CNAME” record, which can map a specific domain to another DNS entry, without have to setting the . This is the possible way to do it in Azure.

How to do it?

In this post, I’ll show you how to map your custom domain to Windows Azure. In order to follow my instruction, you will of course need to own your domain. You can buy or register your domain with some domain registrar such as GoDaddy, DynaDot, Register, etc.

In this example, I’ll show you how to do it in DynaDot, since my domain wely-lau.net was registered there. If you are using other domain registrar, no worries. I believe more or less, the functional and features are the same, just look for it carefullyOpen-mouthed smile.

1. Log in to your domain registrar portal.

You should see some summary info of your domain subscription.

image_23189CF0

2. Go to Domains tab, then click on the domain that you wish to map.

image_048E106D

3. Click on the value of the name server, which your Domain refer to.

image_37A9FE3C

4. Now, you can find appropriate record type and map it to your intended location.

image_25E9A20A

As you can see from the screenshot above, I create a sub domain “azure” by using CNAME record and map it to “welypersonal.cloudapp.net”.

Additionally, I can also forward my domain to any intended location, for example I map wely-lau.net and www.wely-lau.net to http://netindonesia.net/blogs/wely.

5. When ready, click on the “Use DynaDot DNS” to apply.

Do note that, I takes a few minutes to apply new domain setting.

image_2DFD7C07

6. Here’s the screenshot after a few minutes

image_46302059

Notice the URL. When I type http://azure.wely-lau.net, I map it to my personal starter kit application which could be found in http://welypersonal.cloudapp.net.

I hope this post is useful for you Smile.

I’ll post more Azure-related post in future. Stay tuned here.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

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

*