410 Gone

The resource was deliberately removed and will not come back.

Code
410
Reason phrase
Gone
Class
4xx Client error
Defined in
RFC 9110 section 15.5.11
Cacheable by default
Yes

What it means

Client error: the problem lies with the request. Repeating it unchanged will normally fail again.

When a server should send it. When a resource was removed on purpose and will not come back: an expired offer, a deleted account, a retired API version. If you are not sure it is permanent, 404 is the safe choice.

Common causes. Expired offers, deleted accounts or retired API versions.

What to do. Remove links to it. Search engines drop a 410 page faster than a 404.

How clients and crawlers treat it

Browsers and HTTP clients. Browsers show the body. It is cacheable by default, and clients should remove links to it.

Google Search. Like every 4xx except 429, it tells Google the content does not exist: an indexed URL is removed from the index, and a new one is not processed. Crawl frequency for the URL gradually drops. Google documents 404 and 410 together and handles them the same way. Source: Google Search Central, How HTTP status codes, and network and DNS errors affect Google Search.

Caching. Cacheable by default (RFC 9110 section 15.1). With no Cache-Control or Expires header, a cache may still store it and reuse it for a heuristic period, often 10% of the time since Last-Modified, so set Cache-Control explicitly if that is not what you want.

Example response

HTTP/1.1 410 Gone
Content-Type: text/plain; charset=utf-8

Gone

How to send 410

nginx
location /example {
    return 410;
}
Apache (.htaccess)
RewriteEngine On
RewriteRule ^example$ - [R=410,L]
PHP
http_response_code(410);
echo 'Gone';
exit;
Node.js
res.writeHead(410, { 'Content-Type': 'text/plain' });
res.end('Gone');
Python (Flask)
# in a view function
return 'Gone', 410

Change the paths to suit. In nginx, add_header needs always to apply to error responses.

Related codes

All status codes · All 4xx codes

Names and numbers from the IANA HTTP Status Code Registry. Google Search behaviour as documented by Google Search Central.