It was a little confusing setting up my custom domain in my Azure settings for this blog. I’m no Network/DNSexpert and hardly know my CNAME from my MX from my A records. So when I was trying to figure it all out, needless to say, I was worried I was going to break the internet!! After a bit of trial and error I managed to get it working. Hopefully these tips will help you too if your having issues.
Change the mode from FREE to SHARED (note this will mean you can incur costs depending on your Azure plan/account).Shared mode is still run in a shared environment (ie. memory, CPU etc..) but with less stringent monitoring than the free mode. If you want your own dedicated Virtual Machine etc… then choose standard mode.
Next you’ll need to configure your domain settings. Go back to the Azure Dashboard and scroll to the bottom of the screen. You will see the MANAGE DOMAINS item on the status bar:
Click the MANAGE DOMAINS item to open the property sheet:
When you first come to this screen, you will only see your websites Azure URL. In this case it was: monkeysandgorillas.azurewebsites.net.
So you have to first create a DNS CNAME record with your hosting service that maps the full domain name (eg: www.monkeysandgorillas.com) to the monkeysandgorillas.azurewebsites.net domain. This is sometimes declared as the WWW record in the DNS settings. The specifics of how to do this are different for each hosting provider. You might need to google for yours.
It will take a bit of time for this first CNAME entry to propagate around the web. Once it has – it could take anywhere from 2-24hrs – you need to come back to your Azure Manage Domains settings and then enter your full domain name with the leading ‘www’. (eg: www.monkeysandgorillas.com). If you have set up your CNAME record correctly and Azure can resolve your full domain, you will see the green success tick, as shown above. If not, you will get a red circle with a cross in it.
Once you have the tick, you then need to go back to your hosting provider to add the A Record to your DNS settings. The A Record is often specified with the @ symbol in the DNS settings. This time though you will need to enter the IP address as shown in the Manage Domains property sheet. In my case I added the IP Address: 18.104.22.168. Save your DNS settings and then you will once again have to wait for the updates to propagate around the web.
Lastly you need to return to the Azure Domain Management interface and enter your domain name, without the leading ‘www’: (eg: monkeysandgorillas.com). Once again, if Azure can resolve the DNS record, you will see the success tick. Go ahead and click the save icon (the grey tick) in the bottom right hand corner of the property sheet.
Note: I tried to set the awverify.www.monkeysandgorillas.com in my DNS record and it just wouldn’t work. Even without it I managed to set the www & @ records which achieve what I was after. The instructions on the Manage Custom Domains screen do say you can set either the www or the awverify version of your domain. So I guess try one and if that fails try the other. But just remember you need to give it a bit of time to propagate each time you make a change.
For more information see: