HTTP 431 Request Header Fields Too Large vs 505 HTTP Version Not Supported
HTTP 431 (Request Header Fields Too Large) is a 4xx Client Error response, while 505 (HTTP Version Not Supported) is a 5xx Server Error response. 431 indicates that the server refuses to process the request because an individual header field or all headers collectively are too large. In contrast, 505 means that the server does not support the HTTP version used in the request.
Description
The server refuses to process the request because an individual header field or all headers collectively are too large.
When You See It
When cookies accumulate to an excessive size, or a single header (like Authorization) is too long.
How to Fix
Reduce header sizes. Clear excessive cookies. Use shorter tokens.
Description
The server does not support the HTTP version used in the request.
When You See It
When a client uses an HTTP version the server doesn't support.
How to Fix
Use a supported HTTP version (typically HTTP/1.1 or HTTP/2).
Key Differences
431 is a 4xx Client Error response, while 505 is a 5xx Server Error response.
HTTP 431: The server refuses to process the request because an individual header field or all headers collectively are too large.
HTTP 505: The server does not support the HTTP version used in the request.
You encounter 431 when when cookies accumulate to an excessive size, or a single header (like Authorization) is too long.
You encounter 505 when when a client uses an HTTP version the server doesn't support.
When to Use Which
For 431 (Request Header Fields Too Large): Reduce header sizes. Clear excessive cookies. Use shorter tokens. For 505 (HTTP Version Not Supported): Use a supported HTTP version (typically HTTP/1.1 or HTTP/2).