Name Resolution
Azure-provided DNS · custom DNS servers · VNet DNS settings · public zones · private zones · VNet links · DNS Private Resolver
By the tools4free.dev team · Last reviewed November 13, 2026
Practice questions for this topic →
Name resolution options inside a VNet
Resources in a VNet resolve internal names in one of four ways: Azure Private DNS zones, Azure-provided name resolution, your own DNS server (which can forward to Azure), or Azure DNS Private Resolver. Microsoft calls private DNS zones the preferred solution.
| Scenario | Solution | Name form |
|---|---|---|
| VMs in the same VNet | Private DNS zones or Azure-provided name resolution | Host name or FQDN |
| VMs in different VNets | Private DNS zones, DNS Private Resolver, or customer DNS servers that forward between the VNets | FQDN only |
| App Service app (VNet integration) to VMs in the same or another VNet | DNS Private Resolver or customer-managed DNS forwarders | FQDN only |
| On-premises names from Azure VMs | DNS Private Resolver or customer-managed DNS servers | FQDN only |
| Azure host names from on-premises computers | Forward queries to a customer-managed DNS proxy in the VNet; the proxy forwards to Azure | FQDN only |
| Reverse DNS for internal IPs | Private DNS zones, Azure-provided DNS, DNS Private Resolver or your own DNS | Not applicable |
If you use Azure-provided DNS the DNS suffix is applied to your VMs automatically. With any other option you must use FQDNs or add the suffix yourself.
Azure-provided name resolution
- Basic authoritative DNS only. You can't control the zone names or the life cycle of records, you can't register your own records, and the Azure-created DNS suffix can't be changed.
- Scoped to one VNet: names of one VNet can't be resolved from another VNet.
- No WINS or NetBIOS. Host names may use only 0-9, a-z and a hyphen, and can't start or end with a hyphen.
- DNS query traffic is throttled per VM. Client-side caching helps.
- The Azure DNS IP is
168.63.129.16: a static address that doesn't change. It gives filtered name resolution to resources without a custom DNS server. It doesn't support reverse lookup. - DNS traffic to
168.63.129.16isn't subject to NSGs by default unless you target theAzurePlatformDNSservice tag with a deny rule.
Your own DNS server
- A DNS server VM in the VNet forwards queries it can't answer to the Azure recursive resolvers at
168.63.129.16. To resolve a VM host name the DNS server VM must be in the same VNet. Use conditional forwarding because the DNS suffix differs per VNet. - Requirements: TCP and UDP port 53 reachable from clients, internet access, and protection from internet exposure. NSGs must allow UDP 53 (and optionally TCP 53) to the listener. After custom DNS servers are set, port 53 traffic bypasses the NSGs of the subnet and the NIC.
- If a VPN gateway is used with custom DNS servers on the VNet, add
168.63.129.16to the list to avoid disruption. - Windows DNS servers forwarding to Azure need a forwarding timeout of more than four seconds. Otherwise private DNS zone records might resolve to public IPs.
- Azure DNS Private Resolver replaces VM-based DNS servers: cost, built-in high availability, scalability.
Reverse DNS
- Supported in all Resource Manager VNets. Azure adds PTR records of the form
[vmname].internal.cloudapp.netwhen a VM starts and removes them when it's stopped (deallocated). Theinternal.cloudapp.netreverse zone can't be viewed or edited. - Reverse lookups are scoped to one VNet, even when peered: peered VNet addresses return
NXDOMAIN. - With a private DNS zone linked and autoregistration on, a PTR query returns two names:
[vmname].[zone]and[vmname].internal.cloudapp.net. Autoregistration of PTR records isn't supported.
DNS settings for a VNet
| Setting | Behavior |
|---|---|
| Default (Azure-provided) | Names and private IPs register automatically. Resolves names only within the VNet. |
| Custom | You list DNS servers (up to 20 per VNet and 20 per NIC). Servers are tried in the order listed, not round-robin: if the first is reachable it's used even if unhealthy. |
| Per-NIC DNS servers | Override the VNet setting. A NIC (or cloud service) setting takes precedence. |
| Custom with no address | At least one server IP is required. Otherwise the VNet ignores the setting and uses Azure-provided DNS. |
| Name resolution order, default DNS | Linked private DNS zones first, then Azure-provided DNS. |
| Name resolution order, custom DNS | Linked private DNS zones aren't queried automatically; the custom setting overrides. Use a Private Resolver inbound endpoint, or a VM forwarder with a conditional forwarder to 168.63.129.16. |
- You can change the DNS server list at any time. The change reaches a VM only after a DHCP lease renewal (
ipconfig /renewon Windows) or a restart. Resources that inherit DNS settings, such as Azure Firewall and Application Gateway, need a restart. - Don't edit DNS server IPs inside the VM: they might be erased when the VM network adapter is replaced during service healing.
- You can't specify a custom DNS suffix for a VNet.
- Deleting a DNS server from a VNet's list removes it only from that list; it stays registered in Azure for other VNets.
Public DNS zones
- Azure Public DNS hosts DNS domains on Azure's global name servers with anycast: each query is answered by the closest server. It supports DNSSEC, Azure RBAC, activity logs and resource locks.
- You can't buy a domain in Azure DNS. Buy it from App Service domains or another registrar, then host it in Azure.
- A DNS zone hosts the records of one domain. The zone name must be unique in the resource group. The same name can exist in another resource group or subscription, but each copy gets different name servers, and only one set can be configured at the registrar.
- You don't need to own a domain to create a zone for it. You need to own it to point the registrar at the Azure name servers.
- The zone is a global resource. The resource group location doesn't affect the DNS service.
Records
| Item | Rule |
|---|---|
| Types | A, AAAA, CAA, CNAME, MX, NS, PTR, SOA, SRV, TXT. SPF records use the TXT type. |
| Record set | Records with the same name and type. TTL is set per record set, 1 to 2,147,483,647 seconds. |
| SOA and CNAME | Only one record per set. |
| CNAME | Can't coexist with another record set of the same name. Can't be created at the zone apex (@). |
| NS at the apex | Created and deleted automatically with the zone. You can add name servers but can't remove or change the Azure ones. |
| Wildcards | Supported for all types except NS and SOA. |
| Tags and metadata | Tags on zones only; record sets use metadata instead. |
Alias records
- An alias record set references an Azure resource instead of a fixed value. It follows the target when the IP changes and becomes empty when the target is deleted, so there are no dangling records.
- Supported record types: A, AAAA and CNAME. Targets: a Standard SKU public IP, a Traffic Manager profile, an Azure CDN endpoint, an Azure Front Door endpoint, or another record set of the same type in the zone.
- Use alias records at the zone apex: a CNAME can't be created there. Limit: 50 alias record sets per resource. Register the
Microsoft.Networkresource provider (in both subscriptions if the zone and the target are in different ones).
Host a domain: steps
- Create the DNS zone.
- Create the records in the zone.
- Retrieve the Azure name servers of the zone. Azure assigns them from a pool when the zone is created and adds the NS records.
- At the registrar, set the NS records to the Azure name servers. Use all four, copy the trailing period, and don't use vanity name servers from your own zone.
- Verify with
nslookup -type=SOA <domain>. Allow at least 10 minutes.
| Default limit | Value |
|---|---|
| Public DNS zones per subscription | 250 |
| Record sets per public zone | 10,000 |
| Records per record set | 20 |
| Alias record sets per Azure resource | 50 |
Private DNS zones and VNet links
- Azure Private DNS resolves names inside VNets without a custom DNS solution. Records of a private zone can't be resolved from the internet; resolution works only from VNets linked to the zone.
- The zone is a global resource, not tied to one VNet or region. You can link it to VNets in different regions.
- Peering isn't required for cross-VNet resolution through a linked zone.
- Supported record types: A, AAAA, CNAME, MX, PTR, SOA, SRV, TXT. Not supported: NS delegations in a private zone, single-label zone names. A name has at most 34 labels. Don't use
.local. - Some names are reserved and can't be created, for example
azure.com,microsoft.com,windows.netandcore.windows.net. - Split-horizon: create a public zone and a private zone with the same name. Internet clients get the public answer; VMs in the linked VNet get the private one.
| Limit | Value |
|---|---|
| Private DNS zones per subscription | 1,000 |
| Record sets per private zone | 25,000 |
| VNet links per private zone | 1,000 |
| VNet links with autoregistration per private zone | 100 |
| Zones one VNet can link to / with autoregistration | 1,000 / 1 |
Virtual network links
| Registration VNet | Resolution VNet | |
|---|---|---|
| Link setting | Autoregistration enabled | Autoregistration not enabled |
| VM records | Created automatically in the zone | Not created automatically |
| Can query the zone | Yes | Yes, including records from registration VNets and manual records |
| Per zone | Many | Many |
| Per VNet | Only one registration zone | Many resolution zones |
- You can create only one link between a zone and a VNet. A link name must be unique within the zone. Classic VNets aren't supported. After creating a link, check that its Link Status shows Completed.
- Autoregistration: creates an A record for each VM on the primary NIC only, including VMs already in the VNet. It removes the record when the VM is deleted or stopped. It works only for VMs (create records for internal load balancers by hand) and doesn't support PTR records.
- A VNet can be linked to only one private zone with autoregistration, but one zone can have many VNets.
- Deleting a VNet deletes its links and its autoregistered records in every zone.
- Hub and spoke: link the hub as the registration VNet and the spokes as resolution VNets.
- Private endpoints: use the recommended zone per service, for example
privatelink.blob.core.windows.netfor Blob andprivatelink.database.windows.netfor Azure SQL Database. Automatic DNS configuration is generated only with the recommended names. Don't share one zone between endpoints of different services: it deletes the initial A record. - Fallback to internet: when a Private Link zone returns NXDOMAIN, the link can retry with public recursion. Set
resolutionPolicytoNxDomainRedirect(portal: Enable fallback to internet) on the VNet link.
Azure DNS Private Resolver
A fully managed, highly available service that resolves DNS between VNets and on-premises without VM-based DNS servers. You create it in a VNet; clients need no DNS client changes. Hybrid resolution needs ExpressRoute or a VPN.
| Component | Purpose and rules |
|---|---|
| Inbound endpoint | Receives queries from on-premises or other private locations at an IP in your VNet range. Point on-premises conditional forwarders at it to resolve Azure private zones. IP is static or dynamic (dynamic = the fifth address in the subnet; static can't be a reserved address). |
| Outbound endpoint | Sends queries from Azure to on-premises, other clouds or external DNS servers, based on a forwarding ruleset. Has a subnet but no IP address. |
| Forwarding ruleset | Group of rules. Applies to up to 2 outbound endpoints of the same resolver. Links to up to 500 VNets in the same region. |
| Forwarding rule | Domain name (dot-terminated, up to 34 labels), destination IP:port (up to 6 targets), enabled or disabled. The most specific (longest) match wins. |
| VNet link (ruleset) | Gives a VNet the ruleset's rules. The VNet needn't be peered with the resolver VNet. |
Rules and restrictions
- Subnets: each endpoint has its own subnet,
/28to/24, delegated only toMicrosoft.Network/dnsResolvers, with no other resources. The inbound endpoint's subnet must be in the resolver's VNet. - One resolver references one VNet in its own region; two resolvers can't share a VNet. No IPv6-enabled subnets. VNets with encryption enabled aren't supported. Rulesets can't be linked across tenants or to another region.
- You can't delete an outbound endpoint until you delete its ruleset and the VNet links under it.
- You can't use
168.63.129.16as a rule destination. Certain domains reserved for Azure services are ignored by a wildcard rule. - Don't link a ruleset that contains a rule pointing at the inbound endpoint to the VNet where that inbound endpoint lives: it can cause a DNS resolution loop.
- The resolver is zone-redundant automatically in regions with availability zones, at no extra cost, and you can't turn it off. It doesn't store customer data outside its region.
- Register the
Microsoft.Networkresource provider before you create one.
| Limit | Value |
|---|---|
| DNS private resolvers per subscription | 15 |
| Inbound / outbound endpoints per resolver | 5 / 5 |
| Forwarding rules per ruleset | 1,000 |
| VNet links per ruleset | 500 |
| Outbound endpoints per ruleset / rulesets per outbound endpoint | 2 / 2 |
| Target DNS servers per rule | 6 |
| Queries per second per endpoint | 10,000 |
How a query is resolved in a VNet
- If the VNet has custom DNS servers, the query goes to them.
- With Azure-provided DNS, private DNS zones linked to the VNet are consulted.
- If no zone matches, the ruleset links of the VNet are consulted.
- With no ruleset link, Azure DNS answers.
- With a ruleset link, the rules are evaluated. A suffix match forwards the query; with several matches the longest suffix wins.
- With no match, nothing is forwarded and Azure DNS answers.
Architectures in a hub and spoke
| Distributed (ruleset links) | Centralized (inbound endpoint as custom DNS) | |
|---|---|---|
| Spoke DNS setting | Azure-provided | Custom DNS = inbound endpoint IP of the hub |
| Spoke needs | A ruleset link and a rule that forwards the private zone to the inbound endpoint | Its custom DNS setting sends every query to the hub inbound endpoint, which resolves the zone |
| Private zone linked to | The hub VNet (not the spoke) | The hub VNet, which holds the inbound endpoint |
| Control | Edit one ruleset to change every linked VNet | All DNS traffic flows to the hub |
| Loop risk | Don't link the ruleset (with the inbound-endpoint rule) to the hub | Don't add a rule that forwards the private zone to the inbound endpoint |
CLI and PowerShell
| Task | Azure CLI | PowerShell |
|---|---|---|
| Change the DNS servers of a VNet | az network vnet update --resource-group myResourceGroup --name myVNet --dns-servers 10.0.0.10 | $virtualNetwork.DhcpOptions.DnsServers.Add("10.0.0.10") then Set-AzVirtualNetwork -VirtualNetwork $virtualNetwork |
| Create a public DNS zone | az network dns zone create --resource-group MyResourceGroup --name contoso.com | New-AzDnsZone -Name contoso.com -ResourceGroupName MyDNSResourceGroup |
| Show a zone (and its name servers) | az network dns zone show --resource-group myresourcegroup --name contoso.com | - |
| List public DNS zones | az network dns zone list --resource-group MyResourceGroup | - |
| Add an A record | az network dns record-set a add-record -g MyResourceGroup -z contoso.xyz -n www -a 10.10.10.10 | - |
| Create a private DNS zone | az network private-dns zone create --resource-group MyAzureResourceGroup --name private.contoso.com | New-AzPrivateDnsZone -Name private.contoso.com -ResourceGroupName MyAzureResourceGroup |
| Link a VNet to a private zone with autoregistration | az network private-dns link vnet create --resource-group MyAzureResourceGroup --name MyDNSLink --zone-name private.contoso.com --virtual-network myAzureVNet --registration-enabled true | New-AzPrivateDnsVirtualNetworkLink -ZoneName private.contoso.com -ResourceGroupName MyAzureResourceGroup -Name "mylink" -VirtualNetworkId $vnet.id -EnableRegistration |
| Link a VNet for resolution only | az network private-dns link vnet create ... --registration-enabled false | New-AzPrivateDnsVirtualNetworkLink -ZoneName private.contoso.com ... (without -EnableRegistration) |
| List private DNS zones | az network private-dns zone list --resource-group MyAzureResourceGroup | - |
| Create a DNS Private Resolver | - | New-AzDnsResolver -Name mydnsresolver -ResourceGroupName myresourcegroup -Location westcentralus -VirtualNetworkId "/subscriptions/<your subs id>/resourceGroups/myresourcegroup/providers/Microsoft.Network/virtualNetworks/myvnet" |
| Create the inbound endpoint | - | New-AzDnsResolverInboundEndpoint -DnsResolverName mydnsresolver -Name myinboundendpoint -ResourceGroupName myresourcegroup -Location westcentralus -IpConfiguration $ipconfig |
| Create the outbound endpoint | - | New-AzDnsResolverOutboundEndpoint -DnsResolverName mydnsresolver -Name myoutboundendpoint -ResourceGroupName myresourcegroup -Location westcentralus -SubnetId /subscriptions/<your sub id>/resourceGroups/myresourcegroup/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/snet-outbound |
| Create a forwarding ruleset | - | New-AzDnsForwardingRuleset -Name myruleset -ResourceGroupName myresourcegroup -DnsResolverOutboundEndpoint $outboundendpoint -Location westcentralus |
Exam Tips
Tick each tip once you can answer it without looking.
“VMs in two different VNets must resolve each other's names with no DNS servers to manage” → A private DNS zone linked to both VNets (registration on one or both if you want automatic records).. Trap: Azure-provided DNS is scoped to one VNet, so it can't resolve names across VNets.
“What is 168.63.129.16?” → The Azure DNS virtual IP: static, gives resolution to VMs without custom DNS, and is the forwarder target for your own DNS servers.. Trap: You can't enter it as a destination in a Private Resolver forwarding rule, and it doesn't support reverse lookup.
“Custom DNS on the VNet, but VMs can't resolve a linked private zone” → Custom DNS overrides the default order. Forward to the Private Resolver inbound endpoint, or add a conditional forwarder to 168.63.129.16 for the zone.. Trap: Linking the zone is not enough once a custom DNS server is set.
“You changed the VNet DNS servers; VMs still use the old ones” → Renew the DHCP lease (ipconfig /renew) or restart the VM. Restart Azure Firewall and Application Gateway too.. Trap: Don't edit DNS settings inside the VM; they can be erased during service healing.
“A NIC has its own DNS servers and the VNet has others” → The NIC settings win.. Trap: DNS servers are used in order, not round-robin: the first reachable server is used even if unhealthy.
“Custom DNS is selected but the server list is empty” → The VNet ignores the setting and uses Azure-provided DNS.. Trap: Resolution doesn't break: the page says the VNet ignores the setting and uses Azure-provided DNS.
“Point contoso.com (apex) at a Traffic Manager profile or public IP” → An alias record set (A, AAAA or CNAME alias).. Trap: A real CNAME can't be created at the zone apex.
“Domain bought at a registrar; host it in Azure DNS” → Create the zone, add records, then set the registrar's NS records to all four Azure name servers.. Trap: You can't buy domains in Azure DNS, and vanity name servers in your own zone aren't supported.
“Two public zones with the same name in different resource groups” → Allowed, but each gets different name servers and only one set can be delegated at the registrar.. Trap: Duplicate names in the same resource group fail.
“VMs should register themselves in a private zone” → Link the VNet with autoregistration enabled (--registration-enabled true).. Trap: A VNet can have only one registration zone, and only the primary NIC is registered.
“Autoregistration for an internal load balancer or a second NIC” → Not automatic. Create those records manually.. Trap: Autoregistration covers VMs only, and PTR records aren't autoregistered.
“Different answer for the same name inside the VNet and from the internet” → Split-horizon: a public zone and a private zone with the same name.. Trap: A private zone can't have NS delegations, and its records aren't resolvable from the internet.
“Private endpoint for Blob storage; which zone” → privatelink.blob.core.windows.net linked to the VNet.. Trap: Automatic DNS configuration is generated only with the recommended zone names. Don't mix services in one zone.
“On-premises must resolve a private DNS zone” → DNS Private Resolver inbound endpoint; on-premises conditional forwarder points to its IP, over VPN or ExpressRoute.. Trap: An outbound endpoint sends queries out of Azure; it doesn't receive them.
“Azure must resolve on-premises names” → Outbound endpoint plus a forwarding ruleset with a rule for the on-premises domain, linked to the VNets.. Trap: A subnet for an endpoint is delegated only to Microsoft.Network/dnsResolvers and can't hold other resources.
“Spoke VNet must resolve the hub's private zone without linking the zone” → Link a ruleset with a rule forwarding the zone to the hub inbound endpoint (distributed), or set the spoke's custom DNS to that endpoint (centralized).. Trap: Never link that ruleset to the hub itself: DNS resolution loop.
“Two forwarding rules match a query” → The longest suffix (most specific domain) wins.. Trap: A shorter suffix, such as a wildcard rule, loses to a longer one.
Sources
- Name resolution for resources in Azure virtual networks
- Create, change, or delete a virtual network
- Azure Virtual Network FAQ
- Azure IP address 168.63.129.16
- Azure DNS overview
- What is Azure Public DNS?
- DNS zones and records overview
- Host your domain in Azure DNS
- Create a DNS zone (Azure CLI)
- Create a DNS zone (Azure PowerShell)
- Create a DNS zone and record (Azure CLI quickstart)
- Alias records overview
- Azure Private DNS overview
- Private DNS zone overview
- Virtual network links
- Autoregistration
- Scenarios for Azure Private DNS zones
- Fallback to internet for Private DNS zones
- Create a private DNS zone (Azure CLI)
- Create a private DNS zone (Azure PowerShell)
- Private endpoint private DNS zone values
- Azure DNS Private Resolver overview
- Private Resolver endpoints and rulesets
- Private Resolver architecture
- Reliability in Azure DNS Private Resolver
- Create a DNS Private Resolver (portal)
- Create a DNS Private Resolver (PowerShell)
- Resolve Azure and on-premises domains
Checked against Microsoft Learn on November 13, 2026.