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

  1. 1Clear browser cookies for the domain and re-authenticate
  2. 2Reduce the size of custom headers
  3. 3Increase server's header size limit if you control it
  4. 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