SEO Stack Hub Use Free Tools
Home › SEO Guides

AI Crawlers in robots.txt: How to Allow or Block GPTBot, ClaudeBot and More (2026)

Avatar photo SEO Stack Hub Editorial Team · Nov 8, 2026
Server cooling fans in a data center where AI crawlers request website pages

If you run a website in 2026, your AI crawlers robots.txt setup is now as important as your sitemap. GPTBot, ClaudeBot, PerplexityBot and a growing list of other bots visit your pages every day, some to train AI models, some to build AI search indexes, and some to fetch a page live when a person asks a question. The good news: you stay in control. A few lines in robots.txt decide who gets in.

This beginner-friendly guide shows you exactly how to configure AI crawlers in robots.txt step by step: which user-agents exist, which ones to allow if you want traffic from AI answers, which ones to block if you do not want your content used for training, and how to test the result before it goes live.

Quick Answer: What Should Your AI Crawlers robots.txt Look Like?

For most blogs and business sites the safest 2026 setup is simple: allow the AI search and citation bots (OAI-SearchBot, Claude-SearchBot, PerplexityBot) so you can appear in AI answers, and decide separately about the training bots (GPTBot, ClaudeBot, Google-Extended, CCBot). Never block Googlebot. Always keep your Sitemap line, and test the file with the Robots.txt Tester before you save it.

What Are AI Crawlers?

AI crawlers are automated bots run by AI companies. They read web pages, but they do not all do the same job. Understanding the three jobs makes every robots.txt decision easier:

Blocking a training bot does not remove you from AI search. Blocking a search bot does. That single difference is the most common mistake in AI crawlers robots.txt files.

The Main AI Crawler User-Agents in 2026

Use these exact tokens in robots.txt. Vendors can change names, so always confirm against each company’s own documentation.

Company User-agent token Purpose
OpenAI GPTBot Model training
OpenAI OAI-SearchBot ChatGPT search index and citations
OpenAI ChatGPT-User Live fetch when a user asks
Anthropic ClaudeBot Model training
Anthropic Claude-SearchBot Search quality and results
Anthropic Claude-User Live fetch when a user asks
Perplexity PerplexityBot Search index
Perplexity Perplexity-User Live fetch when a user asks
Google Google-Extended Control token for Gemini training (not a separate crawler)
Apple Applebot-Extended Control token for Apple AI training
Common Crawl CCBot Open web dataset
ByteDance Bytespider Training crawler

The Biggest Mistake: Blocking Googlebot by Accident

Google-Extended is only a robots.txt token. It tells Google whether your content may be used for Gemini training. It is not a crawler, and it does not control normal Google Search. If you want to keep Google’s AI away from training, use Google-Extended. Do not block Googlebot, because that removes you from Google Search, including AI Overviews. According to Google’s own guidance from May 2026, AI Overviews and AI Mode run on core Search systems, so normal SEO still decides your visibility there.

Step 1: Decide Your Goal

Pick the option that matches your business before you touch the file:

  1. Maximum visibility: allow every AI crawler. Best for blogs, agencies and businesses that want brand mentions and citations in ChatGPT, Claude and Perplexity.
  2. Visibility without training: allow search bots, block training bots. A popular middle path for publishers.
  3. Full block: block all AI bots. Choose this only if your content is paid, private or you have a licensing reason.

Step 2: Copy a Ready-Made robots.txt Template

Template A: Allow all AI crawlers

User-agent: *
Allow: /

User-agent: GPTBot
Allow: /

User-agent: OAI-SearchBot
Allow: /

User-agent: ChatGPT-User
Allow: /

User-agent: ClaudeBot
Allow: /

User-agent: Claude-SearchBot
Allow: /

User-agent: Claude-User
Allow: /

User-agent: PerplexityBot
Allow: /

Sitemap: https://example.com/sitemap_index.xml

Template B: Appear in AI answers, block training

User-agent: *
Allow: /

User-agent: GPTBot
Disallow: /

User-agent: ClaudeBot
Disallow: /

