Black Friday: 20% off annual plans · BLACKFRIDAY20 →
Free tool · Runs in your browser

Robots.txt generator for AI crawlers

Decide which AI companies can train on your site and which can cite it. Pick a preset, adjust, and copy the file. Nothing leaves your browser.

By RankGhost · Last reviewed

Model training

Collects pages to train future models. Blocking these does not remove you from AI answers.

AI search & citations

Builds the index AI assistants cite from. Block these and you can't be cited.

User-requested fetches

Fetches a page when someone pastes it into a chat. Some of these ignore robots.txt.

Checked = blocked.

robots.txt
# AI crawlers blocked
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: CCBot
User-agent: Meta-ExternalAgent
User-agent: Bytespider
User-agent: Amazonbot
Disallow: /

# AI crawlers allowed
User-agent: OAI-SearchBot
User-agent: Claude-SearchBot
User-agent: PerplexityBot
User-agent: ChatGPT-User
User-agent: Claude-User
User-agent: Perplexity-User
Allow: /

# Everyone else
User-agent: *
Allow: /

Upload the file to your site root so it loads at yourdomain.com/robots.txt. Compliant crawlers follow it; it is a request, not access control.

How to create a robots.txt for AI crawlers

  1. Start from a preset. “Block training, stay citable” is selected when the page opens.
  2. Tick or untick individual crawlers. A ticked box means that crawler is blocked.
  3. Optionally add your sitemap URL and any paths every crawler should skip, such as /admin/.
  4. Copy the file or download it.
  5. Upload it to the root of your site. If you already have a robots.txt, merge these rules into it instead of replacing it, so you keep the rules you set for other crawlers.
  6. Open yourdomain.com/robots.txt in a browser to check the new rules are live.

AI crawler user agents, and what blocking each one does

AI companies use separate crawlers for separate jobs. Training crawlers collect pages for future models. Search crawlers build the index an assistant cites from. User-requested fetchers load a page when someone asks about it in a chat. Blocking one doesn’t block the others, even from the same company.

User agentWhat it doesIf you block it
Model training
GPTBotOpenAICollects pages to train OpenAI’s foundation models.Your content is left out of future training. ChatGPT search is controlled separately, by OAI-SearchBot.
ClaudeBotAnthropicCollects pages that may be used to train Anthropic’s models.Your future content is left out of Anthropic’s training data.
Google-ExtendedGoogle (Gemini)Not a crawler: a robots.txt token that controls whether Google’s crawl is used to train Gemini and to ground its answers.Left out of Gemini training and grounding. Google says it doesn’t affect Google Search or rankings.
Applebot-ExtendedAppleNot a crawler: controls whether pages Applebot has crawled are used to train Apple’s foundation models.Left out of Apple’s model training. Apple says you still appear in Siri, Spotlight and Safari.
CCBotCommon CrawlBuilds Common Crawl’s free public web archive, which AI developers use as training data.Your pages are left out of future Common Crawl archives.
Meta-ExternalAgentMetaCrawls for uses such as training Meta’s AI models and indexing content for its products.Your pages are left out of that crawl.
BytespiderByteDanceByteDance’s web crawler.Asks ByteDance not to crawl your site.
AmazonbotAmazonImproves Amazon’s products and services, and may be used to train Amazon’s AI models.Your pages are left out of that crawl. Amazon may keep using a cached robots.txt for up to 30 days.
AI search & citations
OAI-SearchBotOpenAI (ChatGPT search)Finds pages to show and link in ChatGPT search answers.You won’t be shown in ChatGPT search answers, though you can still appear as a navigational link.
Claude-SearchBotAnthropicIndexes pages to improve the results Claude searches.Your pages aren’t indexed for Claude’s search, which can reduce how often you appear.
PerplexityBotPerplexityFinds and links pages in Perplexity’s answers. Perplexity says it isn’t used to train foundation models.Your pages aren’t surfaced in Perplexity’s search results.
User-requested fetches
ChatGPT-UserOpenAIVisits a page when a ChatGPT user’s request needs it.OpenAI says robots.txt rules may not apply, because a person started the visit.
Claude-UserAnthropicFetches a page when someone asks Claude about it.Claude can’t read your page to answer that person’s question.
Perplexity-UserPerplexityVisits a page to answer a Perplexity user’s question.Perplexity says this fetcher generally ignores robots.txt, because a person asked for the page.

