Free auditStart free
GuideError · HTTP status codes

400 Bad Request in Apache httpd

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.

3 min
read
2
sources
Oct 31, 2026
updated
Scaplet Editorial Team
author
The short answer

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.

  1. Which Apache check returned the 400
  2. Reproduce and check it in 2 minutes
  3. Fixes by cause
  4. What it means for SEO and crawlers
30-second check

Where does your site stand?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode
02Check it

Reproduce and check it in 2 minutes

Start with a public Apache site. This sends a path with an invalid escape to 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:

Your own server: three requests, three different checks
# 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 log

Then 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.

Public Apache server: a bad percent escape
curl -s -o /dev/null -w "%{http_code}\n" --path-as-is "https://httpd.apache.org/%zz"
# Observed: 400
04Explained

What it means for SEO and crawlers

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.

Sources · 2

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • apache.org
  • google.com
  1. 01Apache HTTP Server 2.4: core features (LimitRequest directives, HttpProtocolOptions, StrictHostCheck)httpd.apache.org · checked 2026-11-01
  2. 02How HTTP status codes affect Google's crawlersdevelopers.google.com · checked 2026-11-01
Questions

Asked a lot.

2 questions people ask next, answered from the sources on this page.

01Why did my long URL return 414 instead of 400?

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.

02Where does Apache say why it returned 400?

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.

Free · 2 minutes

Tools point. Agencies advise. This one ships.

Run the free audit, then approve the fixes. Every change can be undone.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • 0→7 ChatGPT citations in six weeks Paylane