HTTP 431 Request Header Fields Too Large vs 523 Origin Is Unreachable
HTTP 431 (Request Header Fields Too Large) is a 4xx Client Error response, while 523 (Origin Is Unreachable) 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, 523 means that cloudflare-specific. Cloudflare could not reach the origin server (DNS resolution failed or no route).
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
Cloudflare-specific. Cloudflare could not reach the origin server (DNS resolution failed or no route).
When You See It
When Cloudflare's DNS for the origin fails to resolve.
How to Fix
Verify DNS records in Cloudflare dashboard. Check origin server's IP address.
Key Differences
431 is a 4xx Client Error response, while 523 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 523: Cloudflare-specific. Cloudflare could not reach the origin server (DNS resolution failed or no route).
You encounter 431 when when cookies accumulate to an excessive size, or a single header (like Authorization) is too long.
You encounter 523 when when Cloudflare's DNS for the origin fails to resolve.
When to Use Which
For 431 (Request Header Fields Too Large): Reduce header sizes. Clear excessive cookies. Use shorter tokens. For 523 (Origin Is Unreachable): Verify DNS records in Cloudflare dashboard. Check origin server's IP address.