HTTP 301 Moved Permanently vs 520 Web Server Returned an Unknown Error
HTTP 301 (Moved Permanently) is a 3xx Redirection response, while 520 (Web Server Returned an Unknown Error) is a 5xx Server Error response. 301 indicates that the resource has been permanently moved to a new URL. All future requests should use the new URL. Search engines will transfer link equity to the new URL. In contrast, 520 means that cloudflare-specific. The origin server returned an unexpected response that Cloudflare could not process.
Description
The resource has been permanently moved to a new URL. All future requests should use the new URL. Search engines will transfer link equity to the new URL.
When You See It
After domain migrations, URL restructuring, or when consolidating duplicate URLs.
How to Fix
Update links and bookmarks to the new URL in the Location header. For SEO, this is the preferred redirect for permanent moves.
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
301 is a 3xx Redirection response, while 520 is a 5xx Server Error response.
HTTP 301: The resource has been permanently moved to a new URL. All future requests should use the new URL. Search engines will transfer link equity to the new URL.
HTTP 520: Cloudflare-specific. The origin server returned an unexpected response that Cloudflare could not process.
You encounter 301 when after domain migrations, URL restructuring, or when consolidating duplicate URLs.
You encounter 520 when when Cloudflare receives an empty, unknown, or malformed response from the origin.
When to Use Which
For 301 (Moved Permanently): Update links and bookmarks to the new URL in the Location header. For SEO, this is the preferred redirect for permanent moves. For 520 (Web Server Returned an Unknown Error): Check origin server logs. Ensure responses include proper headers. Verify SSL configuration.