One header longer than the field limit
- Status
- 400
- Error log line (abridged)
- AH00561: Request header exceeds LimitRequestFieldSize
Find which Apache check returned 400: header size and count limits, malformed URLs or Host headers, strict protocol parsing. Tested on Apache 2.4.62.
Apache httpd returns 400 when it cannot accept the request as sent. Tested on Apache 2.4.62: an oversized header, too many headers, a bad percent-encoded path and a malformed Host header each returned 400, while an oversized request line returned 414. The error log line names the check that fired.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
LimitRequestFieldSize 100, LimitRequestFields 5, LimitRequestLine 200) and sent one bad request per row. The log lines are the real ones at LogLevel debug./%zzThe surprise is the third row. An over-long URL is not a 400 here; it is a 414. The Apache docs for these directives say what the limits are, not which status each one produces, so treat the table as an observation from this version rather than a guarantee for every build.
The same directives carry these defaults in the docs: LimitRequestFieldSize 8190 bytes, LimitRequestFields 100 and LimitRequestLine 8190 bytes. The docs also note that SPNEGO authentication headers can be up to 12392 bytes, which is why Kerberos sites hit the field-size limit first.
httpd.apache.org, which answered 400 when I ran it:The same server answered 414 to a 9,000-character path and 200 to a 9,000-byte header, so its limits differ from the small test values above. Now check your own server. These commands need your host and port; replace example.test:
# 1. Header bigger than LimitRequestFieldSize (default 8190 bytes)
curl -s -o /dev/null -w "%{http_code}\n" -H "X-Pad: $(head -c 9000 /dev/zero | tr '\0' a)" http://example.test/
# 2. Malformed Host header
curl -s -o /dev/null -w "%{http_code}\n" -H "Host: bad host" http://example.test/
# 3. Invalid escape in the path
curl -s -o /dev/null -w "%{http_code}\n" --path-as-is "http://example.test/%zz"
# Expect: 400 for each on a default config; then read the error logThen run grep -E 'AH00561|AH00563|AH10244|AH00550' error.log. If the log shows nothing, raise LogLevel to info for core, because the header-limit lines above were written at info level in my test.
curl -s -o /dev/null -w "%{http_code}\n" --path-as-is "https://httpd.apache.org/%zz"
# Observed: 400LimitRequestFieldSize only if the client cannot changeLimitRequestFieldsServerName or ServerAliasStrictHostCheck OnStrict modeopenssl s_client needs -crlfThe field-size limit is allowed in server config and virtual host context. The Apache docs say that under normal conditions you should not change the default. If you must, raise it by the amount you measured, not to a round large number:
# Default is 8190. SPNEGO headers can reach 12392 bytes per the Apache docs.
LimitRequestFieldSize 16384The strict parser is the other lever. HttpProtocolOptions defaults to Strict LenientMethods Allow0.9, and the docs warn strongly against Unsafe on public servers. If a legacy monitoring tool on an internal network cannot be fixed, scope the relaxation to one virtual host that serves only that network:
<VirtualHost 10.0.0.5:8080>
ServerName monitor.internal.example
HttpProtocolOptions Unsafe
</VirtualHost>Google's documentation says it does not index URLs that return a 4xx status code and drops already-indexed URLs that start returning one, and that 4xx codes other than 429 do not change the crawl rate. A header-limit 400 usually depends on a client's cookies, so Googlebot often does not see it. A 400 on a clean request to a public URL is the case to fix: request it with curl and no cookies and read the log line. See also 400 on nginx and 413 on Apache.
2 questions people ask next, answered from the sources on this page.
On Apache 2.4.62 a request line over LimitRequestLine produced 414 in my test, while an oversized header produced 400. Check the error log line to see which limit fired.
In the error log. Lines such as AH00561, AH00563, AH10244 and AH00550 name the failed check, and a debug-level log adds the protocol detail.
Run the free audit, then approve the fixes. Every change can be undone.