HTTP 406 Not Acceptable vs 522 Connection Timed Out
HTTP 406 (Not Acceptable) is a 4xx Client Error response, while 522 (Connection Timed Out) is a 5xx Server Error response. 406 indicates that the server cannot produce a response matching the Accept headers sent by the client. In contrast, 522 means that cloudflare-specific. TCP connection to the origin server timed out.
Description
The server cannot produce a response matching the Accept headers sent by the client.
When You See It
When requesting a content type the server doesn't support (e.g., Accept: application/xml when only JSON is available).
How to Fix
Adjust the Accept header to a format the server supports.
Description
Cloudflare-specific. TCP connection to the origin server timed out.
When You See It
When the origin server is overloaded or network issues prevent connection.
How to Fix
Check origin server health. Verify firewall rules. Check for network congestion.
Key Differences
406 is a 4xx Client Error response, while 522 is a 5xx Server Error response.
HTTP 406: The server cannot produce a response matching the Accept headers sent by the client.
HTTP 522: Cloudflare-specific. TCP connection to the origin server timed out.
You encounter 406 when when requesting a content type the server doesn't support (e.g., Accept: application/xml when only JSON is available).
You encounter 522 when when the origin server is overloaded or network issues prevent connection.
When to Use Which
For 406 (Not Acceptable): Adjust the Accept header to a format the server supports. For 522 (Connection Timed Out): Check origin server health. Verify firewall rules. Check for network congestion.