After introducing Private DNS zones into a VNet-integrated environment with custom DNS servers, DNS resolution behavior changes due to zone precedence and authority rules.
This can result in previously working DNS lookups failing, not because DNS is broken, but because resolution is being intercepted earlier in the lookup chain.
Workload (APIM / VM)
→ Custom DNS (10.x.x.x)
→ Upstream DNS (Azure or Internet)
→ Public resolution succeeds
Workload
→ Custom DNS
→ Private DNS zone match
→ If record exists: success (private IP)
→ If record missing: NXDOMAIN (fail)
Private DNS zones are authoritative for matching domains.
- If a query matches a private zone, Azure does not fall back to public DNS.
- This is especially true for non-
privatelinkzones. - Missing records result in hard failures.
- The private DNS zone intercepts queries earlier.
- Previously, queries flowed to upstream DNS.
- Now, queries stop at the private zone.
- With no fallback, resolution fails.
| Zone Type | Fallback Behavior |
|---|---|
privatelink.* |
Optional fallback, if supported and enabled |
Non-privatelink |
No fallback |
The issue typically occurs when all three are present:
- Custom DNS servers (
10.x.x.x) - Private DNS zones linked to the VNet
- No fallback or forwarding strategy
Configure custom DNS servers to forward:
privatelink.azure-api.net → 168.63.129.16
privatelink.blob.core.windows.net → 168.63.129.16
privatelink.database.windows.net → 168.63.129.16
This ensures Azure-managed private endpoints resolve correctly.
All other queries should resolve publicly:
. (all domains) → 168.63.129.16
Alternative upstream resolvers:
8.8.8.8
1.1.1.1
Do not create private DNS zones for:
azure-api.net
blob.core.windows.net
database.windows.net
These override public DNS entirely and require full manual record management.
Client (APIM / VM)
↓
Custom DNS
IF domain = privatelink.*
→ Azure DNS (168.63.129.16)
→ Private IP
ELSE
→ Public DNS
→ Public IP
Client → Firewall (DNS Proxy)
↓
Forward to 168.63.129.16
Benefits:
- Centralized DNS control
- Consistent resolution across VNets
- Reduced configuration drift
nslookup google.com
nslookup <apim-name>.azure-api.net
nslookup <storage-account>.blob.core.windows.net
dig google.com
dig <apim-name>.azure-api.netnslookup google.com
nslookup <apim-name>.azure-api.netResolve-DnsName google.com
Resolve-DnsName <apim-name>.azure-api.netForce query to your custom DNS:
nslookup google.com 10.82.8.4
nslookup <apim-name>.azure-api.net 10.82.8.4Test Azure DNS directly:
nslookup google.com 168.63.129.16If DNS works but connectivity fails:
curl -I https://google.com
curl -I https://<apim-name>.azure-api.netaz network private-dns zone list -o tableaz network private-dns record-set a list \
--zone-name privatelink.azure-api.net \
--resource-group <rg> \
-o tableaz network private-dns link vnet list \
--zone-name privatelink.azure-api.net \
--resource-group <rg> \
-o tableaz network nic show \
--name <nic-name> \
--resource-group <rg> \
--query "dnsSettings"az network nic show-effective-route-table \
--name <nic-name> \
--resource-group <rg>| Symptom | Likely Cause |
|---|---|
| Public domains fail to resolve | Missing default forwarder |
| Private endpoints resolve, public fail | DNS forwarding issue |
| DNS resolves but requests fail | Firewall or routing issue |
| Intermittent failures | Split DNS or inconsistent forwarding |
- Private DNS zones override, not augment, DNS resolution.
- Non-
privatelinkzones have no fallback behavior. - Custom DNS must explicitly handle:
- Private resolution via conditional forwarding
- Public resolution via default forwarders
Private DNS introduces an authoritative layer. If it matches a query, it must return a valid record or the lookup fails.