Azure Private DNS empowers you to efficiently address domain names within a virtual network, eliminating the need for a custom DNS server.
Remember that the records in a private DNS zone can’t be accessed online. DNS resolution only works for virtual networks connected to that private DNS zone. Use custom domain names rather than the Azure-provided names available today. The records in a private DNS zone aren’t resolvable from the Internet. DNS resolution against a private DNS zone works only from virtual networks linked to it, which means the organization’s security is improved.
Prerequisites
The resources you need in order to make this working are:
- An Azure Virtual Network with a subnet
- An Azure Private Dns
- An Azure Virtual Machine
Create an Azure VNet
I will create a straightforward Azure Virtual Network (VNet).

Rename the subnet from “default” to “main.”
Create an Azure Private DNS Zone
I am going to create an Azure Private DNS Zone. First, I will search for “private dns zone” and then confidently select “Create.”
On the Basics tab, I will enter my private DNS zone name and choose Review + Create.
Link the VNet to Azure Private DNS
I’m almost done! I will link the private DNS zone to the virtual network by adding a Virtual Network Link.
Under DNS Management, under the left-hand pane, select Virtual Network Links – +Add.
Type a link name, select your VNet from the Virtual Network drop-down menu (for example, grammatikosVnet), and ensure you check the “Enable auto registration” option under Configuration.
Within seconds, the link name will appear, indicating a status of “Completed.”
To validate the functionality of the Azure Private DNS zone, I set up an Azure VM and performed tests using the command prompt with the well-known ping command. This approach ensured that everything was working as expected.
The image below clearly illustrates what I mentioned earlier, featuring the GIF following the successful deployment of the VM, along with a new record visible in the record set.
Related links