XiaTools

Setting Up Azure DNS Zones for Enterprise Infrastructure

By Rohit, founder of XiaTools · Updated 19 Oct 2026

Managing domain name system records effectively is the backbone of any reliable enterprise cloud infrastructure. This azure dns zones management guide walks you through designing, deploying, and maintaining public and private DNS zones in Microsoft Azure to ensure high availability, seamless scaling, and strict security.

Before you start migrating your production domains to the cloud, it is vital to verify your current registrar configurations, domain ownership status, and active nameservers. You can use the WHOIS Lookup tool to quickly inspect domain expiration dates, registrant details, and existing name server delegations before making any critical modifications.

Understanding Azure DNS Architecture

Azure DNS is a hosting service for DNS domains that provides name resolution using Microsoft Azure infrastructure. By leveraging Azure DNS, you can manage your DNS records using the same credentials, APIs, tools, and billing as your other Azure services. Enterprise infrastructure typically relies on two distinct types of DNS zones: Public DNS Zones and Private DNS Zones.

Public DNS Zones vs. Private DNS Zones

Public DNS zones manage public-facing domain name resolution. When an internet user queries your domain, Azure name servers respond with the corresponding IP addresses. These zones are exposed to the public internet and handle records like A, CNAME, TXT, and MX.

Private DNS zones, conversely, manage name resolution within a virtual network (VNet) without requiring a custom-configured private DNS solution. Virtual networks linked to a private DNS zone can resolve internal hostnames using records associated with Azure Virtual Machines, Azure Kubernetes Service (AKS) clusters, or PaaS services, completely isolated from the public internet.

Feature Public DNS Zones Private DNS Zones
Visibility Public Internet Specific Virtual Networks Only
Use Case Websites, Public APIs, Mail Servers Internal Microservices, DB Endpoints, VMs
Record Types A, AAAA, CNAME, MX, TXT, SRV, CAA A, AAAA, CNAME, PTR, SRV, TXT
Nameservers Global Azure Anycast Network Internal Azure DNS Resolvers (168.63.129.16)

Step-by-Step Azure DNS Zone Deployment

Deploying a DNS zone requires planning your resource groups, setting up your naming conventions, and configuring appropriate role-based access control (RBAC). Follow these steps to provision your first enterprise public zone.

Step 1: Create a Resource Group

Organize your networking components by isolating your DNS zones into dedicated resource groups. Open your Azure Portal, navigate to Resource Groups, and create a new group named rg-networking-prod in your preferred region.

Step 2: Create the DNS Zone

  1. In the Azure Portal search bar, type DNS zones and select it from the service menu.
  2. Click on + Create to open the provisioning blade.
  3. Select your subscription and the rg-networking-prod resource group.
  4. Enter your root domain name, such as example.com, under the instance details.
  5. Click Review + create and then Create.

Step 3: Configure Registrar Delegation

Once the zone is deployed, Azure automatically assigns four name servers to your zone. You must log in to your domain registrar (such as GoDaddy, Cloudflare Registrar, or AWS Route 53 registrar) and replace your current name server records with the Azure-assigned values.

ns1-01.azure-dns.com.
ns2-01.azure-dns.net.
ns3-01.azure-dns.org.
ns4-01.azure-dns.info.

Verify that the delegation is active by querying your authoritative name servers from your local terminal:

dig NS example.com @8.8.8.8

Configuring Enterprise DNS Records

Once your zone is active, you can begin populating your zone file with enterprise-grade records. Azure DNS supports standard record types using a consistent syntax across the portal, Azure CLI, and PowerShell.

Creating Alias Records for Azure Resources

Unlike traditional DNS providers, Azure DNS supports alias records that point to Azure resources like Azure Front Door, Public IP addresses, and Traffic Manager profiles. If the IP address of the underlying resource changes, the Azure DNS alias record automatically updates itself, preventing downtime.

To create an A-record alias pointing to a public load balancer IP (192.0.2.5) via PowerShell:

$rgName = "rg-networking-prod"
$zoneName = "example.com"
$recordName = "www"
$targetIp = "192.0.2.5"

New-AzDnsRecordSet -Name $recordName -RecordType A -ZoneName $zoneName -ResourceGroupName $rgName -Ttl 3600 -TargetResourceId "/subscriptions/.../resourceGroups/rg-networking-prod/providers/Microsoft.Network/publicIPAddresses/pip-web-prod"

