Azure Private DNS

Handian Sudianto 7,676 Reputation points
2026-11-17T04:27:33.0866667+00:00

I have an Azure Event Hub with a private endpoint configured. When the private endpoint is created, a private DNS zone named privatelink.servicebus.windows.net is also created.

For example, my Event Hub namespace is named event1.

I then configured a conditional DNS forwarder on my internal DNS server to forward the domain servicebus.windows.net.

I have the following questions:

Why should the conditional forwarder be configured for servicebus.windows.net instead of privatelink.servicebus.windows.net?

When I ping event1.servicebus.windows.net, the DNS resolution returns event1.privatelink.servicebus.windows.net instead of event1.servicebus.windows.net. Why does this happen?

User's image

Azure DNS
Azure DNS

An Azure service that enables hosting Domain Name System (DNS) domains in Azure.

0 comments No comments

2 answers

Sort by: Oldest
  1. AI answer

    2026-11-17T04:28:25.2833333+00:00

    Configure the conditional forwarder for servicebus.windows.net; clients continue using event1.servicebus.windows.net, and Azure DNS follows its CNAME to event1.privatelink.servicebus.windows.net, where the private DNS zone returns the private endpoint’s A record.

    Why forward servicebus.windows.net?

    For Azure Event Hubs, Microsoft defines:

    • Client/public FQDN suffix: servicebus.windows.net
    • Private DNS zone: privatelink.servicebus.windows.net
    • Recommended conditional-forwarding zone: servicebus.windows.net ^1^

    Applications and connection strings query the normal namespace name:

    event1.servicebus.windows.net
    

    The resolution sequence is:

    event1.servicebus.windows.net
        CNAME → event1.privatelink.servicebus.windows.net
        A     → <private-endpoint-private-IP>
    

    Forwarding the public service zone ensures the initial query enters the Azure-aware resolution path. Azure’s Private Link guidance explicitly requires forwarding the recommended public DNS zone—for example, servicebus.windows.net for Event Hubs—rather than only its privatelink zone ^2^.

    If only privatelink.servicebus.windows.net were forwarded, the first lookup for event1.servicebus.windows.net could be answered elsewhere. That resolver might return the public resolution path or fail to send the complete lookup through the resolver that can access the Azure private DNS zone.

    For an on-premises DNS server, the forwarder should point to either:

    • An Azure DNS Private Resolver inbound endpoint, or
    • A DNS forwarder hosted in the Azure VNet linked to the private DNS zone.

    That Azure-side resolver can then query Azure-provided DNS. Do not point an on-premises server directly to [IP Address]; that address is reachable only from within an Azure VNet ^3^.

    This is expected CNAME behavior, not a hostname replacement.

    Azure publishes a CNAME that redirects the ordinary Event Hubs namespace name to its Private Link name. Your private DNS zone then supplies the A record containing the private endpoint IP. Existing applications therefore continue using event1.servicebus.windows.net; they should not be changed to use the privatelink hostname directly ^1^.

    Windows ping displays the canonical name obtained after following the CNAME:

    Pinging event1.privatelink.servicebus.windows.net [10.x.x.x]
    

    The important result is the address in brackets:

    • Private IP: DNS resolution is working as intended.
    • Public IP: the private zone, VNet link, A record, or forwarding path is not being applied.
    • NXDOMAIN: the private zone was reached but lacks the required record, or forwarding is incomplete.

    Microsoft’s Service Bus private-endpoint validation likewise expects nslookup event1.servicebus.windows.net to return the privatelink alias and a private IP ^4^.

    Use nslookup or PowerShell to inspect DNS more clearly:

    Resolve-DnsName event1.servicebus.windows.net |
        Select-Object Name, Type, NameHost, IPAddress
    

    Expected output includes:

    1. A CNAME targeting event1.privatelink.servicebus.windows.net.
    2. An A record containing the private endpoint IP.

    The ICMP timeouts in the screenshot do not invalidate the DNS result. ping combines a DNS lookup with an ICMP connectivity test; successful name resolution does not require the destination service to answer ICMP. Validate Event Hubs connectivity using the applicable application protocol rather than ICMP. For Service Bus/Event Hubs private connectivity, relevant network checks include AMQP ports 5671/5672, or port 443 when using WebSockets ^4^.


    References

    1. Azure Private Endpoint private DNS zone values
    2. Azure Private Endpoint DNS integration Scenarios
    3. Troubleshoot private endpoint DNS resolution failure in Azure Private Link
    4. Allow access to Azure Service Bus namespaces via private endpoints
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

  2. Marcin Policht 113.6K Reputation points MVP Volunteer Moderator
    2026-11-17T12:04:15.4233333+00:00

    The conditional forwarder should be configured for servicebus.windows.net because this is the DNS namespace used by Event Hubs clients to access the Event Hubs service. When a client attempts to connect to event1.servicebus.windows.net, its DNS query is sent to your internal DNS server. The conditional forwarder ensures that queries for this namespace are forwarded to Azure DNS (typically through an Azure DNS Private Resolver or a DNS forwarder in the Azure virtual network) so that Azure can resolve the name using the private DNS zone associated with the private endpoint. Configuring the forwarder for privatelink.servicebus.windows.net alone would not cover the original DNS query for event1.servicebus.windows.net, because that query does not initially target the privatelink namespace.

    The DNS resolution returns event1.privatelink.servicebus.windows.net because Azure uses a CNAME record to redirect the original service hostname to the private-link hostname. The resolution process is effectively event1.servicebus.windows.net → event1.privatelink.servicebus.windows.net → private IP address of the Event Hubs private endpoint. The first name is the normal public service endpoint, while the second name is associated with the private endpoint and has an A record in the privatelink.servicebus.windows.net private DNS zone. When the DNS query is resolved through the private DNS infrastructure, the CNAME chain ultimately returns the private IP address rather than the public IP address.

    In other words, servicebus.windows.net is the namespace that clients use, while privatelink.servicebus.windows.net is the namespace Azure uses to resolve the service hostname to the private endpoint's IP address. This is why the conditional forwarder targets the former, even though the private DNS zone is configured for the latter.


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.