Create a 410 Redirect for Missing Files

Creating a 410 Gone Redirect for Removed Pages

 

A 410 response tells search engines that a page has been permanently removed and will not be coming back. This is different from a 404 (not found), which could be temporary. Using 410 helps Google deindex removed pages faster.

 

How to Set Up a 410 in .htaccess

Add these lines to your .htaccess file for each URL you want to mark as gone:

RewriteEngine On
RewriteRule ^old-page.html$ - [G,L]

 

The [G] flag tells Apache to return a 410 Gone status. You can add multiple RewriteRule lines for multiple URLs.

 

When to Use 410 vs 301

  • 301 Redirect: Use when the content has moved to a new URL. This passes link value to the new page.
  • 410 Gone: Use when the content is permanently removed with no replacement. Google will deindex the URL.
  • 404 Not Found: The default for missing pages. Google eventually deindexes 404 pages but slower than 410.

 

After adding 410 rules, you can use Google Search Console > Removals to request expedited deindexing of specific URLs.

  • 107 Users Found This Useful

Was this answer helpful?

Related Articles

Nginx redirecting folder to another host or server

From time to time you may want to proxy out a path to another server or location. To perform a...

Redirecting non-www to www with htaccess

Redirecting non-www to www with .htaccessIf you ever point your www. record to another server...

htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

To solve “.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable” follow...

When I upload an htaccess file it disappears

Why Your .htaccess File Appears to Disappear After Uploading   On Linux servers, any file...

Show longer file names in directory/folder index

If you've ever wanted to show longer file names in your directory listing just create or edit an...



Save 30% on web hosting - Use coupon code Hosting30