Free auditStart free
GuideError · HTTP status codes

HTTP 431 Request Header Fields Too Large

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
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
  2. How to get past a 431 as a visitor
  3. How to fix it as a site owner or developer
  4. 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 withChatGPTClaudePerplexityGoogleAI Mode
01Who 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 to check because a visitor can clear them.

02How 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, 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.

03Header 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

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

04Explained

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 and Google's documentation on how HTTP status codes affect its crawlers.
Questions

Asked a lot.

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

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

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

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

04Why 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. 01RFC 6585: Additional HTTP Status Codes, Section 5rfc-editor.org · checked 2026-10-25
  2. 02MDN: 431 Request Header Fields Too Largedeveloper.mozilla.org · checked 2026-10-25
  3. 03nginx: ngx_http_core_modulenginx.org · checked 2026-10-25
  4. 04Node.js: HTTP module documentationnodejs.org · checked 2026-10-25
  5. 05Node.js: command-line optionsnodejs.org · checked 2026-10-25
  6. 06Apache HTTP Server: core featureshttpd.apache.org · checked 2026-10-25
  7. 07How HTTP status codes affect Google's crawlersdevelopers.google.com · checked 2026-10-25
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