The generated URL, http://<mysite>.azurewebsites.net, for an Azure web site is more than enough for many websites. However, if you do it more professionally, you will need your own domain, or at least a sub-domain for the site. It is not difficult to link a domain with an Azure web site, but there are two things that you need to pay for before this can be done:
- A domain name.
- Running your Azure web site in “Shared mode”. (“Free mode” is the default mode for a new site.)
You can use a CNAME record to point your domain name to your Windows Azure web site. You can also configure an A record to point the domain name to Windows Azure web site. The process requires that you wait for the CNAME and A records propagate before you can finally set the domain name in the management portal.
However, even if this documentation is good I had problem redirect my domain without www, alas http://buzzfrog.se. I will here describe the steps I needed to take to get this to work:
1. Go to your DNS administration tool and add three new CNAME records:
xxx is the name of your Azure web site. In my DNS tool I need to have a full stop ‘.’ at the end of the url.
The first is for the usual www.xxx.com, the second for a domain without www and the last for a domain with subdomain m, m.xxx.com, for mobile users. (The last one is not needed.)
2. Wait until the DNS information has been uploaded and replicated.
3. Go to your web site in Windows Azure control panel and add your domain names.
4. Go back to your DNS administration tool and add the following records:
|@||A||0||The IP number for your azure web site|
|*||A||0||The IP number for your azure web site|