410 Gone
410 Gone
is a status code that can be used in cases where a resource
is gone and never coming back. It’s a more specific version of
404 Not Found
.
A good example for using 410
instead of 404
is when a resource was
intentionally removed.
Using 410
can be helpful, because it signals to other people linking to
you that the link is dead and should be removed. A 404
is the default for
missing resources, and it can just mean that the owner of the site has moved
the content and didn’t put the right redirects in place.
So to sum it up: 410
implies intent.
Example
HTTP/1.1 410 Gone
Content-Type: text/plain
Server: curveball/0.6.0
I deleted it and it's never coming back!
References
- RFC7231, Section 6.5.9 - 410 Gone