410

HTTP 410 Gone

4xx Client Error

4xx Client Error RFC 7231, Section 6.5.9

What is HTTP 410 Gone?

The 410 (Gone) status code indicates that the target resource is no longer available at the origin server and this condition is likely to be permanent. Unlike 404, where the availability is unknown, 410 explicitly tells the client the resource is gone. Search engines will quickly remove URLs returning 410 from their index.

Common Use Cases

  • Removed or discontinued products
  • Deprecated API endpoints
  • Deleted user accounts or content

Usage Example

When a product is discontinued and its page is removed from the site, return 410 Gone instead of 404. This tells search engines to quickly remove the URL from their index and tells users the content existed but is no longer available. It is also useful for deprecated API endpoints during a migration.

// Laravel - returning 410 Gone for discontinued products
if ($product->discontinued) {
    return response()->json([
        'error' => 'This product has been discontinued',
        'replacement_id' => $product->replacement_id,
    ], 410);
}

Common Mistakes

⚠️

Mistake: Using 410 for temporary unavailability

Fix: Only use 410 if the resource is permanently gone. For temporary removal, return 404 or a 503 with an appropriate Retry-After header.

⚠️

Mistake: Using 404 when a resource is known to be permanently deleted

Fix: If you know the resource is permanently gone (e.g., user deleted their account), use 410 Gone. It provides more useful information to clients and search engines than the generic 404.

Last updated: 21 Jun 2026