404 not found after setting app the configuration for Application Gateway

OTDCP Administrator 0 Reputation points
2025-10-06T04:51:56.34+00:00

404 not found after setting app the configuration for Application Gateway

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Thanmayi Godithi 1,635 Reputation points Microsoft External Staff Moderator
    2025-10-06T06:56:31.77+00:00

    Hi @OTDCP Administrator,

    Thanks for reaching out on Microsoft Q&A forum.

    I understand you're seeing a “404 Not Found” error after setting up your Application Gateway. That can be frustrating, but we’ll work through it together.

    This error usually means the gateway is unable to successfully route your request to the backend application.User's imageReference:404--page-not-found

    To help narrow down the cause, I’d recommend a few steps:

    Could you please try bypassing the Application Gateway and accessing your backend application directly using its IP address or FQDN and port (for example, http://<backend-ip>:<port>).

    • If you still get a 404 error, the issue might be with the backend app itself, maybe the requested path doesn’t exist, or the server isn’t configured to handle it.
    • But if the backend responds correctly, then the issue likely lies in the gateway configuration possibly the routing rule or probe settings.

    Also check the backend health status in the Azure portal. If the backend is marked as “Unhealthy,” it could be due to incorrect IP/FQDN, port mismatch, or even firewall rules blocking traffic. If it’s “Healthy,” that’s a good sign — it means the gateway can reach your backend.

    Reference: application-gateway-backend-health-troubleshooting

    Next, please verify that your HTTP listener and routing rules are correctly configured. The listener should match the hostname and port you're using, and the routing rule should point to the right backend pool and HTTP settings.

    Reference: listener-type

    Speaking of probes, if you’ve set up a custom probe, make sure the path exists and returns a 200 OK response. A misconfigured probe can cause the gateway to mark the backend as unhealthy even if it’s working fine.

    Reference: application-gateway-probe-overview

    Lastly, it’s worth checking your backend application logs to see if the request is reaching the server and how it’s being handled.

    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.

    0 comments No comments

  2. Alex Burlachenko 18,310 Reputation points Volunteer Moderator
    2025-10-06T08:29:11.7433333+00:00

    hi OTDCP Administrator,

    you've set it up, but it's returning a 404, which means the gateway itself is working, but it can't find the backend resource you've configured.

    a 404 from the application gateway usually points to one of a few common configuration mistakes.

    look at your http settings. make sure you have a custom probe configured and that the path is correct. a bad health probe will cause the gateway to think your backend is unhealthy and return a 404. the probe should point to a valid, simple endpoint on your backend app that returns a 200 status code, like / or /health.

    check the backend pool. is it pointing to the correct target? if you're using an fqdn, make sure it resolves correctly. if you're using ip addresses, verify they are correct and that the backend server is running and accessible from the gateway's subnet.

    another common culprit is the listener. make sure the host name and port in your listener match exactly what you're using to test the gateway. even a small typo here will cause a 404.

    also, check the routing rule. it must correctly link your listener to the backend pool and the http settings.

    double check your health probe path, verify the backend pool target is correct and healthy, and ensure your listener and routing rules are properly connected.

    regards,

    Alex

    and "yes" if you would follow me at Q&A - personaly thx.
    P.S. If my answer help to you, please Accept my answer
    

    https://ctrlaltdel.blog/

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.