At One Place

HTTP 431 — Request Header Fields Too Large

HTTP 431
Request Header Fields Too Large
The request headers, usually the cookies, are bigger than the server will accept.

What 431 actually means

Servers cap total header size — commonly 8 KB — and this request went over. Nine times in ten the cause is cookies: a site that has accumulated dozens of them, or one that stores session state in a cookie until it outgrows the limit. The distinctive symptom is that the error follows you around one site and disappears the moment you clear its cookies, which is also the fix.

Common causes

  • Too many cookies, or a single very large cookie, for one domain
  • A session or auth token stored in a cookie that has grown past the limit
  • A long `Referer` header carrying a large query string
  • An oversized `Authorization` header, common with SAML or Kerberos tokens
  • A misbehaving script writing cookies in a loop

If you're just trying to view the page

  1. Clear cookies for that specific site — this fixes it almost every time
  2. Try a private window to confirm cookies are the cause before clearing anything
  3. Disable extensions that add headers, then reload

If it's your site

  1. Store session state server-side and keep only a short identifier in the cookie
  2. Audit how many cookies your site and its third-party scripts set on the same domain
  3. Raise `large_client_header_buffers` in Nginx or `LimitRequestFieldSize` in Apache only after fixing the cause
  4. For Kerberos or SAML, raise the limit deliberately — those tokens are legitimately large

Reference

Status code
431
Reason phrase
Request Header Fields Too Large
Category
4xx — Client Error
Defined in
RFC 6585 §5

Common questions

What does HTTP 431 mean?
The request headers, usually the cookies, are bigger than the server will accept. Servers cap total header size — commonly 8 KB — and this request went over. Nine times in ten the cause is cookies: a site that has accumulated dozens of them, or one that stores session state in a cookie until it outgrows the limit.
How do I fix a 431 error?
Clear cookies for that specific site — this fixes it almost every time
Is 431 a client error or a server error?
431 is in the 4xx range, which means client error. The request itself was the problem, so retrying it unchanged will usually return the same code.

Related pages

Sources

  1. Hypertext Transfer Protocol (HTTP) Status Code Registry — IANA
  2. RFC 9110: HTTP Semantics — IETF

How these figures are compiled and checked