HTTP

HTTP 406 Not Acceptable vs 410 Gone

Both HTTP 406 (Not Acceptable) and 410 (Gone) belong to the 4xx Client Error category. 406 indicates that the server cannot produce a response matching the Accept headers sent by the client. Meanwhile, 410 means that the resource is permanently gone and will not be available again. Unlike 404, this is intentional and permanent.

Description

The server cannot produce a response matching the Accept headers sent by the client.

When You See It

When requesting a content type the server doesn't support (e.g., Accept: application/xml when only JSON is available).

How to Fix

Adjust the Accept header to a format the server supports.

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.

Key Differences

1.

HTTP 406: The server cannot produce a response matching the Accept headers sent by the client.

2.

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

3.

You encounter 406 when when requesting a content type the server doesn't support (e.g., Accept: application/xml when only JSON is available).

4.

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

When to Use Which

For 406 (Not Acceptable): Adjust the Accept header to a format the server supports. For 410 (Gone): Remove references to this URL. Search engines will de-index the page.

Learn More