How to remove Plesk websites temporary urls from Google index?
Google is indexing Plesk temporary URLs, I've tried the following tip but it does not block those URLs.
Why Google indexed the preview URL of domain?
I added this to .htacess with no success:
RewriteEngine On
RewriteCond %HTTP_HOST !^(www.)?example.com$
RewriteRule .* - [E=block:1]
Header set X-Robots-Tag "noindex,nofollow" env=block
How can I block Plesk temporary URLs from being indexed ?
You need to test to ensure that each URL that appears in Google actually has the tag that you are expecting. I use cURL with the --head
option for this type of testing.
curl --head 'http://temporaryurl.example.com/'
You want to make sure that the header include the expected line:
X-Robots-Tag: noindex,nofollow
Conversely, you should test to make sure it doesn't appear for your own domain name.
If this tag is indeed there, Google should not be indexing your temporary URLs (although it will crawl them to find the robots header information). I don't see anything obviously wrong with your rewrite rules, but my guess is that they are not working and you need to test them.
The easiest and most stable way is to 301 redirect the plesk pages to an alternative URL. So if you have a plesk page on your HTTPS URL then 301 redirect it to the HTTP URL.
Once Google sees this and processes it you will those pages removed from the index.
www.example.com
will need replacing with your real URL.
You could also try blocking the other URL's using robots.txt
Comments
Post a Comment