client error RFC 6585
HTTP 431 Request Header Fields Too Large
The combined size of the request headers exceeds the server limit.
What it means
Either a single header is too big or the sum of all headers is over the limit. Nginx default is 8KB, Apache is around 8KB per header field. Most often triggered by cookies that grew too large (legacy analytics libraries, tracking pixels leaving cookies from many domains).
When servers send it
- •Cookie header alone exceeds 8KB (accumulated cookies from many services)
- •Very long Authorization header (encoded JWT with many claims)
- •Custom headers accumulated by proxies
What the client does
Clears cookies for the domain. Reduces custom headers. Retries.
Common causes
- •Too many cookies on the domain
- •Bloated JWT with many custom claims
- •Chain of reverse proxies each adding X-Forwarded-* headers
How to fix it
- 1.Clear cookies for the domain (browser dev tools)
- 2.Shrink JWT payload (move data to server-side session instead of embedding)
- 3.Increase nginx `large_client_header_buffers`
- 4.Consolidate custom headers
Similar codes
400 Bad Request client error
Server cannot process the request due to a client-side error — malformed syntax, invalid JSON, missing required fields.
413 Payload Too Large client error
Request body is larger than the server will accept.
401 Unauthorized client error
Authentication is required and either missing or invalid — the client is not identified.
403 Forbidden client error
Server understood who you are but refuses to authorize the request — permission denied.
404 Not Found client error
The requested URL does not exist on this server.
← All HTTP status codes · HTTP status cheat sheet · HTTP headers reference