HTTP

HTTP 410 Gone vs 412 Precondition Failed

Both HTTP 410 (Gone) and 412 (Precondition Failed) belong to the 4xx Client Error category. 410 indicates that the resource is permanently gone and will not be available again. Unlike 404, this is intentional and permanent. Meanwhile, 412 means that one or more conditions in the request headers (If-Match, If-Unmodified-Since) evaluated to false.

Description

The resource is permanently gone and will not be available again. Unlike 404, this is intentional and permanent.

When You See It

When a resource has been deliberately removed and should be de-indexed by search engines.

How to Fix

Remove references to this URL. Search engines will de-index the page.

Description

One or more conditions in the request headers (If-Match, If-Unmodified-Since) evaluated to false.

When You See It

When using conditional requests with ETags and the resource has changed.

How to Fix

Refresh the ETag/Last-Modified value and retry with updated preconditions.

Key Differences

1.

HTTP 410: The resource is permanently gone and will not be available again. Unlike 404, this is intentional and permanent.

2.

HTTP 412: One or more conditions in the request headers (If-Match, If-Unmodified-Since) evaluated to false.

3.

You encounter 410 when when a resource has been deliberately removed and should be de-indexed by search engines.

4.

You encounter 412 when when using conditional requests with ETags and the resource has changed.

When to Use Which

For 410 (Gone): Remove references to this URL. Search engines will de-index the page. For 412 (Precondition Failed): Refresh the ETag/Last-Modified value and retry with updated preconditions.

Learn More