Classic Search
robots.txt
robots.txt is a plain text file at the root of a host, such as example.com/robots.txt, that tells crawlers which paths they may fetch. Its rules are grouped by user agent and follow the Robots Exclusion Protocol, published as RFC 9309 in 2022. Crawlers are asked to honour it; it is not access control.
- Industry term
By QueryRev ResearchPublished Updated5 min read
Why it matters.
The file is the first thing a well-behaved crawler reads, and its grammar is stricter than it looks. A crawler finds the group whose user-agent line matches its product token, without regard to case, and obeys that group alone; only when no group names it does it fall back to the group for *[1]. Within the group the longest matching path wins, and an allow beats an equal disallow[1]. A site that adds a short group for one AI crawler has, often without meaning to, released that crawler from every rule of the catch-all group.
It controls crawling, not indexing. Google says the file is used mainly to avoid overloading a site and is not a mechanism for keeping a page out of Google: a blocked URL can still be indexed from links that point to it, and the way to keep a page out is noindex or a password[2]. The standard adds that listing a path in the file makes it public, so the file is no place to hide anything[1].
How the server answers matters as much as what the file says. Under RFC 9309 a 4xx answer lets the crawler access everything, while a server or network error means it must assume complete disallow[1]. Google treats every 4xx except 429 as no file, stops crawling for the first 12 hours of 5xx errors, then works from its last good copy for up to 30 days, and in normal times caches the file for up to 24 hours[3]. A file that times out can halt the crawl of a healthy site; one that answers 404 opens it.
Rules apply only to the host, protocol and port that serve them, so a file on example.com says nothing about shop.example.com[3].
Across the web the file is used bluntly as often as finely. In QueryRev’s study, 6,294 of the 9,973 domains gave a robots.txt answer that could be read, and 190 of those, 3.0%, close the whole site in the catch-all group, the rules every crawler without a group of its own follows[4]. Newer lines appear beside the rules: 164 of the 5,637 files read, 2.9%, carry a Content-Signal line stating preferences for search, AI input and AI training[4].
How it is measured.
Fetch the file as a crawler does, from each host and protocol the site serves, and record the status code, the redirect chain and the time it took. Then read it per product token: which group applies, and whether a given URL is allowed. Google reads at most 500 KiB of the file[3], the least that RFC 9309 lets a crawler parse[1].
Test the URLs that matter instead of reading the rules by eye: the pages you want crawled, the pages you want left alone, and the paths that sit between two rules. Server logs then show whether each crawler behaved as the file asks.
Watch the file as you would any release. A deploy that ships a staging file with Disallow: / closes the whole site, and it shows first as a fall in crawl requests in the logs, before rankings move.
Measured by
- Status of the file
- Rule per crawler and URL
- Crawl requests after a change
A worked example.
Sample data: an invented site, to show the method.
A shop’s robots.txt keeps every crawler out of /checkout/ and /account/ in the catch-all group. Last month someone added a group for GPTBot with a single rule, to keep it out of /blog/drafts/. GPTBot now obeys that group alone, so /checkout/ and /account/ are open to it.
The fix is to repeat the shared rules inside the GPTBot group. Testing the three paths against both groups, before and after, shows the difference in a minute.
What to do, step by step.
Serve one robots.txt per host, as plain text at /robots.txt, answering 200 and quickly.
Keep the catch-all group for the rules every crawler shares, and name a crawler only when it needs different rules.
In every named group, repeat the shared rules that crawler should still follow.
Use noindex, not Disallow, for pages that must stay out of search results, and leave those pages crawlable so the noindex can be read.
Put private paths behind authentication; never list them in the file as a way of hiding them.
Test the important URLs against each group after every change, and watch the crawl in the server logs for a week after each deploy.
Mistakes to avoid.
A named group that forgets the shared rules. A crawler obeys the group that names it and ignores the rest. Rules left in the catch-all group no longer apply to it.
Disallow to remove a page from search. A blocked page can still be indexed from links, and a crawler cannot read the noindex of a page it may not fetch.
A file that errors. A server error on robots.txt reads as a full disallow, so a slow or failing file can stop the crawl of a site that is otherwise healthy.
One file for every subdomain. Rules apply to the host that serves them. A blog or a shop on its own subdomain needs its own file.
Trusting lines a crawler ignores. Google does not support fields such as crawl-delay. Check each crawler’s documentation before relying on a line to work.
How QueryRev treats it.
QueryRev reads robots.txt with the rest of a site’s crawl state and evaluates it per crawler and per URL, so a page that should rank or be cited and is closed to the crawler that would read it shows with the rule that closes it. A change to the file is a change to the site: it passes your policy and is written to the Change Ledger with the file before and after. See Governed Execution.
Questions people ask.
Is a robots.txt file required?
No. If there is no file, or the server answers with a 4xx status, crawlers may fetch every path. A file is worth having when some paths should not be crawled, or to point crawlers to the sitemap.
Does robots.txt stop AI training?
Only for crawlers that honour it, and only through the token that governs training for each vendor, such as GPTBot for OpenAI or Google-Extended for Gemini. A rule for one token does not reach another, and a crawler with no group of its own follows the catch-all group.
How quickly does a change to robots.txt take effect?
Google generally caches the file for up to 24 hours, and other crawlers read it again on their own schedule, so allow at least a day before judging a change by what crawlers fetch.
Sources and citation.
Primary sources only: the search engines, the AI vendors, standards bodies and QueryRev’s own research. Each is cited in the text by its number.
Introduction to robots.txtGoogle Search Central ·
How Google interprets the robots.txt specificationGoogle Crawling Infrastructure ·
State of AI crawler access, October 2026QueryRev Research ·
Cite this definition
A suggested citation. Its link goes to the definition, whose anchor does not change.
QueryRev Research. “robots.txt.” QueryRev AI glossary, 18 October 2026. https://queryrev.com/glossary/robots-txt#definition
Related terms