Stop some subdomains xxx.xxx.com of a single website being indexed by search engines

63 Views Asked by At

I need to stop indexing subdomains of a same site, for example:

  1. aaa.xxx.com: (No indexing)
  2. bbb.xxx.com: (No indexing)
  3. www.xxx.com: (It should indexed)

All the subdomains are under the same domain. How can we achive that?

1

There are 1 best solutions below

0
Moudi On

On the subdomain you don't want indexed, include a robots.txt file in the main web directory that contains:

User-agent: *
Disallow: /

On the subdomain you want to index, don't do anything