The resource existed but was removed for good.
When to use it
Deleted content or retired API versions. Stronger than 404.
Common causes and fixes
Use 410 when a page or endpoint was removed on purpose and won’t return. Google treats 404 and 410 almost the same, though 410 can get a URL dropped from the index slightly faster. It fits expired listings, deleted user content and retired API versions, where the body can point to the replacement version and the date it was switched off.
Caches may store a 410 by default, since it is heuristically cacheable like 404 and 301, so don’t send it for content that might return; use 404 or 503 instead. If an equivalent page exists, a 301 serves users better and keeps ranking signals. In nginx, write return 410 in a location block; in Apache, Redirect gone /old-path. Remove the URLs from your sitemap.
Client error (4xx)
4xx codes are client errors: the request itself is wrong, unauthorised or points at something that isn’t there. Retrying the same request won’t help.
What it looks like
HTTP/1.1 410 GoneHow to send it
| Node.js / Express | res.status(410).end() |
|---|---|
| Python / Flask | return '', 410 |
| nginx | return 410; |
How to check it
curl -s -o /dev/null -w "%{http_code}\n" https://example.com/