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
- Clear cookies for that specific site — this fixes it almost every time
- Try a private window to confirm cookies are the cause before clearing anything
- Disable extensions that add headers, then reload
If it's your site
- Store session state server-side and keep only a short identifier in the cookie
- Audit how many cookies your site and its third-party scripts set on the same domain
- Raise `large_client_header_buffers` in Nginx or `LimitRequestFieldSize` in Apache only after fixing the cause
- 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
- 404 Not Found The server is reachable and working, but there is nothing at the address you ask
- 403 Forbidden The server understood the request and is refusing to allow it, and logging in wi
- 401 Unauthorized You need to authenticate, and either you did not or your credentials were reject
- 429 Too Many Requests You have sent more requests than the service allows in a given period.
- 400 Bad Request The server could not understand the request because something about it is malfor
- 413 Content Too Large The request body is bigger than the server is willing to accept.
- 422 Unprocessable Content The request is well-formed and understood, but the data in it fails the rules.
- 405 Method Not Allowed The URL exists, but it does not accept the HTTP method you used.
- 409 Conflict The request cannot be completed because it clashes with the current state of the
- 415 Unsupported Media Type The server will not accept the format of the body you sent.
- 408 Request Timeout The server gave up waiting for the client to finish sending its request.
- 410 Gone The resource was deliberately removed and is not coming back, and there is no fo