What isrobots.txt
robots.txt is a plain-text file at the root of a website (for example example.com/robots.txt) that tells crawlers which parts of the site they may request.
It follows the Robots Exclusion Protocol, standardised as RFC 9309 (RFC Editor). It controls crawling, not indexing: to keep a page out of Google, use noindex instead (Google).
Connected terms
The terms next to robots.txt in AI search, and where to read more.
GPTBot→GPTBot is OpenAI's web crawler for collecting publicly available content that may be used to train OpenAI's generative AI foundation models.How to Configure robots.txt for AI Crawlers→Step-by-step robots.txt setup for AI crawlers: separate search from training, avoid the precedence trap, test, verify in logs and maintain.All Technical guides→- robots.txt is a plain-text file at your site root that tells crawlers which paths they may fetch.
- Each group applies to the user agent it names; the most specific matching group wins under Google's rules.
- It controls crawling, not indexing; use noindex to keep a page out of results.
- In MentionX data, 0 of 9,750 citations pointed to llms.txt or other .txt files.
Checked on 31 October 2026. "Our view" marks MentionX opinion. Ledgerline is a fictional company used for illustration.
01What does it look like?
User-agent: *
Disallow: /admin/
User-agent: GPTBot
Disallow: /
User-agent: OAI-SearchBot
Allow: /
Sitemap: https://example.com/sitemap.xml02How do crawlers read it?
According to Google's documentation (robots.txt spec):
- A crawler follows the most specific user-agent group that matches it and ignores the others.
- Within a group, the longest matching path wins. When rules conflict, the least restrictive one applies.
- Google generally caches the file for up to 24 hours.
03Why does it matter for AI visibility?
AI companies publish separate user agents for training and for search, such as OpenAI's GPTBot and OAI-SearchBot (OpenAI). A careless blanket rule can block the very agents that put you in AI answers. Review the file whenever your AI policy changes.
04What are the common mistakes?
- A
Disallow: /underUser-agent: *left over from staging. - Blocking the CSS or JS needed to render pages.
- Assuming a block removes pages that are already indexed.
05How do you test your file?
Open yourdomain.com/robots.txt in a browser to see what's live. Use the robots.txt report in Google Search Console to check how Google fetched it. For each AI agent you care about, read through the groups and confirm which one applies, remembering that a named group overrides User-agent: * completely for that agent.
06From MentionX data: what engines actually citedOriginal data
Method. Read-only aggregate queries over MentionX scans from 22 August to 29 October 2026 (UTC): 2,217 engine runs (2,154 completed) across 18 anonymised projects and six engines.
| Cited URL type | Share of 9,750 citations |
|---|---|
| Blog or article | 19.6% |
| Homepage | 10.0% |
| Review page | 2.7% |
| Docs | 2.6% |
| Pricing | 1.9% |
| Wikipedia | 1.6% |
We hold no crawler logs, so we can't show how bots read robots.txt. We can show where engines' citations landed once crawling had done its work.
No citation pointed to a .txt file of any kind, including llms.txt. Ordinary pages carried the weight.
Our view: robots.txt is a gatekeeper, not a ranking signal. Get it right so crawlers reach the pages in this table, then spend your time on those pages.
Limits. A convenience sample of mostly B2B software projects, run through engine APIs, which can behave differently from the consumer apps. Perplexity, Copilot and DeepSeek figures come from a single day (26 October 2026), so treat them as a snapshot, not a trend.
07Worked example: Ledgerline's robots.txt review
Ledgerline is a fictional accounts-payable tool. Figures are illustrative.
Ledgerline's file has grown over five years to 60 lines, with rules for crawlers that no longer exist and a User-agent: * group that disallows /resources/, where all its guides now live.
The team rewrites it to 14 lines: a general group allowing everything except the app and admin paths, a GPTBot group reflecting the legal team's decision, and a sitemap line. They test the file in Search Console's robots.txt report and confirm the guides are fetchable.
08How specific should rules be?
Under Google's documented rules, the most specific matching group applies to a crawler, and within a group the longest matching path rule wins (Google). That means a crawler named in its own group ignores the User-agent: * group entirely, so repeat any shared rules inside named groups. RFC 9309 sets out the same group logic for crawlers that follow the standard (RFC 9309).
Questions people ask
3 answersDoes robots.txt stop a page from being indexed?
+
Not reliably. A blocked URL can still be indexed without its content if other pages link to it. Use noindex to keep a page out of Google.
How quickly do changes apply?
+
Google generally caches robots.txt for up to 24 hours.
Can I set rules for AI crawlers?
+
Yes. Add a group for each user agent, such as GPTBot, OAI-SearchBot, PerplexityBot or Google-Extended.