# HTTP 400 Bad Request

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

Canonical: https://scaplet.com/errors/http/400

Guide Error · HTTP status codes

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.

5 min

read

7

sources

Oct 21, 2026

updated

Scaplet Editorial Team

author

400 4xx · Client error

The short answer

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.

1. [What does HTTP 400 mean?](#what-does-http-400-mean)
2. [Who causes it and what to check](#who-causes-it-and-what-to-check)
3. [How a visitor gets past a 400](#how-a-visitor-gets-past-a-400)
4. [How a developer finds the cause](#how-a-developer-finds-the-cause)
5. [What it does to SEO](#what-it-does-to-seo)

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 with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F400%20(%22HTTP%20400%20Bad%20Request%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F400%20(%22HTTP%20400%20Bad%20Request%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F400%20(%22HTTP%20400%20Bad%20Request%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F400%20(%22HTTP%20400%20Bad%20Request%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

_01_Explained

## What does HTTP 400 mean?

RFC 9110 says the 400 (Bad Request) [status code](/glossary/http-status-codes) indicates that the server cannot or will not process the request due to something perceived to be a client error. Its examples are malformed request syntax, invalid request message framing and deceptive request routing. MDN adds a practical rule: "Clients that receive a `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](/errors/http/404), where the request was fine but nothing exists at that URL, and from a [405](/errors/http/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](/errors/http/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.

_02_Common causes of a 400

## Who causes it and what to check

Cause

### 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

Cause

### Invalid body, such as broken JSON

Who owns it

API client

Where to look

The request body and `Content-Type`

Fix

Validate the payload before sending; read the error message in the response

Cause

### Conflicting framing headers

Who owns it

Client or proxy

Where to look

`Content-Length` and `Transfer-Encoding` together

Fix

Send one framing method only; Cloudflare returns a 400 for requests that carry both

Cause

### Request header field too large

Who owns it

Client (often cookies) or server limits

Where to look

nginx `large_client_header_buffers`; Apache `LimitRequestFieldSize` caps header size

Fix

Clear the cookies for that site, or raise the limit if normal traffic needs it

Cause

### Missing or repeated Host header (HTTP/1.1)

Who owns it

Client or proxy

Where to look

The request's `Host` header lines

Fix

Send exactly one valid `Host` header; RFC 9112 requires a 400 otherwise

The 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](/errors/http/400/chrome), [nginx](/errors/http/400/nginx).

_03_How it works

## How a visitor gets past a 400

1. 01

### Check the URL

Remove odd characters, pasted spaces or an extra copy of the address. Load the page again from the site's home page.
2. 02

### Clear cookies for that site only

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.
3. 03

### Try a private window

If the page loads there, an extension or stored data is changing your requests.
4. 04

### Turn off extensions and VPNs briefly

Anything that edits headers or routes traffic can produce a malformed request.
5. 05

### Report it

If it still fails on a clean browser, the site is rejecting normal traffic. Tell the owner the exact URL and time.

_04_How it works

## How a developer finds the cause

1. 1

### Capture the exact request

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

### Read the response body

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

### Check header and line limits

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

### Check each layer

Send the same request to the origin and through the CDN. If only the proxied request fails, the proxy is rejecting or rewriting it.

Raise header buffers only if real traffic needs it

```
http { large_client_header_buffers 4 16k; }
```

**Apache's custom error pages may not apply**Apache's `ErrorDocument` docs say that when a malformed request is detected, normal request processing halts and the internal error message is returned. A custom 400 page may not show for the worst requests.

_05_Explained

## What it does to SEO

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](/glossary/google-search-console) reports 400s, check that your own links, sitemaps and redirects don't produce malformed URLs. See [4xx errors](/seo-issues/4xx-errors) for how to audit them.

Questions

## Asked a lot.

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

_01_ What does HTTP status 400 mean?

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.

_02_ How do I fix an HTTP 400 error?

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.

_03_ What is the difference between HTTP 400 and 409?

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.

_04_ Is a 400 error my fault or the website's?

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.

Sources · 7

## Every fact, linked and dated.

Official docs first. The date is when we last opened each page.

- rfc-editor.org
- mozilla.org
- cloudflare.com
- nginx.org
- apache.org
- google.com

1. 01 [RFC 9110: HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html) rfc-editor.org · checked 2026-10-25
2. 02 [RFC 9112: HTTP/1.1](https://www.rfc-editor.org/rfc/rfc9112.html) rfc-editor.org · checked 2026-10-25
3. 03 [400 Bad Request - HTTP - MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/400) developer.mozilla.org · checked 2026-10-25
4. 04 [Error 400: Bad Request - Cloudflare Support docs](https://developers.cloudflare.com/support/troubleshooting/http-status-codes/4xx-client-error/error-400/) developers.cloudflare.com · checked 2026-10-25
5. 05 [Module ngx_http_core_module - nginx documentation](https://nginx.org/en/docs/http/ngx_http_core_module.html) nginx.org · checked 2026-10-25
6. 06 [Core Features - Apache HTTP Server 2.4](https://httpd.apache.org/docs/2.4/mod/core.html) httpd.apache.org · checked 2026-10-25
7. 07 [How HTTP status codes affect Google's crawlers](https://developers.google.com/crawling/docs/troubleshooting/http-status-codes) developers.google.com · checked 2026-10-25

## Keep learning

[All errors](/errors)

[Learn HTTP 405 Method Not Allowed HTTP status codes](/errors/http/405) [Related 4xx errors Status codes and links](/seo-issues/4xx-errors) [Read next 404 Not Found HTTP status codes](/errors/http/404) [Do Run a free site audit Free, about two minutes](/site-audit)

Other 400 errors
[400 Bad Request in nginx](/errors/http/400/nginx) [400 Bad Request in Spring Boot](/errors/http/400/spring-boot) [CloudFront 400: Bad Request](/errors/cdn/cloudfront-400) [400 Bad Request in Apache httpd](/errors/http/400/apache) [400 Bad Request in Chrome](/errors/http/400/chrome)

More in HTTP status codes
[511 Network Authentication Required](/errors/http/511) [5xx errors](/errors/http/5xx-errors) [HTTP 200 OK](/errors/http/200) [HTTP 201 Created](/errors/http/201) [HTTP 204 No Content](/errors/http/204) [HTTP 206 Partial Content](/errors/http/206) [HTTP 301 Moved Permanently](/errors/http/301) [HTTP 302 Found](/errors/http/302) [HTTP 303 See Other](/errors/http/303) [HTTP 304 Not Modified](/errors/http/304) [HTTP 307 Temporary Redirect](/errors/http/307) [HTTP 308 Permanent Redirect](/errors/http/308) [HTTP 400 Bad Request](/errors/http/400) [HTTP 401 Unauthorized](/errors/http/401) [HTTP 405 Method Not Allowed](/errors/http/405) [HTTP 407 Proxy Authentication Required](/errors/http/407) [HTTP 408 Request Timeout](/errors/http/408) [HTTP 409 Conflict](/errors/http/409) [HTTP 412 Precondition Failed](/errors/http/412) [HTTP 431 Request Header Fields Too Large](/errors/http/431) [HTTP 499 Client Closed Request](/errors/http/499) [HTTP 500 Internal Server Error](/errors/http/500) [HTTP 501 Not Implemented](/errors/http/501) [HTTP redirect codes](/errors/http/http-redirect-codes)

Terms on this page
[HTTP status codes](/glossary/http-status-codes) [Google Search Console](/glossary/google-search-console)

Free · 2 minutes

## Tools point. Agencies advise. _This one ships._

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

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **0→7** ChatGPT citations in six weeks Paylane