Example robots.txt files for AI crawlers

These are the generator’s three presets, written exactly as it writes them. Each puts the blocked AI crawlers in one group and the allowed ones in another, then ends with a group for every other crawler, so search engines carry on as before.

Block training, stay citable

For most sites that want to be cited. Training crawlers are asked to stay out, while the search crawlers that ChatGPT, Claude and Perplexity cite from stay allowed. Google-Extended is blocked here too; Google Search and AI Overviews follow Googlebot, which this file doesn’t touch.

robots.txtBlock training, stay citable
# AI crawlers blocked
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: CCBot
User-agent: Meta-ExternalAgent
User-agent: Bytespider
User-agent: Amazonbot
Disallow: /

# AI crawlers allowed
User-agent: OAI-SearchBot
User-agent: Claude-SearchBot
User-agent: PerplexityBot
User-agent: ChatGPT-User
User-agent: Claude-User
User-agent: Perplexity-User
Allow: /

# Everyone else
User-agent: *
Allow: /

Block all AI

Asks every listed AI crawler to stay out, including the search crawlers assistants cite from, so expect to appear less in AI answers over time. Googlebot, Bingbot and other search engines fall under the last group and carry on as before.

robots.txtBlock all AI
# AI crawlers blocked
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: CCBot
User-agent: Meta-ExternalAgent
User-agent: Bytespider
User-agent: Amazonbot
User-agent: OAI-SearchBot
User-agent: Claude-SearchBot
User-agent: PerplexityBot
User-agent: ChatGPT-User
User-agent: Claude-User
User-agent: Perplexity-User
Disallow: /

# Everyone else
User-agent: *
Allow: /

Allow all AI

Lets every listed AI crawler in. A robots.txt that never names them has the same effect, but naming them states your intent and gives you one place to add exceptions later.

robots.txtAllow all AI
# AI crawlers allowed
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: CCBot
User-agent: Meta-ExternalAgent
User-agent: Bytespider
User-agent: Amazonbot
User-agent: OAI-SearchBot
User-agent: Claude-SearchBot
User-agent: PerplexityBot
User-agent: ChatGPT-User
User-agent: Claude-User
User-agent: Perplexity-User
Allow: /

# Everyone else
User-agent: *
Allow: /

Robots.txt mistakes that block more than you meant

Most robots.txt problems come from a rule that reaches further than intended. These are the ones that cost sites their search or AI visibility most often.

  • Disallow: / under User-agent: *. That rule blocks every crawler without its own group, Googlebot and Bingbot included. If you only meant to block AI crawlers, name them in their own group instead.
  • An empty Disallow line. A line that reads Disallow: with nothing after it allows everything. It doesn’t block anything.
  • Blocking the search crawlers by accident. OAI-SearchBot, Claude-SearchBot and PerplexityBot build the indexes those assistants cite from. Block them and you can’t be cited there, even if your content is the best answer.
  • Expecting one file to cover every subdomain. robots.txt only applies to the host it’s served from. blog.example.com and shop.example.com each need their own file.
  • Replacing the file you already have. Uploading a new robots.txt over the old one drops your existing rules and your Sitemap line. Merge the AI crawler groups into the file instead.
  • Forgetting the firewall. Some CDNs and security plugins have a setting that blocks AI crawlers outright, before they read robots.txt. If your file allows a crawler but it still can’t reach you, check those settings.

After uploading, run the AI robots.txt checker on your domain to confirm each crawler gets the result you intended.

Questions about AI crawlers and robots.txt

Sources, reviewed : OpenAI, Anthropic, Google, Apple, Perplexity, Meta, Amazon, Common Crawl, Shopify: editing robots.txt.

Do AI assistants cite you?

Once your robots.txt is live, track Google rank and captured AI citations for the same keywords.

Try RankGhost free