Having spent two days trying to set up a custom URL for my Azure website, I'm sharing the configuration settings that worked for me. The existing documentation for this is seriously lacking when it comes to setting up CNAME and A record entries in our DNS admin.
After following the Microsoft documentation, I finally had my root URL working but got 404 error when trying to access my site using "www". Here's how I fixed that...
Assuming an Azure Website name is myazurewebsite and custom DNS is mywebsite.com I have one A record:
1) Host name:mywebsite.com IP:220.127.116.11 (IP taken from domain management in Azure Website)
And two CNAME records:
1) Alias:awverify.mywebsite.com points to host:awverify.myazurewebsite.azurewebsites.net
2) Alias:www.mywebsite.com points to host:myazurewebsite.azurewebsites.net
Then I have Azure Website configured with two domain names: