Share via

Application Gateway RFC9112 implementation, reject multi host header requests

Luis Manteiga Fustes 20 Reputation points
2026-03-27T05:38:17.0466667+00:00

Hi,

We have received the following notification from Azure:

PQHV-ZK0

TYPE:

ActionRequired

STATUS:

COMMUNICATION:

You’re receiving this notice because you use Azure Application Gateway.

Azure Application Gateway will enforce compliance with the RFC standard RFC9112 as part of a security update. On 00:00 UTC on 15 April 2026, Azure Application Gateway will require that all incoming client requests include only one Host header. Requests containing multiple Host headers will be rejected with a 400 (Bad Request) response. Please review your client requests to ensure they comply with this requirement.

Example of a non-compliant request:

GET /admin HTTP/1.1

Host: www.example.com, internal.example.net

Impacted resources include SubscriptionId: {SubscriptionID}, GatewayName: {GatewayName}, and observed Hosts: {Host1, Host2}.

Required Action

To avoid any service disruptions, update all clients to send only a single Host header by 00:00 UTC on 15 April 2026.

According to the information provided, starting April 15th, all requests reaching Application Gateways with multiple Host headers will return a 400 response. I understand this should not be a common scenario; however, given the potential impact and the proximity of the date, I have tried to assess how this change might affect us.

Based on the logs we currently have, the only option I have found is to use the Host field from the AGWAccessLogs table. However, this only covers cases where no rewrite is applied, which represent a minority in our environment.

Could you advise on how we could further validate or ensure that this change will not have any impact on our systems?

Thanks in advance

Luis

Azure Application Gateway
Azure Application Gateway

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


Answer accepted by question author
  1. Q&A Assist
    2026-03-27T05:38:37.6966667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Application Gateway already treats malformed or non‑RFC-compliant requests as client errors and returns 4xx responses, including 400 for bad requests. The announced change is a tightening of RFC compliance specifically for multiple Host headers.

    From the available information, the following points are relevant for validation and impact assessment:

    1. Application Gateway relies on the HTTP/1.1 Host header for routing
      • Multi-site hosting on a single public IP and port is based on the HTTP/1.1 Host header and, for TLS, SNI.
      • Because routing depends on a single Host header, multiple Host headers are inherently nonstandard and not required for normal operation.
      • Application Gateway can’t delete the Host header via header rewrite rules, which ensures that a valid Host header is always present for routing.
    2. 400 responses are already used for malformed/non‑RFC requests
      • Application Gateway returns HTTP 400 when the request is not compliant with RFC, including malformed headers and invalid Host values.
      • Examples of non‑compliant requests that already result in 400 include:
        • Invalid Host in request line (for example, host containing two colons).
        • Missing Host header.
        • Malformed characters in the request.
        • Invalid HTTP version or method.
        • Duplicate headers.
      • The new behavior (rejecting multiple Host headers) is consistent with this existing pattern of rejecting malformed or ambiguous Host information.
    3. How to validate impact with current tooling
      • Application Gateway metrics and diagnostic logs already capture 4xx/5xx distributions and detailed request information (URI, client IP, response code).
      • To assess impact:
        1. Enable and review Application Gateway diagnostic logs if not already enabled, focusing on 400 responses.
        2. Use the existing logs to identify patterns of 400 responses that might be related to malformed Host headers or duplicate headers.
        3. Correlate requests using X-appgw-trace-id (presented to the backend and logged via the transactionId field in diagnostic logs) to trace problematic requests end-to-end.
      • Because the Host header cannot be deleted by rewrite rules, and Application Gateway preserves or overrides the Host in a controlled way, any client sending multiple Host headers would already be considered nonstandard and likely visible as 4xx/400 patterns in logs.
    4. Why the change is unlikely to affect normal clients
      • Normal HTTP/1.1 clients send exactly one Host header; multiple Host headers are non‑compliant with the HTTP specification.
      • Application Gateway’s design assumes a single Host header for:
        • Multi-site routing on a single IP/port.
        • TLS SNI-based routing.
      • Existing guidance emphasizes preserving or cleanly overriding a single Host header between reverse proxies and backends; there is no supported scenario that depends on multiple Host headers.

    Given the available data, the practical validation path is:

    1. Ensure Application Gateway diagnostic logging is enabled.
    2. Analyze recent 400 responses to detect any systematic pattern that could indicate malformed Host usage or duplicate headers.
    3. Confirm that no upstream component (CDN, custom proxy, firewall) is intentionally injecting multiple Host headers; such behavior would already be non‑RFC-compliant and should be corrected.

    If no abnormal 400 patterns or upstream header manipulations are found, the environment is effectively operating with single Host headers today, and the enforcement on 15 April 2026 should not introduce new impact.


    References:

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Ravi Varma Mudduluru 9,200 Reputation points Microsoft External Staff Moderator
    2026-03-27T07:08:03.2633333+00:00

    Hello @Luis Manteiga Fustes,

    Thanks for reaching out to Microsoft Q&A.

    You're right that the standard Host field in AGWAccessLogs only captures the final (post-rewrite) value, so it won't surface every case where a client is sending multiple Host headers.

    Microsoft has already detected and logged the non-compliant traffic (including the specific observed Hosts for your gateway), so any impact is confirmed at the platform level. No further log mining is really needed to prove exposure.

    1. Target the observed Hosts listed in the notification these point directly to the clients, scripts, proxies, or CDNs that are adding the extra Host header.
    2. Review anything sitting in front of the Application Gateway (load balancers, reverse proxies, API gateways, or custom HTTP clients). Make sure they forward only the original Host and don’t duplicate or append a second one.
    3. Update any legacy code or libraries that manually set the Host header (most modern ones already send just one automatically).
    4. Test the behavior yourself right now with this quick curl command (it will start returning 400 after the change):

    Bash

    curl -v -H "Host: www.example.com" -H "Host: internal.example.net" https://<your-gateway-hostname>/
    

    Once all upstream clients and proxies are updated to send exactly one Host header, the traffic will be fully compliant with RFC 9112 and the issue will be resolved. No further action is required on the Application Gateway after that point.

    User's image

    Reference :
    https://learn.microsoft.com/en-us/troubleshoot/azure/application-gateway/http-response-codes
    https://learn.microsoft.com/en-us/azure/application-gateway/monitor-application-gateway-reference

    Kindly let us know if the above helps or you need further assistance on this issue.

    Please "Accept Answer" if the information helped you. This will help us and others in the community as well.

    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.