# HTTP 431 Request Header Fields Too Large

> HTTP 431 means a request

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

Guide Error · HTTP status codes

HTTP 431 means a request's headers are too large for the server. Clear cookies to get past it, or shrink headers and tune nginx, Node.js and Apache limits.

4 min

read

7

sources

Oct 21, 2026

updated

Scaplet Editorial Team

author

431 4xx · Client error

The short answer

HTTP 431 Request Header Fields Too Large means the server refuses the request because its header fields are too large, either in total or in a single field. Cookies are the usual cause. Visitors can clear cookies for the site; owners should shrink the headers first and only then raise server limits.

1. [What a 431 means and who causes it](#what-a-431-means-and-who-causes-it)
2. [How to get past a 431 as a visitor](#how-to-get-past-a-431-as-a-visitor)
3. [How to fix it as a site owner or developer](#how-to-fix-it-as-a-site-owner-or-developer)
4. [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%2F431%20(%22HTTP%20431%20Request%20Header%20Fields%20Too%20Large%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%2F431%20(%22HTTP%20431%20Request%20Header%20Fields%20Too%20Large%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%2F431%20(%22HTTP%20431%20Request%20Header%20Fields%20Too%20Large%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%2F431%20(%22HTTP%20431%20Request%20Header%20Fields%20Too%20Large%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

_01_Who causes a 431

## What a 431 means and who causes it

RFC 6585 defines 431: "the server is unwilling to process the request because its header fields are too large. The request MAY be resubmitted after reducing the size of the request header fields." It can apply when the set of headers is too large in total, or when a single header field is at fault. In the latter case the response SHOULD say which header was too large.

Cause

### Too many or too large cookies

Where it comes from

The browser, after the site (or a script) set them

Who can fix it

Visitor clears them; owner stops setting so much

Cause

### Very long `Referer` or URL-carried data

Where it comes from

A link or app that puts large state in the URL

Who can fix it

Owner or developer

Cause

### A server limit set too low

Where it comes from

Server or proxy configuration

Who can fix it

Site owner or host

MDN says servers will often produce this status if the `Referer` URL is too long or too many cookies are sent in the request. Cookies are the first [thing](/glossary/entity) to check because a visitor can clear them.

_02_How it works

## How to get past a 431 as a visitor

1. 01

### Clear cookies for that one site

MDN says the 431 body may help people fix the problem "such as by clearing cookies". Clear only the affected site's cookies, not everything.
2. 02

### Try a private window

A private window starts without the site's stored cookies. If the site loads there, stored cookies are a likely cause.
3. 03

### Reload from a clean URL

If the link carried a very long [query string](/glossary/url-parameters), open the site's main address and navigate from there.
4. 04

### Report it if it comes back

If clearing cookies stops working, the site is setting too much cookie data. Tell the owner.

_03_Header limits by stack

## How to fix it as a site owner or developer

Fix the size of the headers before you raise limits. Raising a limit does not stop cookies from growing, and every proxy or CDN in the path can apply its own header limits, so one raised limit may not be enough. Open DevTools, the Network tab, and read the request headers of a failing request: look at the `Cookie` line first.

Stack

### nginx

Setting

`client_header_buffer_size`

Documented default

1k; larger buffers are then allocated

Response when exceeded

See next row

Stack

### nginx

Setting

`large_client_header_buffers`

Documented default

4 buffers of 8k

Response when exceeded

A request line over one buffer returns 414; a header field over one buffer returns 400 (Bad Request), not 431

Stack

### Node.js

Setting

`http.maxHeaderSize` / `--max-http-header-size`

Documented default

16 KiB

Response when exceeded

Default behavior tries to close the socket with a 431 when an `HPE_HEADER_OVERFLOW` error occurs

Stack

### Apache

Setting

`LimitRequestFieldSize`

Documented default

8190 bytes

Response when exceeded

Limit on the size of one request header field; the docs advise not changing it under normal conditions

nginx: raise the header buffers (last resort)

```
http { client_header_buffer_size 4k; large_client_header_buffers 4 16k; # default is 4 8k }
```

Node.js: raise the limit for one process

```
# default is 16 KiB node --max-http-header-size=32768 server.js
```

**nginx returns 400 for an oversize header field**Per the nginx documentation, a request header field that cannot fit in one buffer gets a 400 (Bad Request) error, and a request line that cannot fit gets 414. If your users get a 400 from nginx on a request with large cookies, the cause is the same as a 431 elsewhere, and the fix is the same.

Durable fixes: store session state on the server and send a short session ID cookie, scope cookies to the paths and subdomains that need them, delete cookies you no longer read, and keep identifiers and [tokens](/glossary/tokenization) out of long query strings. Apache notes that SPNEGO authentication headers can be up to 12392 bytes, which is a case where a default limit can be too tight for legitimate traffic.

_04_Explained

## What it does to SEO

A 431 is a 4xx response. Google says all 4xx errors except 429 are treated the same: content from those URLs is ignored and an indexed URL is removed from the index. See [4xx errors](/seo-issues/4xx-errors) and Google's documentation on how [HTTP status codes](/glossary/http-status-codes) affect its crawlers.

Questions

## Asked a lot.

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

_01_ What does error 431 mean?

The server refuses to process the request because its header fields are too large, in total or one field. RFC 6585 defines it, and the request may be resubmitted after reducing the headers.

_02_ How do I fix HTTP 431 as a visitor?

Clear the cookies for the affected site, or open it in a private window. MDN names cookies and a long `Referer` URL as the common causes.

_03_ How do I fix HTTP 431 on my server?

Reduce cookie and header size first. If you must raise a limit, change `large_client_header_buffers` in nginx, `--max-http-header-size` or `maxHeaderSize` in Node.js, or `LimitRequestFieldSize` in Apache, and check every proxy and CDN in front of the server.

_04_ Why does nginx show 400 instead of 431?

The nginx documentation says a request header field larger than one buffer returns a 400 (Bad Request) error, and an oversize request line returns 414. It does not use 431 for this case.

Sources · 7

## Every fact, linked and dated.

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

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

1. 01 [RFC 6585: Additional HTTP Status Codes, Section 5](https://www.rfc-editor.org/rfc/rfc6585.html) rfc-editor.org · checked 2026-10-25
2. 02 [MDN: 431 Request Header Fields Too Large](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/431) developer.mozilla.org · checked 2026-10-25
3. 03 [nginx: ngx_http_core_module](https://nginx.org/en/docs/http/ngx_http_core_module.html) nginx.org · checked 2026-10-25
4. 04 [Node.js: HTTP module documentation](https://nodejs.org/api/http.html) nodejs.org · checked 2026-10-25
5. 05 [Node.js: command-line options](https://nodejs.org/api/cli.html) nodejs.org · checked 2026-10-25
6. 06 [Apache HTTP Server: core features](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 408 Request Timeout HTTP status codes](/errors/http/408) [Related 4xx errors Status codes and links](/seo-issues/4xx-errors) [Read next HTTP 500 Internal Server Error HTTP status codes](/errors/http/500) [Do Run a free site audit Free, about two minutes](/site-audit)

Nearby in errors
[429 Too Many Requests on Cloudflare](/errors/http/429/cloudflare) [429 Too Many Requests in nginx](/errors/http/429/nginx) [451 Unavailable For Legal Reasons](/errors/http/451)

More in HTTP status codes
[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) [HTTP status code list](/errors/http/http-status-code-list) [REST API status codes](/errors/http/rest-api-status-codes) [100 Continue](/errors/http/100) [101 Switching Protocols](/errors/http/101) [402 Payment Required](/errors/http/402) [403 Forbidden](/errors/http/403) [404 Not Found](/errors/http/404)

Terms on this page
[Entity](/glossary/entity) [URL parameters](/glossary/url-parameters) [Tokenization](/glossary/tokenization) [HTTP status codes](/glossary/http-status-codes)

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
