Configure a custom domain name in Azure App Service via A Record

To point your custom web domain name (in my case, www.usoup.com) to Azure websites (Web Apps) using A record, there are a few steps that you'll need to follow precisely, both from your domain registrar (in my case, Godaddy.com) and within the Azure Portal itself. This article describes the steps clearly:

https://azure.microsoft.com/en-us/documentation/articles/web-sites-custom-domain-name/

However, one thing rather confusing over here, is that the configuration didn't work exactly as it described. I'm using contoso.com to continue where the article left off, for illustration purpose:

HostRecord TypeIP Address or URLBehavior
@A (address)168.62.48.183works for browsing the site via "contoso.com"
wwwCNAME (alias)contoso.azurewebsites.netbrowsing the site via "www.contoso.com" will actually display "Error 404 - Web app not found." error from Microsoft Azure
awverifyCNAME (alias)awverify.contoso.azurewebsites.netThis is the additional requirement from Azure Web Apps, as explained in the original article. 
To make the "www.contoso.com" actually points to a working Web Apps site, we'll actually need to add another CNAME alias, as follows:

HostRecord TypeIP Address or URL
awverify.wwwCNAME (alias)awverify.contoso.azurewebsites.net
Then go back to the Azure Portal > {your web app} > Settings > Custom domains and SSL > Bring External Domains > Add "www.contoso.com" under Domain names. You should now notice 2 host names assigned to your site in the "Custom domains and SSL" tab: "contoso.com" and "www.contoso.com".


23. December 2015
Technology (0)

Add comment