robots.txt
robots.txt is a file at the root of a host that asks crawlers not to fetch certain paths, defined by the Robots Exclusion Protocol, RFC 9309.
AI assisted in drafting. This local editorial draft is pending review.
robots.txt is a text file at the root of a host that tells crawlers which paths they are asked not to fetch, defined by the Robots Exclusion Protocol, RFC 9309. It is how sites state access preferences to AI crawlers.
In practice
RFC 9309, published in September 2022 as a Proposed Standard, specifies how a crawler matches its user agent to a group of rules and how the most specific path rule applies. It states that these rules are not a form of access authorization: compliance is up to the crawler. A crawler that matches a named group ignores the general * group, so private paths must be repeated in each named group.
The file applies per host, including subdomains. If fetching it returns a 4xx status, crawlers may treat it as unavailable and crawl; a 5xx status means they must assume a full block. For AI, robots.txt can allow search agents while disallowing training agents; enforcement needs server or CDN rules.
Other names
Robots exclusion file. In Chinese, robots 协议 or robots.txt 文件.
Related terms
AI crawler · Google-Extended · llms.txt
Guide: allow AI search while limiting training