ratikant rautra
ratikant rautra

Reputation: 1

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

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?

Upvotes: -1

Views: 120

Answers (1)

Moudi
Moudi

Reputation: 525

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

Upvotes: 1

Related Questions