Every website deletes pages. Products are discontinued, campaigns end, old articles are cleaned out. When someone or something requests one of those addresses afterwards, your server has to say something. The two usual answers are 404 Not Found and 410 Gone, and the debate over 410 vs 404 fills many SEO forums with confident but conflicting advice.
This guide is for site owners and developers who are removing pages and want to handle them properly. It explains what each code means in the HTTP standard, what Google's documentation says it does with them, when a redirect is the better answer, and how to configure and test the response. You will finish with a short decision rule and a verified setup for the pages you removed.
The short version: both codes tell Google the page does not exist, and Google's documentation does not describe a difference between them. The choice matters more for clarity and for the people running your site than for search results.
Before you begin
- List the removed URLs. Export them from your CMS, your old sitemap or your server logs. Note which have a close replacement and which have none.
- Check traffic and links. Look at which removed pages still get visits or external links. These deserve a considered decision, not a blanket rule.
- Access: you need to edit server configuration, a CMS redirect tool or application code.
- Time and risk: a few hours for a small site. The main risk is returning an error for a page that should have been redirected, or deleting pages that were still useful. Keep a backup of the content you remove, because a 404 or 410 is not easy to undo from the search engine's side.
- Tools: a command-line tool such as
curl, and access to Google Search Console if you have it.
What the two codes mean
The HTTP standard (RFC 9110) defines both.
- 404 Not Found: the server did not find a current representation of the resource, or does not want to reveal that one exists. A 404 does not say whether the absence is temporary or permanent. The standard says a 404 response is heuristically cacheable, which means a cache may keep serving it for a while unless headers say otherwise.
- 410 Gone: the resource is no longer available at the origin server, and this condition is likely to be permanent. If the server cannot tell whether the condition is permanent, it should use 404 instead. A 410 response is also heuristically cacheable. The standard does not require a server to keep returning 410 forever, and it says there is no need to mark every permanently unavailable resource as gone. How long to keep the mark is the site owner's choice.
MDN's reference makes the same point in plain words: use 410 when removal is intentional and permanent, and 404 when you do not know.
What Google does with them
Google's documentation on HTTP status codes puts 404 and 410 in the same group. Its crawlers tell the next processing system that the content does not exist. Specifically:
- Google does not index URLs that return 404 or 410, and URLs already indexed that begin returning them are removed from the index.
- Newly encountered 404 pages are not processed, and Google gradually crawls such URLs less often.
- Content on a 4xx page is ignored, so a helpful message on your error page has no effect on indexing.
- Other 4xx codes except 429 do not change the crawl rate. Google specifically says not to use 401 or 403 to limit crawling.
- Google gives no specific timeframe for removal. It happens over time through the indexing pipeline.
The documentation does not claim that 410 is faster or stronger than 404. If you read otherwise elsewhere, treat it as an opinion rather than a documented behaviour. Other search engines may behave differently, and this guide does not make claims about them.
Step-by-step instructions
Step 1: Sort each removed URL into one of three groups
Go through your list and put each URL in a group.
- Has a close replacement. A newer version of the page, or a directly equivalent product or article.
- Gone for good, no replacement. A discontinued item with nothing similar, an expired promotion.
- Unsure. The page may come back, or you do not know yet.
Why: the right response differs by group. Group 1 should usually redirect, group 2 can return 410 or 404, and group 3 should return 404 because the standard says to use it when permanence is unknown.
You have succeeded when every removed URL has exactly one group.
Step 2: Redirect pages that have a real replacement
If a close equivalent exists, send visitors there with a permanent redirect (301). Google treats a 301 as a strong signal that the target should be processed. Redirect to the most relevant page, not to the home page by habit. Redirecting many unrelated pages to one place is confusing for visitors and does not honestly represent where the content went. See 301 vs 302 redirects for the choice of redirect type.
You have succeeded when requesting the old URL returns a single 301 to a relevant page that returns 200. Check there is no chain; the redirect chains guide explains how.
Step 3: Return 410 or 404 for pages with no replacement
For group 2, a 410 states clearly that removal was deliberate. For group 3, use 404. For either, the response body can be a friendly page that explains the page is gone and offers navigation, as long as the status code in the response is genuinely 404 or 410. A friendly page with a 200 status is a soft 404, which Google's documentation describes as a page that returns a success code while showing an error or empty content; Search Console flags it. Build a good error page by following our custom 404 page guide.
Here is how to return a 410 on common servers.
nginx:
location = /promotions/summer-2023 {
return 410;
}
Apache (mod_alias):
Redirect gone /promotions/summer-2023
ASP.NET Core (a minimal endpoint):
app.MapGet("/promotions/summer-2023", () => Results.StatusCode(StatusCodes.Status410Gone));
In a CMS, look for a "gone" or "410" option in the redirect or SEO plug-in. If none exists, a 404 is fine.
You have succeeded when curl shows the correct status for each URL (see Step 5).
Step 4: Clean up everything that still points at the removed URLs
Search engines and visitors keep trying URLs they know about. Remove the reasons they know about them.
- Delete the URLs from your XML sitemap. A sitemap should list only live, indexable pages; the sitemap errors guide explains why error URLs in a sitemap cause noise.
- Update internal links to point at live pages or remove them. Our broken internal links audit shows how to find them.
- Do not block the removed URLs in robots.txt. If Google cannot fetch a URL, it cannot see the 404 or 410 and learn that the page is gone.
You have succeeded when the sitemap and your internal links contain none of the removed URLs.
Step 5: Test the actual response
Do not trust the page's appearance. Check the status line:
curl -sI https://example.com/promotions/summer-2023 | head -n 1
Expected output for a gone page:
HTTP/2 410
Test a group-1 URL as well, following redirects, to see the final status:
curl -sIL https://example.com/old-product | grep -i -E '^(HTTP|location)'
You have succeeded when removed pages without replacements return 404 or 410, and replaced pages return one 301 and then a 200.
Step 6: Monitor in Search Console
Use the URL Inspection tool on a few of the removed URLs to see what Google last found. Watch the page indexing report over the coming weeks for the URLs to move into a not-found category. Do not expect immediate results; Google gives no timeline.
If a removed page is sensitive and must disappear from results quickly, a 404 or 410 alone is not the fast route. Use the Removals tool as described in how to remove URLs from Google Search.
You have succeeded when sampled URLs show as not found and no new soft 404 reports appear.
Final verification checklist
- Each removed page with a close replacement returns one 301 to a live, relevant page.
- Each removed page without a replacement returns 404 or 410 as a real HTTP status.
- Pages you are unsure about return 404, not 410.
- No removed URL appears in the XML sitemap.
- Internal links no longer point at removed URLs.
- Removed URLs are not blocked in robots.txt.
- The error page is helpful and its status code is not 200.
curl -Ishows the status you intended for a sample from each group.
Common mistakes to avoid
- Returning 200 with a "not found" message. This is a soft 404. Fix the status code in the response, not just the page text.
- Redirecting everything to the home page. Visitors lose the context they were looking for. Redirect only where a real equivalent exists.
- Blocking removed URLs in robots.txt. Google then cannot see the 404 or 410. Allow crawling so the status can be read.
- Using 401 or 403 for removed content. These mean something else, and Google says not to use them to limit crawling. Use 404 or 410.
- Using 410 on pages that might return. If the page comes back, a 410 sent the wrong message. Use 404 when unsure, as the standard advises.
- Leaving removed URLs in the sitemap. It sends crawlers to pages that no longer exist. Regenerate the sitemap after every removal.
- Expecting instant removal. Google gives no schedule for dropping URLs. Plan for weeks, not hours.
Frequently asked questions
Does a 410 remove a page from Google faster than a 404?
Google's documentation treats them the same and gives no timeframe for either. Do not plan around a speed difference.
Will lots of 404 errors hurt my site?
Google's documentation describes 404s on pages that do not exist as a normal condition: new 404 pages are not processed, and crawling of them gradually decreases. The pages you should worry about are ones that should exist, or links that point to removed pages. Fix those.
Should I redirect or return a 404 for a discontinued product?
If a close replacement exists, redirect to it. If not, return 404 or 410. A redirect to a barely related page is worse for visitors than an honest error page.
How long should I keep returning 410?
The standard does not require servers to keep a 410 indefinitely, and leaves the duration to the owner. Keep it as long as the URL is still requested or linked from somewhere you care about.
Can I use noindex instead?
A noindex directive keeps a live page out of search results. If the page should no longer exist, a 404, 410 or redirect is the honest response. Use noindex when the page must stay accessible to visitors but not appear in search.
Is a 404 page with a search box fine?
Yes, as long as the response status is 404. Google ignores the body of a 4xx response for indexing, so the content is for visitors.
Related guides
- Custom 404 Page for SEO: A Helpful Page With the Right Status
- Soft 404 Errors: How to Find and Fix Them in Search Console
- 301 vs 302 Redirects for SEO: Which Redirect to Use and When
- Remove a URL From Google Search: Outdated or Private Pages
- Find and Fix 404 and 500 Errors in XML Sitemaps
Official references
- https://developers.google.com/crawling/docs/troubleshooting/http-status-codes
- https://www.rfc-editor.org/rfc/rfc9110.html
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/410
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/404
Next step: See how Crawvix checks a website and capture a baseline once scanning opens. This guide provides technical information, not a guarantee of rankings, traffic or index inclusion.
Crawvix Editorial Team
· Published October 29, 2026 · Last updated October 29, 2026 · 9 min read