Disindex a subdomain in Google,I have been given the need to deindex a development subdomain that was a clone of the production domain. The subdomain has come to index more pages than the own ones of production, and taking into account that it replicates contents, this is a problem, if we consider that the search engines, in particular Google, can consider it duplicate content, which can imply penalties in positioning.
Disindex a subdomain in Google
It seems that one option is to add 301 redirects to the subdomain so that all URLs are redirected to their equivalent in the production domain, but this process is slow. We speak of weeks or even months in the case of considerable amounts of URLs.
The alternative is to register the domain in Webmaster Tools , verify it and make a request to remove content from the tool itself. In particular we can do it from the menu Google Index> Remove URLs
In this section we will find a button to create a new URLS deletion request. You will ask us to enter the URL to delete. Since we want to delete all pages of the subdomain, leave the field blank. At this point we surely notice a small anxiety attack by imagining that this process disindexes not only the subdomain but also the production domain, with how catastrophic it can be for the SEO of the home page. It will not happen, so take your breath and be brave
The next thing we have to answer is whether we want to delete the indexing only or also the cache of the pages. In our case, obviously, we want to erase everything.
Once the request is submitted, from my own experience, Google is coming to take only 3 hours to disindex the subdomain completely. Something to thank for allowing us to fix URL errors quickly.
As they say in the Webmaster Tools support pages itself , the process of removal by request has a durability, after which Google indexes again that which is indexable so they recommend that we indicate by the usual means that URLs must be indexed and which ones do not.
If we want to prevent a subdomain from being fully indexed, a good option is the configuration of the robots.txt file , located at the root of the subdomain, which should contain the following:
User-agent: * Disallow: /
With this we tell all the bots that do not index anything that hangs in the root directory and we close the process.