Managing Standard TXT and CNAME Records

For domain verification (such as Microsoft 365 or Google Workspace setup) and service routing, you will frequently create TXT and CNAME records.

; Sample Zone File Extract
@       3600    IN      TXT     "MS=ms12345678"
www     300     IN      CNAME   example.azurewebsites.net.

Setting Up Private DNS Zones for Internal VNets

Enterprise architectures require internal name resolution that does not leak to the public internet. Private DNS zones fulfill this requirement.

  1. Search for Private DNS zones in the Azure Portal and click + Create.
  2. Place the zone in your enterprise networking resource group and name it internal.example.com.
  3. Once created, click on the zone, navigate to Virtual network links, and click + Add.
  4. Link your spoke virtual networks (e.g., vnet-spoke-app) and enable Auto-registration if you want Azure virtual machines to automatically register their DNS records into the private zone.

Test internal resolution from an attached virtual machine using nslookup or dig against the Azure internal resolver IP 168.63.129.16:

nslookup app-vm-01.internal.example.com 168.63.129.16

Automation and CI/CD Integration

Managing enterprise infrastructure manually introduces human error. Production DNS zones should be managed via Infrastructure as Code (IaC) tools like Bicep, Terraform, or Azure DevOps pipelines.

Here is a snippet of an Azure Bicep template defining a public DNS zone with an A record:

resource dnsZone 'Microsoft.Network/dnsZones@2018-05-01' = {
  name: 'example.com'
  location: 'global'
}

resource recordA 'Microsoft.Network/dnsZones/A@2018-05-01' = {
  parent: dnsZone
  name: 'app'
  properties: {
    TTL: 300
    ARecords: [
      {
        ipv4Address: '192.0.2.10'
      }
    ]
  }
}

Common Mistakes and How to Fix Them

Avoiding common configuration pitfalls saves troubleshooting hours during high-stakes deployments.

  • Forgetting the Trailing Dot in CNAMEs: When specifying fully qualified domain names (FQDNs) in record sets, forgetting the trailing dot (.) causes Azure to append your zone name automatically, resulting in broken lookups like www.example.com.example.com. Always append the trailing dot for external FQDN targets.
  • Exceeding TTL Limits During Migrations: Setting high TTLs (e.g., 86400 seconds) right before an infrastructure migration traps users on old servers. Lower your TTLs to 300 seconds or less at least 48 hours prior to making changes.
  • Misconfiguring VNet Link Auto-Registration: When using Private DNS zones, enabling auto-registration on multiple VNets with overlapping hostnames can cause record collision. Ensure strict naming conventions for VMs across linked VNets.

Production Deployment Checklist

Review this quick checklist before pushing your Azure DNS configuration to production:

  • All four assigned Azure name servers are correctly configured at your domain registrar.
  • TTL values are lowered to 300 seconds prior to production cutovers.
  • Alias records are utilized for Azure-native resources to ensure dynamic IP handling.
  • Private DNS zones are appropriately linked to internal spoke VNets.
  • RBAC permissions are restricted to network engineering teams only.
  • DNS changes are version-controlled and deployed via Infrastructure as Code.

Frequently asked questions

How long does Azure DNS propagation take globally?

Azure DNS record updates usually propagate across Microsoft's global Anycast network within seconds. However, total global propagation time depends heavily on local recursive resolver caching and the Time-To-Live (TTL) value configured on your individual DNS records.

Can I transfer an existing domain registrar to Azure DNS?

Azure DNS does not currently function as a domain name registrar. You must keep your domain registered with an accredited registrar (such as GoDaddy, Namecheap, or Route 53) and simply delegate the name server records to Azure DNS.

What is the difference between an A record and an Alias record in Azure?

A standard A record maps a domain name to a static IPv4 address. An Azure DNS alias record is a pointer to an Azure resource like a Public IP or Traffic Manager profile, which automatically updates when the underlying resource's IP address changes.

How do I secure my Azure DNS zones against unauthorized changes?

You should use Azure Role-Based Access Control (RBAC) to assign the DNS Zone Contributor role only to authorized network administrators. Additionally, implement Azure Policy to audit or block unauthorized modifications to production resource groups.

Can private DNS zones resolve across peered virtual networks?

Yes, private DNS zones support automatic name resolution across peered virtual networks. You simply need to link the private DNS zone to each peered virtual network and enable auto-registration if desired.

Related articles

Free tools