Forum Moderators: phranque
I have a problem. Google has indexed a redirecting URL which points to my root page. I would like to have a rewrite rule which will force an error so that Googlebot realises that it is dead.
At the end of the URL is a query string like this;
?searchenginename
How could I rewrite this so that it sends a 404. Or is there a better error to send back like forbiden for example?
Any help would be very gratefully received.
Many thanks in advance
Sid
I've figured it for myself.
RewriteEngine on
Options +FollowSymlinks
RewriteBase /
RewriteCond %{QUERY_STRING} searchenginename
RewriteRule ^$ /product1.html [L]
Since product1.html does not exist this returns a 404 so Googlebot should eventually get the idea and remove the URL.
I hope that this may help others.
Best wishes
Sid
Would it be better to use [R=301,L] to indicate that the page has "Moved Permanently"?
Wouldn't that just keep the link in the index. My objective in this is to get the erroneous pseudopage removed from Google's index.
I'll sticky you the actual search so you can see what I'm trying to do.
Best wishes
Sid
Nevertheless you should create a page called "product1.html" and place this tag in the "<head>" section:
<meta name="robots" value="noindex,nofollow"> You can let the content of the page be blank or whatever - the tag is the only thing that is really needed.
Link: [google.com...]
I had a very similar case [webmasterworld.com] in november and got the URL error removed within 12 hours using the express remove procedure outlined on the above page.