Create a 410 Redirect for Missing Files

htaccess & Redirects | Updated 2026

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.

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 Ticket

Quick Recap

  1. 410 = permanently gone, tells search engines to deindex
  2. Use [G,L] flag in RewriteRule
  3. Use 301 instead if the content moved to a new URL
  4. Works for single pages, patterns, or directories
  5. Google processes 410s faster than waiting for 404s to age out

URL management · Last updated March 2026 · Browse all htaccess articles

  • 107 Users Found This Useful

Was this answer helpful?

Related Articles

301 Redirect

Updated 2026 Quick Answer A 301 redirect permanently sends visitors and search engines...

Redirecting non-www to www with htaccess

htaccess & Redirects | Updated 2026 Choosing between www and non-www for your domain is a...

htaccess referral redirect

htaccess & Redirects | Updated 2026 You can use .htaccess to redirect visitors based on...

What are all these htaccess files?

Article Updated This article has been consolidated Everything about .htaccess files is in...

Show longer file names in directory/folder index

Updated 2026 Quick Answer To show longer file names in Apache's directory listing...



Save 30% on web hosting - Use coupon code Hosting30