Crawling and robots.txt · robots.txt file
Conflicting user-agent groups
A specific group such as Googlebot replaces the * group rather than adding to it, so general rules can be dropped by accident.
How this page is built
The robots.txt file on the test host has a general group that blocks a folder called /private/, followed by a group for Googlebot that allows everything. Googlebot follows only its own group, so the private folder is open to it.
The test host is robots-groups.techseotests.com, and its file is at https://robots-groups.techseotests.com/robots.txt. A host has only one robots.txt file, so this test has a subdomain of its own. Every other address on that subdomain redirects back to this site.
Why it matters
Crawlers follow only the most specific group in robots.txt that matches their name. When a file has a general group for every crawler and a separate group for Googlebot, Googlebot reads only its own group and ignores the general one completely.
This catches people out when they add a named group for one extra rule and expect the general rules to carry on applying. Blocked folders, crawl traps and private areas can all open up to that crawler without anyone noticing.
How to check it
Open the robots.txt file and look for more than one group that could match the same crawler. Google’s robots.txt report in Search Console shows how Googlebot reads the file. Crawl tools only read a robots.txt file for the hosts they crawl. Set the crawl to follow links to subdomains, or start a crawl at the subdomain, and look at the robots.txt report.
How to fix it
Repeat every general rule inside each named group, or remove named groups that are not needed. After a change, test a few blocked addresses for each crawler you name.