HTTP 413 Content Too Large vs 520 Web Server Returned an Unknown Error
HTTP 413 (Content Too Large) is a 4xx Client Error response, while 520 (Web Server Returned an Unknown Error) is a 5xx Server Error response. 413 indicates that the request payload exceeds the server's size limit. In contrast, 520 means that cloudflare-specific. The origin server returned an unexpected response that Cloudflare could not process.
Description
The request payload exceeds the server's size limit.
When You See It
When uploading files that exceed the server's maximum upload size.
How to Fix
Reduce the payload size. Check server limits (Nginx: client_max_body_size, Apache: LimitRequestBody).
Description
Cloudflare-specific. The origin server returned an unexpected response that Cloudflare could not process.
When You See It
When Cloudflare receives an empty, unknown, or malformed response from the origin.
How to Fix
Check origin server logs. Ensure responses include proper headers. Verify SSL configuration.
Key Differences
413 is a 4xx Client Error response, while 520 is a 5xx Server Error response.
HTTP 413: The request payload exceeds the server's size limit.
HTTP 520: Cloudflare-specific. The origin server returned an unexpected response that Cloudflare could not process.
You encounter 413 when when uploading files that exceed the server's maximum upload size.
You encounter 520 when when Cloudflare receives an empty, unknown, or malformed response from the origin.
When to Use Which
For 413 (Content Too Large): Reduce the payload size. Check server limits (Nginx: client_max_body_size, Apache: LimitRequestBody). For 520 (Web Server Returned an Unknown Error): Check origin server logs. Ensure responses include proper headers. Verify SSL configuration.