How to remove Plesk websites temporary urls from Google index?

How to remove Plesk websites temporary urls from Google index? - If a page has internal and external outgoing links to redirecting URLs, it’s returning 3xx (301, 302, etc.) HTTP status codes standing for redirection. This issue means that the page does not exist on a permanent or temporary basis. It appears on most of the popular web browsers, usually caused by a misconfigured website. However, there are some steps you can take to ensure the issue isn’t on your side. You can find more details about redirecting URLs by reading the Google Search Central overview. In this article, we’ll go over how you can fix the How to remove Plesk websites temporary urls from Google index? error on your web browser. Problem :


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 ?


Solution :

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


We hope that this article has helped you resolve the htaccess, redirects, google-index error in your web browsers. Enjoy browsing the internet uninterrupted!

Comments

Popular posts from this blog

How do I redirect traffic only if being accessed from a specific port?

DNS entry to redirect constant url to changing directory name

How to redirect to any domain [duplicate]