4xx Client Error
HTTP 431 Request Header Fields Too Large
The server is unwilling to process the request because its header fields are too large. This can happen when cookies, authorization tokens, or other headers are excessively long.
Common Causes
- Cookies have grown too large (accumulated over time)
- Authorization token is excessively long
- Too many custom headers in the request
- Referrer URL is extremely long
How to Fix
- 1Clear browser cookies for the domain and re-authenticate
- 2Reduce the size of custom headers
- 3Increase server's header size limit if you control it
- 4Move large data from headers to the request body
Example
HTTP 431 Request Header Fields Too Large
GET /page HTTP/1.1 Cookie: (extremely long cookie string) → 431 Request Header Fields Too Large
Related Client Error Codes
400
Bad Request
401Unauthorized
402Payment Required
403Forbidden
404Not Found
405Method Not Allowed
406Not Acceptable
407Proxy Authentication Required
408Request Timeout
409Conflict
410Gone
411Length Required
412Precondition Failed
413Content Too Large
414URI Too Long
415Unsupported Media Type
416Range Not Satisfiable
417Expectation Failed
418I'm a Teapot
421Misdirected Request
422Unprocessable Content
423Locked
424Failed Dependency
425Too Early
426Upgrade Required
428Precondition Required
429Too Many Requests
451Unavailable For Legal Reasons