Private endpoints and DNS: why your private endpoint isn't being used
You created a private endpoint, but traffic still goes to the public IP. It's almost always DNS. How private endpoint name resolution works and how to fix it.
A private endpoint gives a PaaS service, such as a storage account, SQL database or Key Vault, a private IP address in your virtual network. Clients still connect using the normal public name, for example stdata.blob.core.windows.net. Whether they reach the private IP or the public one depends entirely on DNS.
- 01Client looks up stdata.blob.core.windows.net
- 02CNAME to privatelink name
- 03Private DNS zone answers 10.20.1.5
- 04Traffic stays on your network
How it should resolve
When a private endpoint exists, the public name becomes a CNAME to a privatelink name:
stdata.blob.core.windows.net
→ stdata.privatelink.blob.core.windows.net
→ 10.20.1.5 (inside your network)
→ public IP (everywhere else)Your network needs to answer the privatelink name with the private IP. That's the job of a private DNS zone, such as privatelink.blob.core.windows.net.
Inside Azure
- Create the private DNS zone. Usually the private endpoint wizard does this for you.
- Link it to every virtual network that needs to resolve it. In hub-and-spoke, link it to the hub, and make sure spokes use DNS that can resolve through the hub.
- Keep one zone per service type, shared across the estate, rather than a new zone per endpoint.
Common zone names
| Service | Private DNS zone |
|---|---|
| Blob storage | privatelink.blob.core.windows.net |
| Azure Files | privatelink.file.core.windows.net |
| Key Vault | privatelink.vaultcore.azure.net |
| Azure SQL Database | privatelink.database.windows.net |
| App Service and Functions | privatelink.azurewebsites.net |
Each sub-resource gets its own zone. A storage account with blob and file endpoints needs records in two zones.
From on-premises
On-premises DNS servers can't query the Azure-provided resolver at 168.63.129.16 directly. That address only works from inside Azure. The usual fix:
- Deploy an Azure DNS Private Resolver with an inbound endpoint in the hub.
- On on-premises DNS, create conditional forwarders for the public service domains (such as
blob.core.windows.net) pointing to the inbound endpoint's IP.
Troubleshooting
nslookup stdata.blob.core.windows.netRun it from the client that's failing. If you get a public IP back, DNS is the problem, not the private endpoint. Also check that the service's public network access setting matches your intent.
# PowerShell equivalent, showing the CNAME chain
Resolve-DnsName stdata.blob.core.windows.net | Format-Table Name, Type, IPAddress, NameHost- Forward the public service domain, not the privatelink one, from on-premises
- Avoid hosting privatelink zones on on-premises DNS: any account without a record there stops resolving
- Custom DNS servers in Azure must forward to 168.63.129.16
- Link private zones to the VNet your DNS servers or resolver live in
- Use Azure Policy to create DNS records when private endpoints are created