Samir Parikh / Blog

Originally published on 03 January 2019

In order to associate a domain name to a virtual machine hosted on Azure, you will need to create a DNS Zone for your domain. The Azure support documentation provides some good instructions but I thought i would also document what I did here.

Within the dashboard, search for "DNS Zone" to create a new one. Use your domain (e.g. "") as the DNS Zone's Name. Once created, create three new "Record Sets" (by clicking the "+ Record Set" button). All Record Sets will be Type A with a TTL of 3600 seconds using the IP address of the virtual machine hosting your blog or site. The only difference will be the Name. For the first Record Set, use @. For the second, use www and for the third, use *. This means that,, as well as any other subdomain will resolve to your virtual machine's IP address. See the screenshot below.

DNS Zone Record Sets in Azure

DNS Zone Record Sets in Azure

Note the four name servers listed in the DNS Zone and provide those to the domain registrar where you registered your domain.

In addition to the Microsoft documentation on DNS, Digital Ocean also provides a good overview as well.