Ingress hostname to use different domain than the .westeurope.cloudapp.azure.com

Raghu Nagabandi 0 Reputation points
2026-04-29T15:03:22.3166667+00:00

Hello,

We are deploying an application with Nginx Ingress with service type loadbalancer which also generates an external IP. we would like to use our company domain instead of .westeurope.cloudapp.azure.com while the configuration option in Public IP address only shows this domain.
How can we ensure the public ip is mapped to a hostname with our internal domain.
Is cname Entry mapping this public ip in the private dns zone the option? or are there other ways which are industry standards or usual ways.

Thank you,

Rags

Azure Load Balancer
Azure Load Balancer

An Azure service that delivers high availability and network performance to applications.

0 comments No comments

2 answers

Sort by: Newest
  1. Ravi Varma Mudduluru 12,625 Reputation points Microsoft External Staff Moderator
    2026-04-29T18:34:20.74+00:00

    Hello @ Raghu Nagabandi,

    Thank you for reaching out to Microsoft Q&A.

    You’re on the right track—there’s no magic switch in the Azure IP resource to swap out “.westeurope.cloudapp.azure.com” for your own domain, but you can absolutely make your custom hostname (e.g. app.contoso.com) resolve to your NGINX Ingress IP. Here are the common, industry-standard approaches:

    Reserve a static public IP

    • In your LoadBalancer Service definition, pick a Standard SKU public IP and give it a DNS label if you like (e.g. myapp-lb.westeurope.cloudapp.azure.com).

    • That label still lives under the Azure suffix, but the IP behind it is stable.

    Map your custom hostname

    Option A – A record in your external DNS

    • Create A record: app.contoso.com →

    • Pros: lowest DNS lookup latency, you control the pointer directly.

    Option B – CNAME record

    • Create CNAME: app.contoso.com → myapp-lb.westeurope.cloudapp.azure.com

    • Pros: if you swap out or reassign the IP to another load balancer (but keep the same Azure DNS label), you don’t have to touch your public DNS again.

    (Optional) Private DNS zone for internal name resolution

    • If you also need your in-VNet or on-prem clients to resolve app.contoso.com to the same IP privately, spin up an Azure Private DNS zone (contoso.com), link it to your VNet, and mirror the same A or CNAME record there.

    Advanced / managed-host scenarios

    • If you need more features global failover, geo-load balancing, DDOS protection, wildcard hosts or built-in certificate management you can front your NGINX Ingress with Azure Front Door, Traffic Manager or Application Gateway and map your custom domain there instead.

    Reference list

    • Use a static public IP with AKS NGINX Ingress: https://docs.microsoft.com/azure/aks/ingress-tls?tabs=azure-cli#use-a-static-public-ip-address

    • Route multiple hostnames on one IP with NGINX Ingress: https://docs.microsoft.com/azure/aks/aksarc/create-ingress-controller?tabs=azure-cli#use-ingress-to-route-http-traffic-to-multiple-host-names-on-the-same-ip-address

    • Custom DNS in Container Apps (for comparison): https://learn.microsoft.com/azure/container-apps/ingress-overview

    If the answer is helpful, please click "Accept Answer". If you have extra questions about this answer, please click "Comment".  

    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-04-29T15:03:36.81+00:00

    Use the public IP as-is and map the company domain to it via DNS; the .westeurope.cloudapp.azure.com name is optional and does not prevent use of a custom domain.

    Key points:

    1. Public IP DNS label vs. custom domain
      • When a DNS label is set on a public IP, Azure creates an FQDN like: contoso.westeurope.cloudapp.azure.com that resolves to that public IP.
      • This is just an Azure-managed DNS name. It does not limit using another domain.
      • For a custom domain (for example, app.company.com), use your own DNS (Azure DNS or another provider) to point to the same public IP.
    2. Using a company domain with a public IP
      • For services that use a public IP (Load Balancer, Application Gateway, VMs, etc.), the usual pattern is:
        • Create an A record in the public DNS zone for the company domain that points directly to the public IP address.
      • Example with Azure DNS:
        1. Go to the Public IP resource, open Configuration, and note the IP address.
        2. Go to the DNS zone for company.com.
        3. Add a record set:
          • Name: app (for app.company.com)
          • Type: A
          • IP address: the public IP of the load balancer/ingress.
      • This is the standard/industry approach when the IP is static.
    3. When to use CNAME instead
      • If the IP is dynamic or you prefer to reference the Azure-generated FQDN instead of the raw IP, create a CNAME record in your public DNS:
        • app.company.com CNAME contoso.westeurope.cloudapp.azure.com
      • DNS standards do not allow CNAME at the zone apex (e.g., company.com itself), but subdomains like app.company.com are fine.
    4. Private vs. public DNS
      • The public IP is for Internet-facing traffic. To expose the ingress externally under app.company.com, the record must be in a public DNS zone that clients on the Internet can resolve.
      • A CNAME or A record in a private DNS zone only affects name resolution for clients that use that private DNS; it does not change the public mapping.
      • Use a private DNS zone only if the application is meant to be reachable from internal networks (for example, via VPN/ExpressRoute) and the load balancer/ingress uses a private IP.
    5. Multiple hostnames on the same IP
      • Ingress can route HTTP(S) traffic for multiple hostnames on the same public IP. Configure multiple DNS records (A or CNAME) pointing to the same IP and define corresponding host rules in the Ingress resources.

    Summary:

    • Keep the Azure *.westeurope.cloudapp.azure.com label if useful, but it is not required.
    • For Internet-facing ingress with a static public IP, the usual pattern is:
      • Public DNS A record: app.company.com -> <public IP>.
    • Use CNAME to the Azure FQDN if the IP is dynamic or if that management model is preferred.
    • Private DNS zones only affect internal name resolution and do not replace public DNS for external clients.

    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    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.