D4 · Networking

DNS and Name Resolution

DNS is fundamental in Azure for resolving resource names, PaaS services, and hybrid connectivity. The AZ-104 evaluates public Azure DNS, private zones, resolution in , and integration with Private Endpoints.

Azure DNS — Public Zones

Azure DNS is a DNS zone hosting service that uses Azure's infrastructure for and global performance. It lets you manage your domains' DNS records from Azure.

Important: Azure DNS is NOT a domain registrar — you must register the domain with an external registrar (GoDaddy, Namecheap, etc.) and then delegate the DNS zone to Azure by changing the nameservers.

How delegation works

1You create the DNS zone in Azure DNS (e.g. contoso.com)
2Azure assigns 4 nameservers (ns1-04.azure-dns.com, etc.)
3At your domain registrar, you change the domain's NS records to Azure's
4All DNS traffic for contoso.com now resolves through Azure DNS

Advantages of Azure DNS

  • • Availability: global anycast — nameservers are distributed worldwide
  • • 100% for DNS resolution
  • • Integration with for access control over zones and records
  • • Alias records: point to Azure resources (Public IP, Traffic Manager, CDN) that change IPs
  • • No DNS servers of your own to manage — PaaS service
  • • DNSSEC support (preview/limited)

DNS record types

TypeFunctionExampleAZ-104 notes
AName → IPv4www → 1.2.3.4The most common. Use an Alias for Azure IPs.
AAAAName → IPv6www → 2001:db8::1For resources with IPv6.
CNAMEName alias → another namemail → contoso.mail.comCannot be used at the domain apex (root). Use an Alias record instead.
MXDomain's mail server10 mail.contoso.comLower priority = higher preference.
TXTArbitrary text"v=spf1 include:..."SPF, DKIM, domain verification (Azure AD, etc.).
NSNameservers for the zonens1-04.azure-dns.comAuto-generated by Azure DNS when the zone is created.
SOAStart of Authority — zone infoSerial, refresh, retry...Auto-generated and managed by Azure DNS.
SRVService location (host + port)_sip._tcp → sipserver:5060For services like SIP, LDAP, Kerberos.
PTRIP → name (reverse DNS)4.3.2.1.in-addr.arpa → wwwReverse resolution. In Azure: 168.63.in-addr.arpa zones.
AliasDirect reference to an Azure resourcewww → Public IP / Traffic ManagerAzure extension — updates automatically if the resource's IP changes.

Azure Private DNS Zones

Private DNS Zones let you use custom DNS names within a VNet without needing your own DNS servers. Records in the zone are only resolvable from linked VNets — not from the internet.

VM auto-registration

When you link a VNet to a Private DNS Zone with autoregistration enabled, VMs in that VNet automatically register their A and PTR records in the zone as they are created or deleted.

• Record: vm-name.private.contoso.com → 10.0.0.4

• Removed automatically when the VM is deleted

• Only one zone with auto-registration per VNet

• Does not work with private IPs of Private Endpoints (manual registration)

Virtual Network Links

For a VNet to resolve records from a Private DNS Zone, you must create a Virtual Network Link between the zone and the VNet.

• A zone can have links to multiple VNets (including peered VNets)

• Without a link: the VNet cannot resolve the private zone even if peering exists

• With peering: a spoke VNet can resolve the hub's zone if there is a link between the zone and the hub VNet (no direct link needed if the hub's DNS proxy forwards the queries)

DNS resolution in VNets

Azure-provided DNS (default)

  • •IP: 168.63.129.16 (special Azure address, not externally routable)
  • •Resolves: names of VMs in the VNet, linked Private DNS zones, public internet names
  • •Cannot forward queries to on-premises DNS servers
  • •Does not support native conditional forwarding

Custom DNS

  • •You configure the IPs of your own DNS servers on the VNet
  • •Useful for resolving on-premises names from Azure
  • •The custom DNS server must be able to forward to 168.63.129.16 to resolve Azure names
  • •Options: DNS server on an Azure VM, Azure DNS Private Resolver (recommended PaaS)

Azure DNS Private Resolver (recommended for hybrid)

A PaaS service that lets you resolve DNS names between Azure and on-premises without managing DNS VMs. It has two endpoints: Inbound (receives queries from on-premises) and Outbound (forwards queries from Azure to on-premises DNS according to a ruleset). Highly available and with no infrastructure to manage.

Did you get this topic?

Test what you just learned

A company has a Storage Account with a Private Endpoint configured on its VNet. Developers report that from inside the VNet, the storage's DNS name resolves to the public IP instead of the endpoint's private IP. What is the most likely cause?

Ready to test "DNS and Name Resolution"?

Put what you learned to the test with original AZ-104 exam questions.

Start AZ-104 mock exam

Unlimited mock exams with the Pro plan

Log in to track your progress.