@ReCloudS
You're on the right track. Since your CNAME record is already pointing to your Azure App Service, you don’t need to update anything at your domain provider when introducing the Azure Application Gateway. The CNAME ensures that requests to your custom domain (app.yourdomain.com
) resolve to the App Service, and that doesn't change just because you're adding an App Gateway in front of it.
Key Things to Consider:
CNAME Stays the Same
- If your DNS setup uses a CNAME pointing to
yourwebapp.azurewebsites.net
, you’re good.
- The App Service’s frontend IP remains the same, and clients will still resolve the domain via DNS.
Configuring App Gateway Backend Pool
- When setting up the backend pool in App Gateway, use the FQDN (
yourwebapp.azurewebsites.net
), not an IP.
- If you use private endpoints, you might need an internal VNet integration.
Ensure Traffic Goes Through App Gateway
- If you want to **enforce WAF protection**, restrict direct access to the App Service by setting up **Access Restrictions**.
- Allow only traffic coming from the **Application Gateway subnet** and block public access.
**WAF & Region Restriction Rules**
- Define custom WAF policies to block traffic from unwanted regions.
- Monitor WAF logs in **Azure Monitor** or **Log Analytics** to confirm it's working as expected.
When Would You Need a DNS Update?
- If you were using an A record (pointing to an IP instead of a CNAME), then you’d need to update it.
- If you wanted to force all traffic through the App Gateway, you could update the CNAME to point to the App Gateway’s frontend domain instead.You're on the right track. Since your CNAME record is already pointing to your Azure App Service, you don’t need to update anything at your domain provider when introducing the Azure Application Gateway. The CNAME ensures that requests to your custom domain (
app.yourdomain.com
) resolve to the App Service, and that doesn't change just because you're adding an App Gateway in front of it. Key Things to Consider:
- CNAME Stays the Same
- If your DNS setup uses a CNAME pointing to
yourwebapp.azurewebsites.net
, you’re good.
- The App Service’s frontend IP remains the same, and clients will still resolve the domain via DNS.
- Configuring App Gateway Backend Pool
- When setting up the backend pool in App Gateway, use the FQDN (
yourwebapp.azurewebsites.net
), not an IP.
- If you use private endpoints, you might need an internal VNet integration.
- Ensure Traffic Goes Through App Gateway
- If you want to enforce WAF protection, restrict direct access to the App Service by setting up Access Restrictions.
- Allow only traffic coming from the Application Gateway subnet and block public access.
- WAF & Region Restriction Rules
- Define custom WAF policies to block traffic from unwanted regions.
- Monitor WAF logs in Azure Monitor or Log Analytics to confirm it's working as expected.
When Would You Need a DNS Update?
- If you were using an A record (pointing to an IP instead of a CNAME), then you’d need to update it.
- If you wanted to force all traffic through the App Gateway, you could update the CNAME to point to the App Gateway’s frontend domain instead.
If you found it helpful, could you kindly click the “Accept Answer and upvote” on the post.
If you have any further queries, please let us know we are glad to help you.