Configuring a custom domain in Azure very easy, if you know what to configure. There are domain bindings, TXT records, A records, and we don’t deal with them on a daily basis.
Your AppService plan must be at least B1, to allow custom domains and SSL bindings.
Once you have your application deployed, you must create a DNS Zone that will allow you to link your existing custom domain to your AppService.
So in order for your website to work in every situation, with your custom domain, you will need to add 4 record sets:
- an A record type with www as the name and your website assigned IP as a value
- an A record type with @ as name and your website assigned IP as the value(this will be already created, but make sure is there)
- a TXT record type with www as a name and [yourwebsite] .azurewebsites.net as the value
- a TXT record type with @ as a name and [yourwebsite].azurewebsites.net as the value
Adding an A record
Adding a TXT record set
You need to have these 4 records in order to allow your website to be accessible with www, and without it. Like coolwebsite.com vs www.coolwebsite.com.
In my case, my website couldn’t be accessed from a few corporate networks. Unfortunately, it took a while until I realized what is happening.
I tend to access websites without using www in front of the domain. It’s easier to write, and Google Chrome has the tendency to suggest pages
There are a few firewalls or corporate networks that will prevent your website from being loaded if the DNS is not resolved for both options, and you might not even know it
DNS propagation might take a while, but you can use tools like
https://www.whatsmydns.net/ .
Using this application you can select any record you want to check to make sure it is propagated.
The post Configuring a custom domain in Azure appeared first on Irina Scurtu.
Top comments (1)
Thanks for the short and informative tutorial. Coming to DNS Propagation, there is another tool dnschecker.org/ with 100+ public servers available to check the propagation results. Using this application you can select any record you want to check to make sure it is propagated. So compared to whatsmydns.net, that tool provides more detailed propagation results.