How to make your robots.txt
- Leave search engines on “Allow crawling” unless the site is a private staging copy.
- Add the paths to keep out of search, like admin pages, internal search results and checkout. The quick buttons add the usual ones.
- Pick an AI preset. “Block training, keep AI search” is the choice most publishers make: your content isn't used to train models, but ChatGPT, Claude and Perplexity can still find and cite you.
- Test a few URLs in the tester, then download the file and upload it to the root of your site, so it opens at yoursite.com/robots.txt.
AI crawlers: training vs search
AI companies now run separate bots for separate jobs, and robots.txt can treat each one differently.
| Type | Examples | What blocking does |
|---|---|---|
| AI training | GPTBot, ClaudeBot, Google-Extended, Applebot-Extended, CCBot | Stops new content being collected to train models. Doesn't affect Google Search rankings. |
| AI search | OAI-SearchBot, Claude-SearchBot, PerplexityBot | Removes you from those assistants' search answers and citations. |
| User fetches | ChatGPT-User, Claude-User, Perplexity-User | Asks the assistant not to open your page when a user shares or asks about it. Some vendors say these may not follow robots.txt. |
Don't block Googlebot when you mean Google-Extended. Googlebot powers Google Search and AI Overviews; Google-Extended only controls whether your content is used to train Gemini.
How Google reads robots.txt
- A crawler uses the group that names it. If none does, it uses the
User-agent: *group. It never combines the two. - Within a group, the longest matching rule wins. If an Allow and a Disallow are the same length, Allow wins.
*matches any characters and$marks the end of the URL, soDisallow: /*.pdf$blocks every PDF.- Robots.txt controls crawling, not indexing. To keep a page out of Google, let it be crawled and add a
noindextag instead.
The tester on this page follows these rules, so you can check a URL before the file goes live.
Questions people ask
How do I block ChatGPT and other AI from using my site?
Block GPTBot (OpenAI), ClaudeBot (Anthropic), Google-Extended and the other training bots. The “Block training, keep AI search” preset does this in one click while keeping you visible in AI search answers.
Will blocking AI bots hurt my Google rankings?
No. Blocking GPTBot, ClaudeBot or Google-Extended has no effect on Google Search. Only blocking Googlebot would.
Where do I put robots.txt?
At the root of your domain, so it opens at https://yoursite.com/robots.txt. Each subdomain needs its own file.
Does Disallow remove a page from Google?
Not reliably. A blocked page can still be indexed if other sites link to it. Use a noindex tag, and let Google crawl the page so it can see that tag.
Should I add my sitemap to robots.txt?
Yes. A Sitemap line with the full URL helps every search engine find your sitemap, not just the ones you've submitted it to.