In my last blog post, I talked about migrating from a web host to Windows Azure. One of the remaining cleanup tasks was to point the domain name from something like louiebao-blog.azurewebsites.net to louiebao.net. The actual steps may be slightly different depends on who your domain registrar is but the general idea should remain the same. I am using DNSimple so I will be showing you screen shots from them.
Add a service for Windows Azure
After logging in to DNSimple, click on the desired domain name, goto “Add or edit services”, find Windows Azure and click on Add. Once presented with the “Setup Windows Azure Service” screen, enter the subdomain for your Azure site. This is the part before .azurewebsite.net, in my case louiebao-blog.
After adding the service, you will see a few new DNS records under the Windows Azure service. Note the A record isn’t there as DNSimple doesn’t know the IP address at this point, you will need to create it in a later step.
Add the custom domain in Windows Azure
In Windows Azure’s mangement portal, goto the “Manage custom domains” dialog and enter the custom domain name, in my case louiebao.net. At this point, the awverify.louiebao.net CNAME record created in the previous step should be in action. Once Azure verifies that you own the domain, you will be able to add the domain name to the list.
Once this step is done, you can optionally remove the CNAME awverify record as it has no further use to us.
Add an A record in DNSimple
Take the IP address from the “Manage custom domains” dialog and create a DNS A record with it in DNSimple.
Remove DNS records from the old host
Go back to your old host and remove the now obsolete DNS records.
Wait for a hour or two or even longer
I am not joking as with DNS changes certain things just take a long time to refresh. I am not an expert on DNS but as long as your configurations are correct, it will work eventually. For the impatient ones, you can just go to the next step and keep checking on the status.
I used http://www.digwebinterface.com/ to make sure the domain name can be successfully resolved to the desired IP address.
Now my blog can be accessed from louiebao.net as well as louiebao-blog.azurewebsites.net. In case you are wondering, the default Azure domain name louiebao-blog.azurewebsites.net cannot be removed as far as I know.
One more thing
I quickly realised that I have missed a step after publishing this post. The WordPress settings are still pointing to louiebao-blog.azurewebsites.net and need to be updated as well.