How to Allow or Block AI Crawlers With robots.txt and llms.txt
AI assistants now read the web just like search engines do. This guide covers choosing which AI crawlers may visit, what llms.txt can and cannot do, and how to test your rules.
Short answer
To allow or block an AI crawler, add a group in robots.txt naming its user-agent, then Allow or Disallow paths. Training bots and AI search bots are different, so decide for each. llms.txt is an optional, unofficial summary file for AI tools; it does not block anything and is not a ranking factor.
A few years ago, βcrawlerβ meant Googlebot and Bingbot. Today your server logs also show bots that belong to AI companies. Some collect pages to train models, some fetch pages live to answer a userβs question, and some build search indexes for AI assistants. You are allowed to decide which of them may read your site. The tool for that is the same old robots.txt file, with a few new names in it.
Three kinds of AI bots
It helps to separate AI bots by what they do, because the right answer is different for each type.
- Training crawlers collect content that may be used to train future models. Blocking them keeps your pages out of training data collected from then on.
- Search or index crawlers build the index an AI assistant searches when it answers questions. Blocking them can mean the assistant never finds you.
- User-triggered fetchers load a single page because a person asked an assistant to read it. They behave more like a browser than a crawler, and some companies state that they may not follow robots.txt the same way.
Each AI company publishes its own list of user-agent names and says which one does what. Always copy the names from the companyβs official documentation, because they change and some companies run several bots.
How robots.txt rules work for AI bots
A robots.txt file is a plain text file at the root of your domain. It contains groups of rules, and each group starts with a User-agent line naming the bot it applies to. To keep one bot out of the whole site you write its name and then Disallow: /. To allow it everywhere you write Disallow: with nothing after it, or you simply leave the bot out and let the default group apply.
You can also be specific. A publisher might allow AI search bots on the blog but block them from a members-only folder, or block training crawlers on the whole site while leaving search bots alone. Rules apply per bot, so each user-agent needs its own group, and the most specific matching group wins.
robots.txt is a request, not a lock. Well-behaved crawlers follow it, but it does not stop a bot that ignores the rules, and it does not hide a page from anyone who knows the URL.
What llms.txt is, and what it is not
llms.txt is a proposed convention: a Markdown file at /llms.txt that gives language models a short, clean summary of your site, with links to your most useful pages. Think of it as a reading list for machines. It is helpful as documentation, and cheap to publish.
Be realistic about it, though. llms.txt is not an official standard, it does not block anything, and no major search engine has promised to use it as a ranking signal. Treat it as a small extra, not as a replacement for good page content, clear titles, and working robots.txt rules.
Should you allow or block AI crawlers?
There is no single right answer. It depends on what you gain and lose.
- Allow them if you want to be mentioned or linked in AI answers, and you are fine with your public content being read.
- Block training crawlers if you sell content, run original research, or simply do not want your writing used to train models.
- Think twice before blocking AI search bots. If an assistant cannot read your site, it cannot cite it.
- Keep ordinary search engines separate. Blocking an AI bot does not affect Googlebot unless you wrote the rule that way.
A safe way to change your rules
- Open yourdomain.com/robots.txt and save a copy of the current file.
- Check each AI companyβs documentation for the exact user-agent names it uses today.
- Add one group per bot, with Allow or Disallow lines that match your decision.
- Run the file through the Robots.txt Validator to catch typos, stray characters and rules that accidentally block everything.
- Test a few real URLs, then check your server logs after a week to see whether the bots behave as expected.
Mistakes to avoid
- Putting Disallow: / under User-agent: * when you only meant to block one bot. That blocks Google too.
- Misspelling a user-agent name, which makes the rule silently do nothing.
- Blocking the CSS and JavaScript folders, which stops crawlers rendering your pages properly.
- Assuming robots.txt removes pages already collected. It only affects future visits.
Whatever you choose, write it down and review it every few months. New bots appear often, and a robots.txt file written a year ago may not mention any of them.
Frequently Asked Questions
Will blocking AI crawlers hurt my Google rankings?
Not by itself. Googlebot and AI bots are separate user-agents. Your ranking is only affected if a rule you wrote also matches Googlebot, for example a Disallow under User-agent: *.
Do I need an llms.txt file?
No. It is optional and unofficial. It can be a helpful summary for AI tools that read it, but it does not control access and is not a proven ranking factor.
Can robots.txt remove my content from an AI model?
No. It only tells compliant crawlers what not to fetch from now on. It cannot undo data that was already collected.
Try the Tools
Put this into practice with our free, no-signup tools.
About the author

Editorial team
The NetTooling team builds the free tools on this site and writes the guides that go with them. Every article is based on real website and SEO work, tested against our own tools, and updated when search engines or web standards change.
Related articles
More guides on the same topic.
- SEO Β· 9 min readCore Web Vitals Explained: LCP, INP and CLS in Plain EnglishCore Web Vitals sound technical, but they measure three simple things: how fast the main content appears, how quickly the page reacts, and whether it jumps around. Here is what to fix first.
- SEO Β· 9 min readJSON-LD Structured Data for Beginners: A Practical GuideStructured data helps search engines and AI tools understand what your page is about. This guide shows how to write JSON-LD, which types matter, and how to avoid common errors.
- SEO Β· 9 min readCanonical Tag Missing or Wrong: What It Means and How to Fix ItCanonical tags tell search engines which URL is the main version of a page. Missing or incorrect canonicals create duplicates, diluted signals, and confusing indexing, and each case has a straightforward fix.