Hello @Greg Pringle ,
Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.
I understand that you are trying to setup Azure Application gateway with an Azure static web app as backend and have configured end-to-end SSL where both uses HTTPS. You are able to connect to the backend static website successfully using https but when you access the external domain name, you get a 502 Bad Gateway with issue identified as "No IP Address Resolved: The host 'https' does not resolve to any IP Address".
If I understood your setup correctly, you've setup the Application gateway with the static web app as the backend pool and have configured a custom domain in your static web app which is not mapped to the Application gateway. And you are trying to access the Application gateway with that custom domain/external domain name. Please correct me if my understanding is wrong.
Refer: https://learn.microsoft.com/en-us/azure/static-web-apps/custom-domain
If you have set up a custom domain in your Static web app, you also need to make sure that the custom domain is mapped to the IP address/DNS name of your Application gateway for it to resolve the domain correctly.
You can refer the below tutorial which shows the custom domain setup for an App Service with Application Gateway (Static web app also requires similar setup).
As you can see in the configuring DNS section, DNS is relevant in two places:
- The DNS name, which the user or client is using towards Application Gateway and what is shown in a browser.
- The DNS name, which Application Gateway is internally using to access the App Service in the backend.
To route the user or client to Application Gateway using the custom domain, set up DNS using a CNAME alias pointed to the DNS for Application Gateway. To find the Application Gateway DNS address, please refer: https://learn.microsoft.com/en-us/azure/application-gateway/application-gateway-faq#where-do-i-find-the-application-gateway-ip-and-dns. Alternatively create an A record pointing to the Application gateway IP address directly. (For Application Gateway V1 the VIP can change if you stop and start the service, which makes this option undesired.)
App Service/Static web app should be configured so it accepts traffic from Application Gateway using the custom domain name as the incoming host. For more information on how to map a custom domain to the static web app, refer: https://learn.microsoft.com/en-us/azure/static-web-apps/custom-domain-external
More information about such type of setups can be found in the below doc for your reference:
Once you make sure that both your Application gateway and Static web app are configured to resolve to the custom domain, you should be able to access the external domain name without issues.
Kindly let us know if the above helps or you need further assistance on this issue.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.