Mobile app version of vmapp.org
Login or Join
Ogunnowo487

: My website was hacked which is now recovered but the hacker indexed 5000 URLs in Google and now I get error 404 A 404 is probably preferable to blocking with robots.txt if you want

@Ogunnowo487

My website was hacked which is now recovered but the hacker indexed 5000 URLs in Google and now I get error 404


A 404 is probably preferable to blocking with robots.txt if you want these URLs dropped from the search engines (ie. Google). If you block crawling then the URL could still remain indexed. (Note that robots.txt primarily blocks crawling, not indexing.)

If you want to "speed up" the de-indexing of these URLs then you could perhaps serve a "410 Gone" instead of the usual "404 Not Found". You could do something like the following with mod_rewrite (Apache) in your root .htaccess file:

RewriteEngine On
RewriteRule ^+ - [G]

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Ogunnowo487

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme