Azure Application Gateway Forwarding without Listener

Britt Tucker 40 Reputation points
2026-08-10T16:14:43.77+00:00

In an effort to set up Azure Application Gateway to forward to an Azure Container Environment, I discovered that it was not routing to the the application I wanted. It was forwarding to a different backend pool.

Since this was for testing I removed the rule, backend setting, backend pool, and listener, however my client would still connect to that backend pool when I went to the name. (my client has a host file configured for that name.)

At this point I decided to try another name which didn't use any of the certificates that I had applied to the gateway, and it still forwarded to that same backend pool. (the backend pool is "training" which uses a wildcard certificate. This attached screenshot shows what I'm seeing.fcagw-fake.com-resolution

My questions is why is my gateway accepting/forwarding these requests? How do I prevent this. As I stated previously, the issue that made me discover this was that a legitimate set up I meant to connect to a container app environment, was resolving this back end pool as well. I will probably address that in a different post/ticket.

Thanks you.

Azure Application Gateway
Azure Application Gateway

An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.


1 answer

Sort by: Most helpful
  1. AI answer

    2026-08-10T16:15:07.9133333+00:00

    Application Gateway can still accept the request if another listener is matching it as a catch-all or wildcard listener and that listener’s rule routes to the training backend pool.

    The behavior shown matches these documented cases:

    1. A multi-site listener with no hostname acts as a catch-all
      If a listener is configured without a hostName, it matches any hostname not matched by other listeners.
    2. A wildcard listener can match before a more specific listener
      If a wildcard listener has higher priority than the intended specific listener, traffic is routed by the wildcard listener’s rule.
    3. Rules/listeners are what determine the backend pool
      Application Gateway evaluates the listener and associated routing rule, then sends the request to the backend pool selected by that rule.

    To prevent this:

    1. In Application Gateway > Listeners, check for:
      • any listener with a blank hostname
      • any wildcard listener such as *.domain.com
      • duplicate listeners on the same port
      • listeners on the wrong port that might still be matching traffic
    2. In Application Gateway > Rules, verify that:
      • the hostname being tested maps only to the intended listener
      • no wildcard or catch-all listener has a higher priority than the specific listener
      • no remaining rule still points to the training backend pool
    3. If the request is going to the wrong backend because of listener matching:
      • give the intended specific listener a higher precedence by using the correct priority
      • remove or correct any catch-all listener if it is not intentional
    4. If the backend is a multitenant PaaS target such as App Service, Azure Functions, or similar FQDN-based backend, also verify the HTTP settings Host header behavior. A wrong host header can make the request appear to land on the wrong app or return the wrong content.
    5. Check access logs to confirm which listener actually handled the request:
      • if listenerName_s is not the expected listener, it is a listener priority or catch-all/wildcard match issue
      • if listenerName_s shows the wildcard or catch-all listener, fix listener priority/configuration

    If all listener priorities and hostnames are correct but the problem persists, file an Azure support request.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

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.