WordPress.org

Ready to get started?Download WordPress

Forums

WordPress MU Domain Mapping
[resolved] Subdomains indexed by Google while mapped to domain (3 posts)

  1. perininero
    Member
    Posted 4 months ago #

    While the WordPress MU Domain Mapping plugin is used to map WP network subdomains to other domains, all subdomains are beiing indexed by Google.

    Clicking the indexed url's (subdomain.example.com) leads via 301 redirect to the mapped domain; so thats good.

    • How to make sure in future installs the subdomains are not indexed by Google when this subdomain of the network is mapped to another domain?
    • How to solve this issue at current network installs?

    One example can be found at network install http://recruytment.com
    The google index: https://www.google.nl/search?q=site:recruytment.com

    Thank you.

    https://wordpress.org/plugins/wordpress-mu-domain-mapping/

  2. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 4 months ago #

    If the subdomains had indexing enabled before you mapped the domain the content will continue to be shown in search results for a while.

    How to make sure in future installs the subdomains are not indexed by Google when this subdomain of the network is mapped to another domain?

    Turn off indexing on the site until you have mapped the domain.

  3. perininero
    Member
    Posted 4 months ago #

    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

Reply

You must log in to post.

About this Plugin

About this Topic