Quantcast
Channel: WordPress.org Forums » [WordPress MU Domain Mapping] Support
Viewing all articles
Browse latest Browse all 3502

perininero on "[Plugin: WordPress MU Domain Mapping] Subdomains indexed by Google while mapped to domain"

$
0
0

Well the strange thing is it should be not indexed because of the 301. However I found a solution to this:

  • First create a disallow and noindex robots.txt; save this in the main wp folder and name it something like robots-subdomains.txt:
  • User-agent: *
    Disallow: /

    User-agent: Googlebot
    Noindex: /

  • In htaccess rewrites of the subdomains to this extra robots.txt file:
  • RewriteCond %{HTTP_HOST} =subdomain1.example.com
    RewriteRule ^robots\.txt$ /robots-subdomains.txt [L]

  • Add all subdomains to your google webmaster tools (tools will find the noindex of the robots file and give warning)
  • In webmaster tools ask google to delete the url from the index
  • Within a few days all false indexed subdomains are gone from google search

Viewing all articles
Browse latest Browse all 3502

Trending Articles