HTTP 403 Forbidden vs 520 Web Server Returned an Unknown Error
HTTP 403 (Forbidden) is a 4xx Client Error response, while 520 (Web Server Returned an Unknown Error) is a 5xx Server Error response. 403 indicates that the server understood the request but refuses to authorize it. Unlike 401, authentication will not help — the user simply does not have permission. In contrast, 520 means that cloudflare-specific. The origin server returned an unexpected response that Cloudflare could not process.
Description
The server understood the request but refuses to authorize it. Unlike 401, authentication will not help — the user simply does not have permission.
When You See It
When trying to access a resource you're authenticated for but don't have permission to access.
How to Fix
Check your user role/permissions. Contact the admin to request access.
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
403 is a 4xx Client Error response, while 520 is a 5xx Server Error response.
HTTP 403: The server understood the request but refuses to authorize it. Unlike 401, authentication will not help — the user simply does not have permission.
HTTP 520: Cloudflare-specific. The origin server returned an unexpected response that Cloudflare could not process.
You encounter 403 when when trying to access a resource you're authenticated for but don't have permission to access.
You encounter 520 when when Cloudflare receives an empty, unknown, or malformed response from the origin.
When to Use Which
For 403 (Forbidden): Check your user role/permissions. Contact the admin to request access. For 520 (Web Server Returned an Unknown Error): Check origin server logs. Ensure responses include proper headers. Verify SSL configuration.