citations.agency

BlogTechnical

llms.txt vs robots.txt: what each one does and which you need

Harshi RathiUpdated 2 November 2026 · 9 min read

The two filenames look like siblings, so people often assume llms.txt is “robots.txt for AI”. It isn’t. They do different jobs, they’re read by different things, and getting one wrong costs far more than skipping the other. Here’s what to do with each, in order.

What’s the difference between llms.txt and robots.txt?

robots.txtllms.txt
PurposeTells crawlers which URLs they may fetchSuggests which pages an AI model should read
StatusInternet standard (RFC 9309)A proposal from September 2024
FormatPlain-text rules by user agentMarkdown with headings and links
LocationMust be at the root: /robots.txtRoot, or any path it should cover
Who reads itSearch and AI crawlers that respect itRarely requested by AI search crawlers
Can it block access?It asks crawlers not to fetch; compliant ones obeyNo
Risk if wrongHigh: can hide your site from search and AILow: little reads it anyway
Who needs itEvery public siteDocs and developer tools, mainly

What does robots.txt actually do?

robots.txt asks crawlers to stay out of certain URLs. Google says it’s “used primarily to manage crawler traffic to your site”. For AI search, the important part is that the main search crawlers follow it. OpenAI says sites that block OAI-SearchBot won’t be shown in ChatGPT search answers.

AI companies run separate crawlers for search and for training, so you can decide each one separately. This version lets AI tools find and cite you, but asks OpenAI and Anthropic’s training crawlers to stay out:

robots.txt: allow AI search, block AI training
User-agent: OAI-SearchBot
Allow: /

User-agent: Claude-SearchBot
Allow: /

User-agent: PerplexityBot
Allow: /

User-agent: GPTBot
Disallow: /

User-agent: ClaudeBot
Disallow: /

User-agent: *
Allow: /

Sitemap: https://yoursite.com/sitemap.xml

Whether you allow training is a business decision. It’s separate from being cited. Google has a further wrinkle: blocking Google-Extended doesn’t affect your place in Google Search, and AI Overviews run on Googlebot. For more versions, see our robots.txt templates for AI crawlers.

What can’t robots.txt do?

  • It can’t keep a page out of Google. Google says it “is not a mechanism for keeping a web page out of Google”. A blocked URL can still be indexed if other sites link to it. Use noindex or password protection.
  • It isn’t security. Listing a private path in robots.txt tells everyone where it is. Protect sensitive pages with a login.
  • It doesn’t bind every fetcher. User-triggered tools can work differently: ChatGPT-User and Perplexity-User fetch a page because someone asked, and those companies say robots.txt may not apply.
  • It doesn’t override your CDN. Your robots.txt can allow a bot while a firewall rule blocks it. Test both.

What does llms.txt actually do?

It gives AI tools a short, curated guide to a site. Under the proposal, an H1 with the site’s name is the only required part, followed by a short summary in a blockquote and sections of links. A section titled “Optional” marks links an agent can skip when it needs less context.

llms.txt: minimal example
# Acme

> Acme is inventory software for small online stores.

