HTTP

HTTP 308 Permanent Redirect vs 521 Web Server Is Down

HTTP 308 (Permanent Redirect) is a 3xx Redirection response, while 521 (Web Server Is Down) is a 5xx Server Error response. 308 indicates that the resource has been permanently moved. Like 301, but guarantees the HTTP method will NOT be changed. In contrast, 521 means that cloudflare-specific. The origin server refused the connection.

Description

The resource has been permanently moved. Like 301, but guarantees the HTTP method will NOT be changed.

When You See It

For permanent URL changes where POST requests must remain POST.

How to Fix

Update all references to the new URL. The HTTP method is preserved.

Description

Cloudflare-specific. The origin server refused the connection.

When You See It

When Cloudflare can't establish a TCP connection to the origin server.

How to Fix

Check that the origin server is running and the firewall allows Cloudflare IPs.

Key Differences

1.

308 is a 3xx Redirection response, while 521 is a 5xx Server Error response.

2.

HTTP 308: The resource has been permanently moved. Like 301, but guarantees the HTTP method will NOT be changed.

3.

HTTP 521: Cloudflare-specific. The origin server refused the connection.

4.

You encounter 308 when for permanent URL changes where POST requests must remain POST.

5.

You encounter 521 when when Cloudflare can't establish a TCP connection to the origin server.

When to Use Which

For 308 (Permanent Redirect): Update all references to the new URL. The HTTP method is preserved. For 521 (Web Server Is Down): Check that the origin server is running and the firewall allows Cloudflare IPs.

Learn More