User-agent: CCBot
Disallow: /

User-agent: Google-Extended
Disallow: /

User-agent: Applebot-Extended
Disallow: /

User-agent: OAI-SearchBot
Allow: /

User-agent: Claude-SearchBot
Allow: /

User-agent: PerplexityBot
Allow: /

Sitemap: https://example.com/sitemap_index.xml

Template C: Block all major AI crawlers

User-agent: GPTBot
Disallow: /

User-agent: OAI-SearchBot
Disallow: /

User-agent: ClaudeBot
Disallow: /

User-agent: Claude-SearchBot
Disallow: /

User-agent: PerplexityBot
Disallow: /

User-agent: Google-Extended
Disallow: /

User-agent: CCBot
Disallow: /

User-agent: Bytespider
Disallow: /

Replace example.com with your own domain. Each user-agent group stands alone, so a bot follows the group that names it and ignores the others.

Step 3: Add the Rules to WordPress

  1. Log in to your WordPress dashboard.
  2. If you use Rank Math, open Rank Math, then General Settings, then Edit robots.txt. Yoast users can use Yoast SEO, then Tools, then File editor.
  3. Paste the template you chose and change the Sitemap line.
  4. Save the changes.
  5. Open yourdomain.com/robots.txt in a new tab and confirm the new rules are live.

Step 4: Test Before You Trust It

One misplaced slash can block your whole site. Paste your file into the free Robots.txt Tester, enter a URL such as a blog post, and pick a user-agent like GPTBot or Googlebot. Confirm that Googlebot is allowed and that each AI bot is allowed or blocked exactly as you planned.

Step 5: Add llms.txt to Help the Bots You Allow

robots.txt controls access. llms.txt is a helpful companion file that points AI systems to your best pages. If you allow AI crawlers, read our guide on what llms.txt is and how to create it, then build the file in minutes with the free llms.txt Generator.

What robots.txt Cannot Do

AI Crawlers robots.txt Checklist (2026)

Frequently Asked Questions About AI Crawlers and robots.txt

Should I block GPTBot in robots.txt?

Block GPTBot if you do not want your content used to train future OpenAI models. This does not remove you from ChatGPT search, because that uses OAI-SearchBot, a separate crawler.

Will blocking AI crawlers hurt my Google rankings?

No, as long as you do not block Googlebot. Blocking Google-Extended, GPTBot or ClaudeBot does not affect normal Google Search rankings.

Do all AI crawlers obey robots.txt?

The major vendors (OpenAI, Anthropic, Perplexity, Google and Apple) publish their user-agents and say they respect robots.txt. Some smaller scrapers do not, so use firewall rules if you need strict protection.

What is the difference between GPTBot and OAI-SearchBot?

GPTBot collects content for model training. OAI-SearchBot indexes pages so ChatGPT search can show and cite them. You can block one and allow the other.

Is Google-Extended a crawler?

No. It is a control token in robots.txt that tells Google whether your content may be used for Gemini training and grounding. Googlebot still does the crawling.

How often should I update my AI crawler rules?

Review them every few months. AI companies add and rename bots often, so check the official documentation of each vendor and re-test your file.

Final Thoughts

A clear AI crawlers robots.txt file takes ten minutes and protects both your visibility and your content. Choose your goal, paste the matching template, test it, and review it each quarter. If you want more practical SEO tools and guides, explore our free SEO tools and the SEO Guides library.

Free SEO tools from SEO Stack HubCheck keywords, meta tags, schema, redirects and more with 27 free tools, no sign-up needed. Need links? See our guest post packages. Open the free tools →
Advertise on BusinessToMark
Publish a sponsored article on BusinessToMark
Guest posts from $120 $72, link insertions $150 $90, homepage or sidebar ads $190 $114 / month. 40% off Writing included, live in 12–24 hours.
Order now
← Back to Blog
Black FridayOrder 5 websites and get 1 guest post freeEnds Nov 30Order now
SEO Stack Hub was founded by Zahid Butt.