Dev.to WebDev 🛠 Dev 👁 2 📖 1 min read

404 or 410? Choose the Response That Matches the Page's State

A 404 Not Found response says that a resource is not available at this URL. A 410 Gone response makes a stronger statement: the resource was intentionally removed and is not expected to return. The distinction should ref

A 404 Not Found response says that a resource is not available at this URL. A 410 Gone response makes a stronger statement: the resource was intentionally removed and is not expected to return. The distinction should reflect the site's state, not a desire to change an audit number.

When each response fits

A 404 can describe a URL that never existed, is temporarily missing, or was removed without a replacement. A 410 is appropriate when the page was deliberately retired and there is no expectation it will return. A custom error page should still send the corresponding HTTP status; changing the design does not change the response semantics.

If a genuinely relevant replacement exists, a direct permanent redirect may be more useful than either error response. Avoid redirecting every old URL to an unrelated page: a clear 404 or 410 is less confusing than a destination that does not satisfy the original intent.

Keep discovery signals consistent

  • Remove broken internal links or update them to a relevant replacement.- Do not list a retired URL in the XML sitemap.- Check the final response after redirects, not only the custom error-page appearance.- Use the same intended state across templates, routes and content records. Search engines make their own crawling and indexing decisions; choosing 410 does not guarantee a faster removal or a ranking benefit. NOTABIS SEO records the final HTTP response for crawled URLs. Read the guide: https://seo.notabis.com/learn/404-vs-410
📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.