A 410 (Gone) status code tells search engines that a page has been permanently removed and should be deindexed. Unlike a 404 (Not Found), a 410 explicitly communicates that the removal was intentional. Use this when you want Google to stop showing a deleted page in search results.
Add a RewriteRule to .htaccess
Add this to your .htaccess file for each URL you want to return a 410:
RewriteEngine On
RewriteRule ^old-page\.html$ - [G,L]
The [G] flag tells Apache to return a 410 Gone response.
01. Remove a Single Page
RewriteEngine On
RewriteRule ^old-page\.html$ - [G,L]
02. Remove Multiple Pages
RewriteEngine On
RewriteRule ^old-page-1\.html$ - [G,L]
RewriteRule ^old-page-2\.html$ - [G,L]
RewriteRule ^blog/outdated-post/?$ - [G,L]
03. Remove an Entire Directory
RewriteRule ^old-section/ - [G,L]
04. When to Use 410 vs 301
- Use 301 when the content moved to a new URL - redirects users and passes SEO value
- Use 410 when the content is gone and there is no replacement - tells search engines to remove it
- Use 404 when the page simply does not exist (the default for missing URLs)
For 301 redirects, see 302 Redirects and the .htaccess Guide.
Need Help With Redirects?
Open a Support TicketFrequently Asked Questions
What is a 410 Gone status and how is it different from 404?
A 410 tells search engines a page was permanently and intentionally removed, so they should deindex it. A 404 just says not found, which engines may keep retrying. Use 410 when you deliberately deleted a page and want it dropped from search.
How do I return a 410 for a removed page?
In .htaccess use a Redirect gone directive, for example Redirect 410 /old-page.html, or a RewriteRule with the [G] flag. The server then returns 410 for that URL, signaling intentional removal to crawlers.
Should I use a 410 or a 301 redirect?
Use a 301 when the content moved and you want to send visitors and ranking to the new URL. Use a 410 when the content is gone for good and you want it deindexed with no replacement. Do not 301 unrelated pages to the homepage just to avoid a 404.
How do I return 410 for an entire directory?
Use a RewriteRule matching the directory path with the [G,L] flags in .htaccess, which returns 410 for everything under that path. This cleanly deindexes a whole removed section rather than leaving 404s.
Quick Recap
- 410 = permanently gone, tells search engines to deindex
- Use [G,L] flag in RewriteRule
- Use 301 instead if the content moved to a new URL
- Works for single pages, patterns, or directories
- Google processes 410s faster than waiting for 404s to age out
URL management · Last updated November 2026 · Browse all htaccess articles
