Robots.txt has been around since 1994 and became an internet standard, RFC 9309 (opens in a new tab), in September 2022. It is the main way to tell search engines and AI companies what you want crawled.
How a robots.txt file is built
The file must be called /robots.txt, sit at the top level of the host, and be served as UTF-8 plain text. It is made of groups. Each group names one or more crawlers and lists rules for them:
User-agent: GPTBot
User-agent: CCBot
Disallow: /
User-agent: OAI-SearchBot
Allow: /
User-agent: *
Disallow: /admin/
Sitemap: https://example.com/sitemap.xmlThe rules RFC 9309 sets out:
- Matching names. A crawler matches its product token to the
User-agentlines without regard to case. If no group names it, the*group applies. - Most specific rule wins. When an
Allowand aDisallowboth match a path, the longest match wins. Paths are case-sensitive. If nothing matches, the path is allowed. - Size. Crawlers should parse at least the first 500 KiB.
- Caching. Crawlers may cache the file, but should not rely on a copy older than 24 hours unless the file cannot be reached.
- Errors. If the file answers with a 4xx error, crawlers may fetch anything. If it answers with a 5xx error, they must assume everything is disallowed.
The Sitemap: line points crawlers to your XML sitemap and works in any position in the file.
What robots.txt cannot do
RFC 9309 says it plainly: these rules are not a form of access authorisation. Robots.txt asks; it does not enforce. A scraper can ignore it, and some operators say their user-triggered fetchers may not apply it. OpenAI says this of ChatGPT-User, Perplexity of Perplexity-User, and Google of user-triggered fetchers such as Google-Agent. If a page must stay private, put it behind a login.
Robots.txt also controls crawling, not indexing. Google notes that a URL blocked in robots.txt can still be indexed without its content, so use noindex on a crawlable page when you want it out of search results.
Robots.txt and AI crawlers
Operators run separate user agents for training, search and live answers, and many publish a token for each. That lets you, for example, refuse GPTBot and ClaudeBot while allowing OAI-SearchBot and Claude-SearchBot. Some tokens only exist in robots.txt: Google-Extended and Applebot-Extended never crawl themselves.
How Reveata helps
On the Bot traffic page you mark crawlers as allowed or blocked, and Reveata turns your choices into robots.txt lines to copy into your file. Each crawler's page in the crawler directory lists its robots.txt tokens and any note from the operator about whether it follows the file. Reveata does not enforce the rules for you. After a change, the Bot traffic page shows whether a crawler's hits actually fall, provided you forward crawler requests from your server.