Create a DNS zone to point a custom domain to your Azure VM
If you have your own web server up and running on Azure, you surly want to add a custom domain to it at some point.
Adding a custom domain on Azure was never easier than nowadays. To do so, you just have to create a new so called DNS zone, which is comparable with the Route 53 service from AWS.
Create a DNS zone on Azure
Go and logon to the new portal. Type DNS zones into the search box and select “DNS zones (preview)”. On the zone tile you want to hit “Add”, to create a new zone for your domain.
Next you want to create a new A record, just hit “Record set” from the top menu, if it fits for you, set a prefix at the name field, select type A, set the TTL (time to live) to 5 minutes, enter the public IP of your VM and finally hit OK.
Update Nameserver for your Custom Domain
In the tile of your DNS zone you will see all record sets. What we need next are the nameservers (NS) entries. Select a record and take note of the four nameservers from the properties tile.
On the last step, you want to navigate to your hosting / domain provider and search / ask for the nameserver settings for your domain. In the image below, an example from my provider:
Enter the nameserver here, that you got from the DNS zone NS entries. Thats basically it, now you just have to wait until your new DNS settings are spreaded over the world, which can take up to 24h.
In Ubuntu you can check the nameserver entries for your domain with the following command: