Greetings!
Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well
For your domain tileshar****.co.uk, I noticed that an A record is mapped to two IP addresses. Please ensure that a proper A record is mapped to the application gateway IP and test it accordingly.
NOTE: Avoid mapping multiple A records to a single domain.
After mapping a proper A record, if the issue persists, directly access your Backend URL to check whether your backend is functioning correctly.
If your backend is not working, the issue originates from your backend, and you will need to resolve this with your internal team.
If your backend is working fine, proceed with further troubleshooting steps.
After you configure an application gateway, one of the errors that you may see is Server Error: 502 - Web server received an invalid response while acting as a gateway or proxy server. This error may happen for the following main reasons:
- NSG, UDR, or Custom DNS is blocking access to backend pool members.
- Backend VMs or instances of virtual machine scale set aren't responding to the default health probe.
- Invalid or improper configuration of custom health probes.
- Azure Application Gateway's backend pool isn't configured or empty.
- None of the VMs or instances in virtual machine scale set are healthy.
- Request time-out or connectivity issues with user requests.
Refer: https://learn.microsoft.com/en-us/azure/application-gateway/application-gateway-troubleshooting-502
If above is unclear and/or you are unsure about something add a comment below.
Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.
Regards,
Ganesh