It is necessary to remove test domain pages from the Yandex index. The test and primary domain is for one site, so the robots.txt file is one. How in robots.txt to specify a ban for a test file? test domain, for example, site-com-ua.1gb.ua, the main one is site.com.ua if Disallow: /, then the ban on the main site. And how will the test be?

  • robots.txt only affects the domain on which it is located, and if Disallow: / registered in the robots.txt domain site-com-ua.1gb.ua, then it will not be able to affect the site.com.ua domain at all - andreymal

1 answer 1

Sites are usually in different folders. Each folder has its own robots.txt. The test folder should be

 Disallow: / 
  • And where can I read about the fact that "Each folder has its own robots.txt" is permissible? - andreymal
  • I have a few dozen client sites on a virtual server, each in a separate folder /var/www/site-xxx . Each folder has its own robots.txt . nginx works as a web server. - KAGG Design
  • How to set up robots.txt can be found in Google Help: support.google.com/webmasters/answer/6062596?hl=ru There, by the way, it says that robots.txt commands operate on directories on the server, not url . - KAGG Design
  • And, so you're not talking about those folders, okay - andreymal
  • What is your directory structure (folder) on the server? Where do root directives indicate in the nginx config? - KAGG Design