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 ?


3 Answers 3


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

  • I already did it but google keeps indexing the Plesk temporary urls. I have hundreds of these urls so using robots.txt isn´t a good solution.
    – DesignT
    Jan 29, 2016 at 8:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.