Mobile app version of vmapp.org
Login or Join

Login to follow query

More posts by @Lengel546

1 Comments

Sorted by latest first Latest Oldest Best

 

@YK1175434

In your case, instead of preventing indexing for your 404 pages, you should consider to create a specific 404 page by adding this line in your .htaccess file:

ErrorDocument 404 /specific-404-page/


All your current 404 pages would be redirected to your specific 404 page and would be removed from search engines' index.

If your current 404 pages are old pages, you can return a 410 HTTP status (Gone) with these lines in your .htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} /first-page/ [OR]
RewriteCond %{REQUEST_URI} /second-page/ [OR]
RewriteCond %{REQUEST_URI} /third-page/
RewriteRule ^.*$ - [G]
</IfModule>


Theoretically, it helps search engines to remove pages quicker from their index.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme