410 Gone
Description
The 410 Gone
status code indicates that the requested resource is no longer available at the server and no forwarding address is known. This status code is similar to 404 Not Found
, but it specifically indicates that the resource has been intentionally removed and will not be available again.
This status code is commonly used when: - A resource has been deliberately and permanently removed - An API version or endpoint has been deprecated and removed - Content has been taken down for legal or policy reasons - A temporary resource (like a limited-time promotion) has expired
Unlike the 404 Not Found
status, which might indicate a temporary condition or a mistyped URL, the 410 Gone
status explicitly tells clients that the resource has been permanently removed and they should not request it again in the future.
Syntax
The server responds with a 410 Gone
status and typically includes an explanation:
HTTP/1.1 410 Gone
Content-Type: application/json
Content-Length: [length in bytes]
{
"error": "Gone",
"message": "The requested resource is no longer available and has been permanently removed"
}
Examples
Removed Content Example
A client requests a page that has been permanently removed:
Client Request:
Server Response:
HTTP/1.1 410 Gone
Content-Type: text/html
Content-Length: 285
<!DOCTYPE html>
<html>
<head>
<title>410 Gone</title>
</head>
<body>
<h1>410 Gone</h1>
<p>The article you are looking for has been permanently removed from our blog.</p>
<p>You may want to browse our <a href="/blog">current articles</a> instead.</p>
</body>
</html>
Deprecated API Example
A client attempts to access a deprecated and removed API version:
Client Request:
Server Response:
HTTP/1.1 410 Gone
Content-Type: application/json
Content-Length: 243
{
"error": "Gone",
"message": "API v1 has been deprecated and is no longer available",
"details": "This API version was decommissioned on 2023-01-15",
"migration_guide": "https://api.example.com/docs/migration-v1-to-v2",
"current_version": "https://api.example.com/v2/users"
}
Expired Temporary Resource Example
A client attempts to access a temporary resource that has expired:
Client Request:
Server Response:
HTTP/1.1 410 Gone
Content-Type: application/json
Content-Length: 187
{
"error": "Gone",
"message": "The Summer Sale 2022 promotion has ended and is no longer available",
"current_promotions_url": "/promotions/current",
"ended_on": "2022-09-01T23:59:59Z"
}
Summary
The 410 Gone
status code provides a clear signal to clients that a resource has been intentionally and permanently removed. Unlike the more general 404 Not Found
status, it explicitly indicates that the absence is deliberate and permanent, helping clients update their bookmarks, caches, and references accordingly. This status code is particularly useful for managing the lifecycle of content and APIs, allowing servers to clearly communicate when resources have been deprecated or removed rather than simply returning a generic "not found" response.