An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
No. Application Gateway can be the public entry point only when client DNS resolves the application host name to the Application Gateway frontend IP. For an App Service using the default *.azurewebsites.net host name, that host name is Azure-provided and not a DNS name that can be repointed to the Application Gateway frontend IP.
What is supported:
- Application Gateway in front of App Service with a custom domain
- Add an A record in the DNS zone that points the application host name to the Application Gateway frontend public IP.
- Remove the existing CNAME that points directly to the web app.
- Configure the Application Gateway listener for that host name and HTTPS.
- Use WAF on Application Gateway for inspection and protection.
- Application Gateway reaching App Service by its default backend host name
- The backend App Service can still be accessed by Application Gateway using the default
*.azurewebsites.netdomain. - If redirects from App Service return the backend host name, a rewrite rule can rewrite the
Locationheader to the Application Gateway host name. - Header rewrite is available only on Standard_v2 and WAF_v2.
- The backend App Service can still be accessed by Application Gateway using the default
What is not supported for the requirement stated:
- Keeping the exact public URL as
nationalgrid-nobilltool.azurewebsites.netand making Application Gateway the public entry point. - Configuring the default
azurewebsites.nethost name to resolve to the Application Gateway public IP.
Reason:
- Application Gateway accepts client traffic on its frontend IP through a configured listener.
- For internet-facing access, the application DNS name must resolve to that frontend public IP.
- The default
azurewebsites.netname resolves as an Azure-controlled App Service name, not as a customer-controlled DNS name that can be redirected to Application Gateway.
Recommended Microsoft-supported architecture when WAF is required:
- Use a custom domain for the public application URL.
- Point that custom domain to the Application Gateway frontend public IP.
- Configure an HTTPS listener on Application Gateway for that custom domain.
- Enable WAF v2 and manage protection through WAF policies.
- Keep the App Service as the backend, using either:
- the same custom host name, or
- the default
*.azurewebsites.netbackend host name, with header rewrite if needed for redirects.
If the requirement is to retain the exact azurewebsites.net public URL, the supported configuration in the provided material does not place Application Gateway as the public entry point for that same host name.
References: