Bad characters in the URL
- Who owns it
- Visitor, script or linking site
- Where to look
- The raw request URL
- Fix
- Percent-encode special characters; Cloudflare returns a 400 for an unencoded special character
HTTP 400 means the server rejected the request as malformed. See the usual causes, how visitors clear it, and how developers fix it on nginx, Apache and Cloudflare.
HTTP 400 Bad Request means the server cannot or will not process a request because it looks like a client error, such as malformed syntax, broken message framing or deceptive routing. MDN says to expect that repeating the same request will fail the same way. Visitors can check the URL and clear site cookies. Developers should inspect the exact request and the limits on headers.
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.
400 response should expect that repeating the request without modification will fail with the same error."400 is the catch-all for a request that the server could not make sense of. It is different from a 404, where the request was fine but nothing exists at that URL, and from a 405, where the method is not supported for the resource. When the request is well-formed but clashes with the resource's current state, that is the job of a 409.
Most 400s are caused by the client or by something that changed the request on its way: a browser extension, a proxy, an API client or a script. Occasionally the server's own limits are too tight for normal traffic.
Content-TypeContent-Length and Transfer-Encoding togetherlarge_client_header_buffers; Apache LimitRequestFieldSize caps header sizeHost header linesHost header; RFC 9112 requires a 400 otherwiseThe Cloudflare 400 page lists the unencoded-character and framing cases above. For the framing case, RFC 9112 says a message with both headers has its Content-Length overridden by Transfer-Encoding, might indicate an attempt at request smuggling, and ought to be handled as an error. Cloudflare returns a 400. RFC 9112 also says a server must respond with a 400 to an HTTP/1.1 request that lacks a Host header or carries more than one.
Causes and fixes differ by server and platform. See the 400 guides for Chrome, nginx.
Remove odd characters, pasted spaces or an extra copy of the address. Load the page again from the site's home page.
An oversized or corrupt cookie travels in a header field on every request. Clearing cookies for the one site is enough, and keeps your other logins.
If the page loads there, an extension or stored data is changing your requests.
Anything that edits headers or routes traffic can produce a malformed request.
If it still fails on a clean browser, the site is rejecting normal traffic. Tell the owner the exact URL and time.
Use curl -v or the browser's Network panel and copy the request line, headers and body. A 400 often hides in a single header or a stray character.
APIs usually say what was wrong. MDN's example returns a JSON body with a message field so the client can fix the request and retry.
nginx returns 400 when a request header field exceeds one buffer of large_client_header_buffers (default 4 8k), and 414 when the request line does. Apache's LimitRequestFieldSize and LimitRequestLine both default to 8190 bytes.
Send the same request to the origin and through the CDN. If only the proxied request fails, the proxy is rejecting or rewriting it.
http {
large_client_header_buffers 4 16k;
}Google treats a 400 like other 4xx errors except 429: it tells the next processing system that the content doesn't exist. A URL that was indexed and starts returning 400 is removed from the index, and Google's crawl frequency for it gradually decreases. If Search Console reports 400s, check that your own links, sitemaps and redirects don't produce malformed URLs. See 4xx errors for how to audit them.
4 questions people ask next, answered from the sources on this page.
The server cannot or will not process the request because it looks like a client error: malformed syntax, invalid message framing or deceptive routing. RFC 9110 defines it. MDN says clients should expect that repeating it without changes fails the same way.
Check the URL, clear cookies for the site, and retry. If you build the client, capture the exact request, validate its body and headers, and read the response message. Server owners should check header size limits.
A 400 means the request itself was malformed or invalid. A 409 means the request was understood but conflicts with the current state of the resource, and the user might be able to resolve the conflict and resubmit.
Usually the request is at fault, but the cause can be a browser extension, a proxy, or server limits set too low. A clean browser and a copied curl request separate the cases.
Run the free audit, then approve the fixes. Every change can be undone.