HTTP

HTTP 308 Permanent Redirect vs 524 A Timeout Occurred

HTTP 308 (Permanent Redirect) is a 3xx Redirection response, while 524 (A Timeout Occurred) 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, 524 means that cloudflare-specific. A TCP connection was established but the origin didn't respond with an HTTP response in time.

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. A TCP connection was established but the origin didn't respond with an HTTP response in time.

When You See It

When a request to the origin takes longer than Cloudflare's 100-second timeout.

How to Fix

Optimize slow endpoints. Move long-running tasks to background jobs.

Key Differences

1.

308 is a 3xx Redirection response, while 524 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 524: Cloudflare-specific. A TCP connection was established but the origin didn't respond with an HTTP response in time.

4.

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

5.

You encounter 524 when when a request to the origin takes longer than Cloudflare's 100-second timeout.

When to Use Which

For 308 (Permanent Redirect): Update all references to the new URL. The HTTP method is preserved. For 524 (A Timeout Occurred): Optimize slow endpoints. Move long-running tasks to background jobs.

Learn More