404 vs 410: which status code should deleted pages return?
By the deindexpages.com editorial teamPublished Updated
When a page is deleted for good, the cleanest way to deindex it is to let the server say so. Both 404 and 410 work. The more important choice is to return a genuine error status at all, rather than a friendly page that answers 200.
What each code means
Code
Meaning
Intent signalled
404 Not Found
The server cannot find the resource
Missing, possibly temporarily or by accident
410 Gone
The resource was intentionally removed and is not coming back
Deliberate, permanent removal
301 Moved Permanently
The resource lives at a different URL now
Replacement exists
200 with "not found" text
Success status, error content
Soft 404 (avoid)
The HTTP definition of 410 is described in the MDN documentation for 410 Gone: it indicates the content was removed on purpose and will not return.
What Google actually does
Google's documentation on HTTP status codes says that all 4xx errors, except 429, are treated the same way. Google does not use content from those URLs, and URLs that are already indexed and return a 4xx are removed from the index. Newly discovered 404 URLs are not processed, and Google gradually crawls them less often.
Practically, that means 404 and 410 are equivalent as far as documented indexing behaviour goes. Some site owners report that a 410 drops out slightly faster. Google does not document that difference, so do not plan around it. Choose by intent: 410 when you are certain, 404 when a page is simply gone or you are unsure.
Do not use 401 or 403 as a deindexing method. Google treats them like other 4xx for indexing, but they also signal access problems and Google warns against using them to limit crawl rate. If content needs to be private, use proper authentication, as covered in staging and dev sites.
Soft 404: the usual failure
A soft 404 is a page that returns a success status (200) but whose content says it is missing, or is nearly empty. Google's documentation defines it as a 2xx page with content suggesting an error, and Search Console flags these. Soft 404s happen when:
A custom "page not found" template is served with a 200 status by the CMS.
A deleted product page redirects to a category or the home page with no real equivalence.
JavaScript-rendered pages show "not found" after returning 200 for the shell HTML.
Search or filter pages return zero results but still answer 200.
Check with curl -I. If the first line says 200 for a page that tells the visitor "nothing here", fix the status code, not just the message.
When a redirect is better than an error
If there is a close replacement, a 301 preserves value and sends visitors somewhere useful. The redirects documentation explains the options. Use a redirect only when the destination fulfils the same intent. Redirecting dozens of unrelated retired pages to the home page is a pattern Google may treat as a soft 404, so you end up with neither redirect value nor a clean removal.
Scenario
Use
Product discontinued, direct successor exists
301 to successor
Product discontinued, category still relevant
301 to category only if intent matches; otherwise 410
Blog post unpublished with no equivalent
410 (or 404)
Temporary outage of a page that will return
Return it with 200, or 503 for planned maintenance
Leaked or private document
Remove file, 404/410, and file a temporary removal for speed
How to implement
Apache
Redirect gone /old-page
The gone keyword in mod_alias returns a 410 for that path.
Nginx
location = /old-page { return 410; }
CMS-based sites
Most CMSs return 404 when a page is deleted or trashed. For a 410, use a redirection plugin or a hosting rule. Always confirm with a header check rather than trusting the admin panel.
Step by step
Decide per URL: redirect to a true equivalent, or remove.
Delete or unpublish the page and return 404 or 410 at the server level.
Remove the URL from XML sitemaps and from internal links, so you are not pointing at an error.
Confirm the status code with curl -I from outside your network.
Do not block the URL in robots.txt. Google must be able to fetch it to see the error and drop it.
Inspect the URL in Search Console and request indexing to prompt a revisit; then track it in the Page indexing report as "Not found (404)".
Cleaning up after large deletions
If you delete hundreds of pages, expect a long tail of 404s in reports. That is normal and not penalised by itself. What matters is that you did not delete pages that still earn traffic or links. Export the list of URLs to remove, check each against analytics and backlinks, and decide in bulk: redirect, keep, or remove. After a big removal, link equity from those pages is gone; plan internal links so the remaining pages are not orphaned.
Google's documentation treats 4xx errors, except 429, the same way. Some site owners report minor speed differences, but they are not documented. Pick by intent.
Will many 404s hurt my site?
Real 404s for pages that no longer exist are a normal part of a website. Problems come from deleting valuable pages or from soft 404s.
Should I redirect deleted pages to the home page?
Not as a blanket rule. Redirect only to a page that fulfils the same intent, otherwise return 404 or 410.