Most SEOs and developers default to serving a classic 404 (Not Found) when deleting a page. While a 404 works, it is technically ambiguous. A 404 essentially tells Google, "I couldn't find this file right now. It might be a broken link, a server error, or a temporary glitch. Try again later."
Because of this ambiguity, Googlebot will continually waste crawl budget revisiting 404 pages for months just to make absolutely sure the page isn't coming back.
When to Use a 410 vs. a 404
You should deploy a 410 when an intentional, permanent deletion has occurred and the content has no logical replacement.
- Discontinued Products: If an e-commerce SKU is permanently retired and there is no newer model to redirect the user to, throw a 410. Do not blanket redirect (301) all discontinued products to the homepage—Google treats massive homepage redirects as Soft 404s anyway.
- Pruning Thin Content: If you run a massive content audit and decide to delete 500 low-quality, zero-traffic blog posts from 2014, use a 410. This forcefully strips the dead weight from Google's index in days instead of months.
- Cleaning Up Spam Hacks: If your site was compromised and injected with thousands of Japanese keyword spam URLs, cleaning the server to return 410s on those URLs is the fastest path to recovery.
The Problem with 404s
Google treats 404s as potentially accidental. If a server misconfiguration causes your entire blog to return widespread 404s, Google provides a grace period. It keeps those URLs in the index for a short time and reduces crawl frequency, waiting to see if you fix the server.
If you actually wanted those pages removed, that grace period is intensely frustrating. A 410 bypasses the grace period.
Implementation at the Server Level
You cannot set a 410 using an HTML meta tag. It must be delivered in the HTTP response header before the browser or bot ever parses the document.
In Apache (.htaccess):
Redirect 410 /category/old-product-line/
Redirect 410 /blog/terrible-post-from-2015/
In Nginx (nginx.conf):
location ^~ /category/old-product-line/ {
return 410;
}
Pro-Tip: Keep The User In Mind Just because the server returns a 410 header doesn't mean the user has to see a blank white screen with raw server text. You should still route the user to a highly styled, helpful internal template (just like a custom 404 page) that explains the product or article is gone, but offers a search bar or links to related categories. Googlebot reads the invisible 410 header, but the human user gets a clean UI.
The Official Word from Google
John Mueller has explicitly confirmed that a 410 speeds up the deindexing process compared to a 404. When Googlebot encounters a 410, it effectively marks the URL as dead immediately on the first pass.
If you are dealing with a massive site architecture overhaul, migrating to a new CMS, or executing a heavy content pruning strategy, the 410 status code is your best tool for keeping the search index pristine and your crawl budget completely optimized.