Original publish date: June 9, 2026KB ID:Â 5102602
Introduction
HTTP headers are name-value pairs included in HTTP requests and responses. In Windows environments, client components such as WinHTTP and WinINet, and server components such as IIS, use headers to exchange metadata and control request and response behavior.
Windows supports HTTP headers across HTTP/1.1, HTTP/2, and HTTP/3. Although these protocol versions transmit headers differently, Windows applies standard HTTP header semantics. Administrators can configure header-processing limits, including a registry setting that controls the maximum number of headers allowed in HTTP/2 and HTTP/3 requests for the requests to be accepted by the HTTP server.
Take action
After you install a Windows update released on or after June 9, 2026, you can use the MaxHeadersCount registry setting to limit the number of headers that can be included in HTTP/2 and HTTP/3 requests for the requests to be accepted by the HTTP server.
This setting limits the maximum number of headers that can be included in an HTTP/2 or HTTP/3 request. Limiting HTTP headers can help protect systems and servers from excessive memory use, high CPU consumption, and denial-of-service attacks. Because HTTP/2 (HPACK) or HTTP/3 (QPACK) header compression is used and more complex protocol processing, enforcing a header limit such as MaxHeadersCount can help maintain performance and reliability. Please note that depending on another existing setting MaxRequestBytes, HTTP.sys may further increase this header limit that is actually enforced.Â
IMPORTANT This section, method, or task contains information about how to change the registry. However, serious problems might occur if you change the registry incorrectly. Therefore, make sure that you make the changes carefully. For added protection, back up the registry before you change it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, see How to back up and restore the registry in Windows.Â
Configure the registry value MaxHeadersCount as follows:
|
Registry location |
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP\Parameters |
|
Value name |
MaxHeadersCount |
|
Value type |
REG_DWORD |
|
Supported values |
Default: 200 Minimum: 50 Maximum: 65535 |
|
Notes |
The default value can vary depending on whether the MaxRequestBytes value is also used. |
For the change to take effect, restart the computer after you create or update the MaxHeadersCount registry value.