In robots.txt file I have following sections
User-Agent: Bot1
Disallow: /A
User-Agent: Bot2
Disallow: /B
User-Agent: *
Disallow: /C
Will statement Disallow:c
be visible to Bot1 & Bot2 ?
In robots.txt file I have following sections
User-Agent: Bot1
Disallow: /A
User-Agent: Bot2
Disallow: /B
User-Agent: *
Disallow: /C
Will statement Disallow:c
be visible to Bot1 & Bot2 ?
tl;dr: No, Bot1 and Bot2 will happily crawl paths starting with
C
.Each bot only ever complies to at most a single record (block).
Original spec
In the original specification it says:
Expired RFC draft
The original spec, including some additions (like
Allow
) became a draft for RFC, but never got accepted/published. In 3.2.1 The User-agent line it says:So it confirms the interpretation of the original spec.
Implementations
Google, for example, gives an example that seems to follow the spec:
If the bots obey the robots.txt file, yes the statement will be visible, so they will not be able to crawl /c.
The wild card (*) after the user agent means all user agents.
However bear in mind not all bots obey robots.txt