## Docs
- [Quickstart](https://acme.com/docs/quickstart): install in 5 minutes
- [API reference](https://acme.com/docs/api): every endpoint and parameter

## Company
- [Pricing](https://acme.com/pricing): plans and limits

## Optional
- [Changelog](https://acme.com/changelog): release history

Does anyone read llms.txt?

Very rarely, based on the data so far. Ahrefs looked at 137,210 domains in May 2026: 28% published the file, and 97% of those files got no requests that month. SE Ranking’s study of about 300,000 domains found no link between having the file and how often a domain is cited. Our full llms.txt verdict covers the rest of the research.

Which one should you work on first?

Your situationrobots.txtllms.txt
Marketing site or B2B SaaSCheck nowSkip it
Ecommerce storeCheck now, including faceted URLsSkip it
Blog or publisherCheck now, and decide on training crawlersSkip it
API or developer tool with docsCheck nowWorth an hour
Open-source docs used with coding toolsCheck nowWorth an hour
Plugin added one automaticallyCheck nowLeave it if it’s accurate; remove it if it’s wrong

How do you test your robots.txt?

Run through this in 15 minutes. It’s one of the most valuable technical checks you can do for AI search.

  1. Open yoursite.com/robots.txt. Confirm it loads and returns a 200 status.
  2. Look for broad blocks. Check whether User-agent: * has Disallow: /, which blocks everything that follows the catch-all.
  3. Look for each AI search bot by name. Remember that a bot obeys its own group, not the * group, if one names it.
  4. Test with the bot’s user agent. Run the command below on key pages. A 403 or 503 usually means something other than robots.txt is blocking it.
  5. Check your CDN’s bot settings. Our Cloudflare guide walks through the common ones.
  6. Check your logs. Look for OAI-SearchBot and PerplexityBot in server logs, to confirm they’re arriving and getting 200s.
Test a page as OAI-SearchBot
curl -s -o /dev/null -w "%{http_code}\n" -A "OAI-SearchBot" https://yoursite.com/pricing
# 200 = reachable
# 403 or 503 = blocked by your CDN, firewall or server

What mistakes do people make with robots.txt?

MistakeWhat happensFix
Copying “block AI” rules from a templateOAI-SearchBot gets blocked along with training botsBlock only GPTBot and ClaudeBot if training is your concern
Staging rules pushed to productionDisallow: / blocks everythingAdd robots.txt to your release checks
Blocking CSS or JavaScriptPages may render badly for crawlersAllow the assets your pages need
Rule in the wrong groupA bot ignores your * rules if it has its own groupPut every rule a bot needs in its own group
Blocking pages you want removedCrawlers can’t see your noindex tagAllow crawling, and use noindex

How do you add llms.txt if you need it?

  1. Decide what belongs in it. For docs, that’s your quickstart, API reference, key guides and pricing. Ten to thirty links is plenty, as a rule of thumb.
  2. Write one-line notes that say what each page answers.
  3. Offer plain Markdown versions of your docs where you can, since coding tools handle them easily. The proposal suggests adding .md to page URLs.
  4. Publish at /llms.txt and check that it’s served as plain text.
  5. Assign an owner. A stale file with broken links is worse than none, so add it to your docs release process.
  6. Check your logs after a month. If nothing requests it, don’t spend more time on it.

What should you do instead of llms.txt?

If you were about to spend an afternoon on llms.txt, these will do more for AI search on a typical site:

  • Make sure your main content is in the HTML. Run our JavaScript test.
  • Get indexed in Bing, and set up IndexNow. Our Bing guide takes about ten minutes.
  • Keep your XML sitemap current, with accurate last-modified dates.
  • Retitle key pages around the question they answer, and give the answer in the first sentence.
  • Publish clear pricing and comparison pages in HTML, not images.

Our technical AI search checklist has the complete list in priority order.

How do robots.txt rules actually get matched?

Most robots.txt problems come from misreading two rules in the standard. First, a crawler follows the group that names it, and only falls back to the * group if none does. Second, when Allow and Disallow both match a URL, the most specific rule, meaning the longest match, wins.

Example: a common surprise
User-agent: *
Disallow: /private/

User-agent: OAI-SearchBot
Allow: /

# OAI-SearchBot follows only its own group.
# It can fetch /private/ because the * rule no longer applies to it.

User-agent: PerplexityBot
Disallow: /blog/
Allow: /blog/guides/

# PerplexityBot can fetch /blog/guides/pricing (the longer rule wins)
# but not /blog/news.

So if you name a bot in its own group, repeat every rule you want it to follow. That’s the mistake behind many “why is this crawler in my private folder?” questions.

Where do sitemaps and noindex fit in?

ToolQuestion it answersUse it to
robots.txtMay you fetch this URL?Keep crawlers out of areas such as internal search results and carts
XML sitemapWhich URLs matter, and when did they change?Help search engines find your pages
noindex tagMay you show this page in results?Keep a crawlable page out of search results
Login or passwordAre you allowed to see this at all?Protect anything private
llms.txtIf you’re an AI tool, what should you read?Guide people and coding agents around documentation

Thinking of them this way stops most errors. For instance, if you want a page gone from search results, you need noindex, and crawlers must be allowed to fetch the page to see the tag. Blocking it in robots.txt would hide the very instruction you’re trying to send.

What should a typical SaaS site’s robots.txt look like?

Here’s a starting point for a marketing site, a blog and an app on the same domain. Change the paths to match your site, then test it. The login-only area still needs real authentication, since this file only makes a request.

robots.txt for a SaaS site
User-agent: *
Disallow: /app/
Disallow: /search
Allow: /

User-agent: OAI-SearchBot
Disallow: /app/
Disallow: /search
Allow: /

User-agent: PerplexityBot
Disallow: /app/
Disallow: /search
Allow: /

User-agent: GPTBot
Disallow: /

Sitemap: https://yoursite.com/sitemap.xml

Remove the GPTBot group if you’re happy for your content to be used in training. That choice has nothing to do with being cited in ChatGPT search, which relies on OAI-SearchBot.

A 30-minute action plan

  1. Minutes 1–5: read your live robots.txt, and note any AI bots named or blocked.
  2. Minutes 6–15: test your homepage, pricing and top blog post using the OAI-SearchBot command above.
  3. Minutes 16–20: check your CDN’s bot and firewall settings.
  4. Minutes 21–25: fix what’s wrong, and put robots.txt changes through your normal release checks.
  5. Minutes 26–30: decide on llms.txt using the table above. For most sites, the decision is to skip it and move on.

Whichever files you change, write down the date and what you changed. If AI referrals or citations drop later, that log lets you check quickly whether a robots.txt edit or a new firewall rule was the cause, instead of guessing. Re-test after every site migration, since that’s when old staging rules tend to slip through.

Keep the log next to your release notes.

FAQ

Is llms.txt the same as robots.txt?

No. robots.txt tells crawlers what they may fetch. llms.txt is a suggested reading list and has no ability to allow or block anything.

Does llms.txt replace robots.txt?

No. They do different jobs, and every public site should have a checked robots.txt whether or not it has an llms.txt file.

Do I need llms.txt for SEO?

No. Studies so far show AI crawlers rarely request it, and SE Ranking found no link between having the file and being cited. It’s mainly useful for documentation.

Can I block AI training but stay visible in ChatGPT?

Yes. OpenAI runs separate crawlers: block GPTBot and allow OAI-SearchBot in robots.txt.

Does blocking a page in robots.txt remove it from Google?

No. Google can still index a blocked URL if others link to it. Use noindex or password protection instead, and make sure the page isn’t blocked, so that Google can see the tag.

Keep learning

free AI visibility audit

Let’s find your opportunity.

No generic pitch. We’ll look at your brand and its actual opportunities.

Rather talk? Book a 30-min call. Prefer email? Write to connect@citations.agency