Migrating a free azure website to a custom domain IS EASY
These are the simple steps
- Migrate the free website to a shared website
- Use the configure option to manage domains
- Enter your custom domain
- Enter the cname and A records on your DNS
- Save your domain into Azure
- Browse your new website
Lets take my Blog as a detailed example
Log into windowsazure.com management portal and select the free website
Select scale and move your website to shared, select only a single instance to minimise your running costs.
Now Select configure then scroll to manage domains
You will be presented with the following dialog, pay attention to the IP address supplied and the instructions on CNAME records circled
Now I wish to explain some DNS theory. DNS (Domain Name Service), has only one purpose in life, that is to convert a hostname, e.g. yourname.com, into an IP address. The first way to do this is to have a DNS record that states the IP address for a particular hostname. This is called an “A” record.
So when DNS gets a request for the IP address of “yourname.com” it returns the IP address specified in the “A” record.
The second type of record is a CNAME (Canonical Name) record. This record redirects your hostname to a second domain name and the IP address of this second domain name is provided for use. In my example I redirect my domain scrumsofanarchy.com to my azure website domain scrumsofanarchy.freeazurewebsites.net using a CNAME record.
Before we can point our custom domain name to the Azure website Microsoft requires verification that we in fact control the domain by requiring certain CNAME records be configured. In my example I need the following CNAME records
Note also I have added an A record using the IP address specified in the manage domains dialog
To make these changes to your domain you will need to log into the domain registar for your domain and select DNS settings. Just select add new records and add the CNAME and A records required.
Now once this is done we can go back to the azure console and save the domain. If the domain configuration is correct we should get the following
Notice the nice green tick. If you get an error check the spelling of your cname records. Not that I have added both scrumsofanarchy.com and www.scrumsofanarchy.com to my custom domains.
THAT’S IT!!!!!! Now you have a professional looking domain for you Blog and no one knows where It is being hosted. Also note the re-directions are invisible to the user 🙂
One last point. By using CNAME redirects for scumsofanarchy.com to scrumsofanarchy.azurewebsites.net . I have bulletproofed my website from any change to IP address as the CNAME lookup will provide the correct IP Address. Some other forums have noted that the IP Address of the Azure Website MAY change if the Azure Virtual machine is restarted or moved.
If you require any further assistance please leave a comment