HTTP

HTTP 308 Permanent Redirect vs 409 Conflict

HTTP 308 (Permanent Redirect) is a 3xx Redirection response, while 409 (Conflict) is a 4xx Client Error response. 308 indicates that the resource has been permanently moved. Like 301, but guarantees the HTTP method will NOT be changed. In contrast, 409 means that the request conflicts with the current state of the server. Often due to concurrent modification or business rule violations.

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

The request conflicts with the current state of the server. Often due to concurrent modification or business rule violations.

When You See It

When trying to create a resource that already exists, or updating a resource that was modified by another request.

How to Fix

Refresh the resource state, resolve conflicts, and retry. Use ETags for optimistic concurrency.

Key Differences

1.

308 is a 3xx Redirection response, while 409 is a 4xx Client Error response.

2.

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

3.

HTTP 409: The request conflicts with the current state of the server. Often due to concurrent modification or business rule violations.

4.

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

5.

You encounter 409 when when trying to create a resource that already exists, or updating a resource that was modified by another request.

When to Use Which

For 308 (Permanent Redirect): Update all references to the new URL. The HTTP method is preserved. For 409 (Conflict): Refresh the resource state, resolve conflicts, and retry. Use ETags for optimistic concurrency.

Learn More