An Azure service that delivers high availability and network performance to applications.
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:
- 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.comthat 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.
- When a DNS label is set on a public IP, Azure creates an FQDN like:
- 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:
- Go to the Public IP resource, open Configuration, and note the IP address.
- Go to the DNS zone for
company.com. - Add a record set:
- Name:
app(forapp.company.com) - Type:
A - IP address: the public IP of the load balancer/ingress.
- Name:
- This is the standard/industry approach when the IP is static.
- For services that use a public IP (Load Balancer, Application Gateway, VMs, etc.), the usual pattern is:
- 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.comitself), but subdomains likeapp.company.comare fine.
- 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:
- 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.
- The public IP is for Internet-facing traffic. To expose the ingress externally under
- 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
hostrules in the Ingress resources.
- 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
Summary:
- Keep the Azure
*.westeurope.cloudapp.azure.comlabel 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>.
- Public DNS A record:
- 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: