Hello ReCloudS
Greetings!
I understand that you want to set up an application gateway in the frontend of your web app service.
The Application Gateway allows you to use an App Service app or other multi-tenant service as a backend pool member. App Service with Application Gateway This article explains how to configure an App Service app with Application Gateway. The configuration will vary based on how the App Service is accessed:
The first option uses a custom domain for both the Application Gateway and the backend App Service.
The second option allows the Application Gateway to access the App Service using its default domain, ending in ".azurewebsites.net".
Note: You also need to add an A record in the DNS zone pointing to the application gateway frontend IP. Only then will the traffic route via the application gateway. And remove the existing CNAME record those points to the web app in the DNS record.
Check the below reference documents:
- https://learn.microsoft.com/en-us/azure/architecture/best-practices/host-name-preservation
- https://learn.microsoft.com/en-us/azure/application-gateway/configure-web-app?tabs=customdomain%2Cazure-portal
Hope the above answer helps! Please let us know do you have any further queries.
Please do consider to “up-vote” wherever the information provided helps you, this can be beneficial to other community members.