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
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.
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.
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.
Referer or URL-carried dataMDN 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.
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.
A private window starts without the site's stored cookies. If the site loads there, stored cookies are a likely cause.
If the link carried a very long query string, open the site's main address and navigate from there.
If clearing cookies stops working, the site is setting too much cookie data. Tell the owner.
Cookie line first.client_header_buffer_sizelarge_client_header_buffershttp.maxHeaderSize / --max-http-header-sizeHPE_HEADER_OVERFLOW error occursLimitRequestFieldSizehttp {
client_header_buffer_size 4k;
large_client_header_buffers 4 16k; # default is 4 8k
}# default is 16 KiB
node --max-http-header-size=32768 server.jsDurable 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.
4 questions people ask next, answered from the sources on this page.
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.
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.
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.
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.
Run the free audit, then approve the fixes. Every change can be undone.