AI Search Optimization Guide
robots.txt and llms.txt: The Complete AI Crawler Setup (2026)
robots.txt controls which AI crawlers can reach your site. llms.txt points those crawlers to your best content. Two files, two different jobs, and most site owners confuse them. Here’s the complete setup, with copy-paste rules and the crawler list that actually matters in 2026.
By Rahul Saini, Author at Search Counsel Co. Last updated August 2026.
The short answer
robots.txt is your access-control file: it tells AI crawlers like GPTBot, ClaudeBot, and PerplexityBot which parts of your site they may fetch. llms.txt is a separate, newer file that points AI systems to your most important pages in clean Markdown. Every major AI company honors robots.txt for its declared crawlers. None of them has committed to reading llms.txt yet, so treat it as a low-cost bet. For most businesses that want to be found, the right setup is simple: allow the search and retrieval crawlers, decide on the training crawlers separately, and never block everything by default.
robots.txt vs llms.txt vs sitemap.xml at a glance
| File | What it’s for | Format | Honored by AI engines today? |
|---|---|---|---|
| robots.txt | Access control: which crawlers may fetch which pages | Plain-text directives | Yes, by every major AI company for its declared crawlers |
| llms.txt | Curation: points AI to your best pages | Markdown | Not yet by the big AI companies; adoption is early |
| sitemap.xml | Discovery: a full list of your indexable URLs | XML | Used by search crawlers; not an AI-specific signal |
Jump to what you need
Article note: Written by Rahul Saini at Search Counsel Co. Crawler tokens and behavior in this guide were checked against the official crawler docs from OpenAI, Anthropic, Perplexity, and Google Search Central, plus current published studies. AI crawler names and policies change quickly, so re-verify against the primary docs before you rely on any single rule.
1) robots.txt vs llms.txt: what’s the difference?
They do different jobs, and mixing them up is the most common mistake in AI crawler setup.
robots.txt is about access. It sits at your site root and tells crawlers which user-agents may fetch which paths. This is the file you use to allow or block GPTBot, ClaudeBot, PerplexityBot, and the rest. It has been the web standard for decades and every major AI company honors it for its declared crawlers. Our companion guide, robots.txt for the AI era, covers the enforcement side in more technical depth.
llms.txt is about curation. It’s a Markdown file, also at your root, that hands AI systems a short, ranked list of your most useful pages so they don’t have to guess. It doesn’t grant or deny access. It says “if you’re going to read me, start here.”
You’ll see guides that tell you to put lines like User-agent: GPTBot / Disallow: / inside llms.txt. That’s wrong. Access rules belong in robots.txt. llms.txt is a content map, not a rules file, and loading it with crawler directives just breaks the format.
Simple rule: robots.txt decides who gets in. llms.txt decides what they read first. Keep the two files separate and give each one job.
2) The AI crawlers that matter in 2026
You can’t write good rules until you know what you’re writing them for. Here are the crawlers worth knowing, grouped by who runs them. Each user-agent is its own independent switch, so allowing one from a company does not automatically allow the others.
| Crawler (robots token) | Company | What it’s for | Type |
|---|---|---|---|
| GPTBot | OpenAI | Collects content that may train future models | Training |
| OAI-SearchBot | OpenAI | Indexes pages for ChatGPT search citations | Retrieval |
| ChatGPT-User | OpenAI | Fetches a page when a person asks ChatGPT to read it | User-triggered |
| ClaudeBot | Anthropic | Collects content that may train Claude | Training |
| Claude-SearchBot | Anthropic | Indexes pages for Claude’s retrieval and citations | Retrieval |
| Claude-User | Anthropic | Fetches a page when a person asks Claude to read it | User-triggered |
| PerplexityBot | Perplexity | Indexes pages for Perplexity answers and citations | Retrieval |
| Perplexity-User | Perplexity | User-requested fetch (often ignores robots.txt) | User-triggered |
| Googlebot | Search index, and it powers AI Overviews and AI Mode | Retrieval | |
| Google-Extended | Permission token for Gemini and Vertex AI training (not a crawler) | Training control | |
| CCBot | Common Crawl | Open dataset that feeds many AI models | Training |
| Bytespider | ByteDance | Training crawler, high volume, sometimes ignores robots.txt | Training |
| Applebot-Extended | Apple | Opt-out token for Apple Intelligence training | Training control |
| Meta-ExternalAgent | Meta | Collects content for Meta’s AI models | Training |
| Amazonbot | Amazon | Feeds Alexa answers and the Rufus shopping assistant | Assistant |
Two things change over time here: the exact token strings and which company owns which bot. Anthropic, for example, consolidated its older anthropic-ai and claude-web tokens into the three above. Always confirm against the vendor’s current crawler docs before you ship a rule. If crawler volume is straining your server, our guide to crawl budget covers the load side.
3) Training, retrieval, or user-triggered: three jobs, three decisions
The single most useful idea in this whole topic is that “AI crawler” isn’t one thing. The bots fall into three groups, and each group is a separate decision.
- Training crawlers collect content to build or improve models: GPTBot, ClaudeBot, Google-Extended, CCBot, Applebot-Extended, Bytespider, Meta-ExternalAgent. Block these and your content won’t feed future models. There’s no direct traffic either way, so this is a values and licensing decision, not a visibility one.
- Retrieval crawlers fetch pages to cite in live answers: OAI-SearchBot, Claude-SearchBot, PerplexityBot, and Google’s own Googlebot. These are the ones that get you named and linked inside AI answers. Block one and you disappear from that engine’s responses. Almost every business wants these allowed.
- User-triggered fetchers visit a page because a human asked, in real time: ChatGPT-User, Claude-User, Perplexity-User. These often ignore robots.txt on the logic that a person requested that specific page. Perplexity states plainly that its user-triggered fetches generally do not follow robots.txt.
Watch out: training and citation are now two separate switches. You can opt out of training and stay fully citable, or the reverse. Deciding “block all AI” in one move usually throws away citations you actually wanted.
4) Setting up robots.txt for AI crawlers
Your robots.txt lives at yourdomain.com/robots.txt, at the root, nowhere else. One thing to keep in mind before you start: under the formal standard (RFC 9309), robots.txt is an instruction, not a lock. Compliant crawlers obey it. It does not physically stop anyone, so it isn’t a security tool. For that you need real access controls, which we’ll cover below. It’s also worth remembering that blocking a page here doesn’t remove it from an index; that’s what noindex is for.
Here are three setups for the three situations most sites are in. Bot-specific groups override the wildcard, so list them after your User-agent: * block.
Setup A. Maximum AI visibility (the right default for most businesses). Let AI crawlers reach everything public, and only fence off private areas.
# Let all crawlers reach public content
User-agent: *
Allow: /
# Keep private areas out of everything
Disallow: /admin/
Disallow: /cart/
Disallow: /checkout/
Sitemap: https://yourdomain.com/sitemap.xml
Setup B. Stay citable, opt out of training. This is the nuanced middle ground: appear in AI answers, but keep your content out of model training.
# Allow AI search and retrieval crawlers (stay citable)
User-agent: OAI-SearchBot
Allow: /
User-agent: Claude-SearchBot
Allow: /
User-agent: PerplexityBot
Allow: /
# Allow user-triggered fetchers
User-agent: ChatGPT-User
Allow: /
User-agent: Claude-User
Allow: /
User-agent: Perplexity-User
Allow: /
# Opt out of AI model training
User-agent: GPTBot
Disallow: /
User-agent: ClaudeBot
Disallow: /
User-agent: Google-Extended
Disallow: /
User-agent: CCBot
Disallow: /
User-agent: Applebot-Extended
Disallow: /
User-agent: Bytespider
Disallow: /
# Everything else, including Googlebot for Search and AI Overviews
User-agent: *
Allow: /
Sitemap: https://yourdomain.com/sitemap.xml
Setup C. Block AI as far as robots.txt allows. For paywalled, licensed, or proprietary content. Note that Googlebot stays allowed so you remain in Google Search, which also keeps you in AI Overviews. There’s no clean way around that, as the next section explains.
# Block AI training crawlers
User-agent: GPTBot
Disallow: /
User-agent: ClaudeBot
Disallow: /
User-agent: Google-Extended
Disallow: /
User-agent: CCBot
Disallow: /
User-agent: Bytespider
Disallow: /
User-agent: Applebot-Extended
Disallow: /
User-agent: Meta-ExternalAgent
Disallow: /
# Block AI search and retrieval crawlers
User-agent: OAI-SearchBot
Disallow: /
User-agent: Claude-SearchBot
Disallow: /
User-agent: PerplexityBot
Disallow: /
# Keep Googlebot so you stay in Google Search
User-agent: Googlebot
Allow: /
User-agent: *
Allow: /
After any change, give it time. Bots re-fetch robots.txt on their own schedule, and a new rule typically takes roughly 24 to 72 hours to register across the major engines.
5) The Google-Extended and AI Overviews trap
Here’s the point that trips up even enterprise teams: Google-Extended does not stop AI Overviews.
Google-Extended isn’t a crawler with its own identity. It’s a permission token that controls whether Google uses your content to train Gemini and for grounding in Vertex AI. Blocking it keeps your content out of Google’s AI training. Google states in writing that this has no effect on your rankings or your inclusion in Search.
But AI Overviews and AI Mode are Search features. They run on Google’s regular index, fetched by Googlebot, not by Google-Extended. So the only ways to leave AI Overviews are to block Googlebot, which removes you from Google Search entirely, or to use the nosnippet meta tag, which also strips your normal search snippets and tanks your click-through rate. Neither is worth it for a business that wants to be found.
Watch out: “Disallow: Googlebot” to escape AI Overviews deletes you from Google Search. There is no clean opt-out from AI Overviews on its own. Plan around that reality rather than fighting it.
On the training side, a December 2025 BuzzStream study of the top 100 US and UK news sites found Google-Extended was the least-blocked of the training bots, a sign that even cautious publishers are wary of doing anything that looks like antagonizing Google. For where each engine’s citations actually come from, see our guide on how ChatGPT, Perplexity, and Gemini each choose their sources.
6) How to write an llms.txt file
llms.txt is a Markdown file at yourdomain.com/llms.txt that lists your most important pages so AI systems can find your best content without crawling everything. It was proposed by Jeremy Howard of Answer.AI in September 2024 and has spread quickly as a convention.
The structure is short: a top-level heading with your site name, a one-paragraph summary in a blockquote, then sections of links with a brief description on each. A minimal version looks like this:
# Search Counsel Co.
> AI search and SEO agency. We help brands get cited by
> ChatGPT, Perplexity, Gemini, and Google AI, and rank in
> traditional search.
## Core guides
- [What is GEO](https://searchcounselco.com/generative-engine-optimization/): Plain-English guide to generative engine optimization.
- [AI crawler setup](https://searchcounselco.com/lms-txt-robots-txt/): robots.txt and llms.txt for AI crawlers.
## Tools
- [AI Visibility Checker](https://searchcounselco.com/): See whether AI engines cite your brand.
A few rules that keep it valid: place it at the root, serve it over HTTPS as plain text, and keep it a curated shortlist rather than a dump of every URL. That full list is what sitemap.xml is for. If you want a longer, full-content version, the convention is a separate llms-full.txt.
Honest status: as of 2026, the major AI companies have not committed to reading llms.txt. One publisher’s server logs from mid-August to late October 2025 showed zero fetches of the file by GPTBot, Google-Extended, PerplexityBot, or ClaudeBot, and Google’s John Mueller has compared it to the old keywords meta tag. It costs almost nothing to add and has no downside, so ship it as a hedge, but put your real effort into robots.txt access and citable content. We take the same view in our guide to machine-first architecture.
7) Should you allow or block AI crawlers?
For most businesses that want to be found, allow the search and retrieval crawlers. That is how you get cited in ChatGPT, Perplexity, and Google’s AI answers, which is the fastest-growing discovery channel there is. Then decide on the training crawlers separately, based on how you feel about your content feeding models.
Blocking everything with a blanket Disallow: / is the opposite of what you want if AI visibility matters. It’s a defense a public marketing site doesn’t need, and it quietly costs you citations.
Blocking training crawlers makes sense for a narrower group: publishers with licensed or premium content, sites behind paywalls, regulated industries where content misuse creates liability, and anyone planning to license their content to AI companies for compensation. If that’s you, Setup B or C above is the starting point.
The data shows this split in practice. In that December 2025 BuzzStream study, 79% of top news sites blocked at least one AI training bot and 71% blocked at least one retrieval bot, yet only 14% blocked every AI bot and 18% blocked none. News publishers protect exclusive content aggressively. Most businesses chasing reach should not copy them wholesale. Separately, Cloudflare began blocking AI crawlers by default on new domains from July 1, 2025 and launched a Pay Per Crawl option, which is a strong reason to actually check what your own CDN is doing before you assume your robots.txt is the final word.
8) Common mistakes (and the WAF gotcha)
Most AI crawler problems come from a short list of avoidable errors.
- Blocking GPTBot and thinking you’ve left ChatGPT search. You haven’t. GPTBot is training only. OAI-SearchBot is the crawler behind ChatGPT search citations, and it’s a separate switch.
- Allowing a bot in robots.txt but blocking it at the CDN or WAF. This is the big one. A firewall rule or rate limit that returns 429 Too Many Requests to the crawler overrides your friendly robots.txt. In 2024 and 2025 this was the most common reason sites missed ChatGPT citations despite an open crawler policy.
- A broad Disallow or wildcard that swallows the bots you meant to allow. One stray rule at the top of the file can catch everything below it.
- Putting access rules inside llms.txt. User-agent and Disallow lines belong in robots.txt. llms.txt is a content map.
- Expecting robots.txt to enforce anything. Compliant crawlers from OpenAI, Anthropic, Google, and Perplexity honor it. Bad actors and user-triggered fetchers may not. Real protection needs authentication and a firewall, not a text file.
From experience: when a client says “we’re not showing up in ChatGPT,” the fix is rarely a missing Allow line. It’s usually a WAF rule or rate limit quietly returning 429 to the crawler. Check your server logs for the bot’s user-agent and the status code it got back before you touch robots.txt at all. Our guide to fixing crawl errors covers reading those status codes.
The rendering side of access, JavaScript content and server response, sits alongside this. If you want the deeper version, see our guide on how to make sure AI crawlers can access and read your site.
9) How to verify your setup is working
Shipping the files is step one. Confirming they do what you intended is step two.
- Load both files in a browser. Visit yourdomain.com/robots.txt and yourdomain.com/llms.txt. Each should return a 200 status and plain readable text, with no redirect chain.
- Read your server logs. Filter for the AI user-agents (GPTBot, OAI-SearchBot, ClaudeBot, Claude-SearchBot, PerplexityBot, Googlebot) and check who is actually visiting, how often, and what status codes they receive.
- Verify identity by IP where you can. OpenAI, Google, Perplexity, and Common Crawl publish IP range files you can match requests against. Anthropic recommends robots.txt control and reverse DNS instead. This matters because spoofers fake user-agent strings to look like a trusted bot.
- Track referrals. ChatGPT tags outbound links with the parameter utm_source=chatgpt.com, so you can see ChatGPT-driven visits in GA4 and confirm citations are turning into traffic.
- Test the actual outcome. Ask ChatGPT, Perplexity, and Gemini your target questions and see whether you get named. Our AI Visibility Checker automates this across a set of prompts, and tracking AI visibility covers how to run it as a routine.
Give changes 24 to 72 hours to register before you judge whether a rule worked.
Sources used for this guide
Crawler behavior changes fast, so this guide leans on the vendors’ own documentation and named studies rather than secondhand claims.
| Source | What it supports |
|---|---|
| OpenAI, “Overview of OpenAI Crawlers” | GPTBot, OAI-SearchBot, and ChatGPT-User as three independent switches, and the ~24 hour lag for search changes. |
| Anthropic / Claude Help Center | ClaudeBot, Claude-SearchBot, and Claude-User, and that Anthropic honors robots.txt. |
| Perplexity crawler documentation | PerplexityBot vs Perplexity-User, and that user-triggered fetches generally ignore robots.txt. |
| Google Search Central, “Google-Extended” | Google-Extended controls Gemini and Vertex AI training, is not a ranking signal, and does not control AI Overviews. |
| llmstxt.org (Jeremy Howard, Answer.AI, 2024) | The llms.txt specification, format, and root-directory requirement. |
| Search Engine Land server-log analysis (2025) | Zero AI-crawler fetches of a live llms.txt file from mid-August to late October 2025. |
| BuzzStream study of top 100 news sites (Dec 2025) | The 79% / 71% / 14% / 18% blocking figures and Google-Extended as least-blocked. |
| Cloudflare announcement (July 2025) | Default AI-crawler blocking on new domains and the Pay Per Crawl option. |
FAQ: robots.txt and llms.txt for AI
Is llms.txt the same as robots.txt?
No. robots.txt is access control: it tells crawlers what they may fetch. llms.txt is a Markdown map that points AI systems to your best pages. Different files, different jobs. Keep access rules out of llms.txt.
Do AI crawlers actually respect robots.txt?
The major declared crawlers from OpenAI, Anthropic, Google, and Perplexity honor it. User-triggered fetchers like ChatGPT-User and Perplexity-User often don’t, because a human requested that page. And robots.txt is an instruction, not a firewall, so it can’t physically stop anyone.
Does blocking GPTBot remove me from ChatGPT?
No. GPTBot is only OpenAI’s training crawler. ChatGPT search citations come through OAI-SearchBot, which is a separate switch. If you want to appear in ChatGPT search, allow OAI-SearchBot, then work through getting recommended by ChatGPT.
Can I stop my content appearing in Google’s AI Overviews?
Not cleanly. AI Overviews run on Googlebot’s regular search index, and Google-Extended doesn’t control them. Your only options are blocking Googlebot, which removes you from Google Search, or the nosnippet tag, which also removes your normal search snippets.
Should a small business block AI crawlers?
Usually no. If you want to be found, allow the search and retrieval bots so you can be cited, and decide on training bots separately. Blocking everything mostly costs you visibility you wanted.
Where do robots.txt and llms.txt go?
Both sit at your site root: yourdomain.com/robots.txt and yourdomain.com/llms.txt. Subfolders won’t be found by crawlers.
Does llms.txt help me rank or get cited?
There’s no proven ranking or citation effect yet, and the major AI companies haven’t confirmed they read it. Treat it as a cheap hedge with no downside, not a lever that moves results on its own.
How long do robots.txt changes take to work?
Roughly 24 to 72 hours. Bots re-fetch robots.txt on their own schedule, so give a new rule a few days before judging it.
Conclusion: two files, two jobs, one setup
AI crawler setup comes down to getting two files right in the right order. Start with robots.txt: allow the retrieval crawlers so you stay citable, and make training a separate, deliberate choice. Add a tidy llms.txt as a low-cost hedge, knowing it isn’t yet doing much on its own. Then check that nothing at your CDN or firewall is quietly blocking the bots you allowed, because that hidden 429 is the reason most sites go missing from AI answers.
With access sorted, the next lever is structure. Machines cite what they can cleanly extract, so move on to the best schema for AI citations and how to make sure AI crawlers can access and read your site, both part of our AI search optimization guide.
How we do it: At Search Counsel Co. we run crawler access, structure, and off-site signals through our [FRAMEWORK NAME] process, so each layer builds on the last instead of scattering. If you’d rather hand it off, see our AI SEO and GEO services.
Editorial note: This guide is for general marketing and technical education. AI crawler names, tokens, and policies change quickly, so verify each rule against the vendor’s current crawler documentation and your own server logs before you rely on it.
