Introduction
The Azure private DNS zones auto registration capability is responsible for managing DNS records for virtual machines in a virtual network. When we connect a virtual network to a private DNS zone with this setting enabled, a DNS record for each virtual machine in the virtual network is created.
A record will be created for each virtual machine. DNS entries for freshly deployed virtual machines are also created automatically in the associated private DNS zone. If we delete a virtual machine, all the DNS records are automatically removed from the private DNS zone.
In my current scenario, I have a Virtual Network with subnets.
![]()
Step 1
On the Azure Portal, Click + Crate, and in the search bar, type DNS, and then select Private DNS zones.
![]()
Step 2
In Private DNS zones, Click Create.
![]()
Step 3
Enter the private DNS zone's name, click Review + Create, and then click Create.
![]()
Step 4
In our Private DNS zone (azure.org), select Virtual network links under the settings, and then select + Add.
![]()
Step 5
On the Add virtual network link, enter the name for the Link name, select the Virtual Network, select the Enable auto registration, and then click Ok.
![]()
Step 6
Create a Virtual Machine to verify the Auto registration.
![]()
Step 7
Open the Virtual machine and verify the Private IP address.
![]()
Step 8
To verify records are added to the DNS zone, open the Private DNS zone, and we can find our Virtual Machine automatically added to our DNS zone.
![]()
Summary
In this article, we learned how to configure a Private DNS zone to set up an Auto registration process. If you have any questions, feel free to comment under the article.