7

I have subdomain "klient" for testing websites for our clients and I don't want that to be indexed. I have set in robots.txt (in root of our web) this:

User-agent: *
disallow: /subdom/klient/*

But I'm not sure, if it does really work, because I have now found testing site in google results...

Where could be problem or how could we stop google and other bots indexing this folder...?

Thank you

stepik21
  • 2,610
  • 3
  • 22
  • 32

1 Answers1

15

You can do that by placing a robots.txt in the root directory of your subdomain.

So in your klient.example.com, place a robots.txt with the following content:

User-agent: *
Disallow: /

If you want to remove already indexed pages, create a new webconsole site with your subdomain and remove the indexed pages there.

John Kugelman
  • 349,597
  • 67
  • 533
  • 578
  • And will this affect all folders in this subdomain? Because the structure is for every client like this: klient.3angle.cz/ourClient/ – stepik21 May 26 '17 at 15:02
  • 1
    yes, this will affect all folders in subdomain. so: klient.3angle.cz/ourClient/ klient.3angle.cz/ourClient2/ klient.3angle.cz/newClient/ And every other folder and subfolder in klient.3angle.cz will get affected. –  May 26 '17 at 15:08