SEO + AI Citations Brain template

robots.txt template for AI crawlers

How to check whether you need to edit robots.txt at all, where to edit it on each platform, and the lines that allow AI search bots so you can be cited, with training bots as a separate choice.

Updated 24 November 2026

Use when you edit robots.txt to be visible in ChatGPT, Claude, Perplexity and Google AI answers.

How to use

First check whether you need to change anything. Open https://yourdomain.com/robots.txt. If it has no Disallow: / under User-agent: * and does not name any of the search bots below with a Disallow, AI search bots can already read your site and you can leave the file alone. Edit only to fix a block or to make a training choice.

Search and user-fetch agents fetch your pages to answer a question and to cite you. Allow them. Training bots collect content for model training. Allowing or blocking them is your business choice, and it is separate from being cited. Google AI Overviews and AI Mode use Googlebot, so do not block Googlebot. Add the blocks below to your existing file instead of replacing it, keep your platform's own rules, replace [BRACKETS], then open /robots.txt after saving to check it.

Where to edit it on your platform

  • WordPress: Yoast SEO > Tools > File editor, or Rank Math > General Settings > Edit robots.txt. Without a plugin, WordPress serves a virtual file; a physical robots.txt in the site root overrides it.
  • Shopify: Online Store > Themes > Edit code > Add a new template > robots (creates robots.txt.liquid). Keep the Liquid default rules and add your groups. Most stores never need this.
  • Webflow: Site settings > SEO > Indexing, robots.txt field.
  • Wix: SEO & GEO > Tools and settings > robots.txt editor.
  • Squarespace and Framer: see get_checklist("squarespace") and get_checklist("framer"). Squarespace does not let you edit the file and offers an AI crawler toggle instead; Framer allows a custom robots.txt on some plans.
  • Cloudflare in front of any site: a managed robots.txt or AI Crawl Control setting can add blocks you did not write. Check it too.

Allow search and user fetchers

Copy and paste
# AI search and user-triggered fetchers: allow, so assistants can cite you
User-agent: OAI-SearchBot
Allow: /

User-agent: ChatGPT-User
Allow: /

User-agent: Claude-SearchBot
Allow: /

User-agent: Claude-User
Allow: /

User-agent: PerplexityBot
Allow: /

User-agent: Perplexity-User
Allow: /

Training bots: pick one option

Option A, allow training (the default when you add nothing): add no lines for these bots.

Option B, block training. This does not remove you from search citations. Add only if you have decided to block:

Copy and paste
# AI training crawlers: blocked on purpose
User-agent: GPTBot
Disallow: /

User-agent: ClaudeBot
Disallow: /

User-agent: Google-Extended
Disallow: /

User-agent: Applebot-Extended
Disallow: /

User-agent: CCBot
Disallow: /

User-agent: Meta-ExternalAgent
Disallow: /

Everyone else and sitemap

Keep whatever your platform already has under User-agent: * (for WordPress usually Disallow: /wp-admin/ with Allow: /wp-admin/admin-ajax.php; for Shopify the cart, checkout and account rules). Make sure the Sitemap line points to the real sitemap:

Copy and paste
Sitemap: [YOUR SITEMAP URL]

Common sitemap addresses: WordPress core /wp-sitemap.xml, Yoast and Rank Math /sitemap_index.xml, Shopify, Webflow, Wix, Squarespace and Framer /sitemap.xml. Open the address in a browser before you paste it.

Notes

  • Each User-agent group is separate: a bot follows the group that names it, otherwise the * group.
  • Check your CDN or firewall too. A robots.txt allow does nothing if the firewall returns 403 to the bot.
  • Google-Extended is a robots.txt control token with no user agent of its own. It controls use of your content for Gemini training and for grounding in Gemini Apps and Vertex AI. Google says it does not affect inclusion in Google Search, and AI Overviews are governed by Googlebot and the snippet controls.
  • Applebot-Extended does not crawl. It only tells Apple not to use content Applebot already crawled for training its foundation models. Applebot itself powers Spotlight, Siri and Safari search.
  • Not every agent obeys robots.txt. OpenAI says ChatGPT-User, which acts on a user's request, may not apply robots.txt. Perplexity says Perplexity-User generally ignores it. Meta says Meta-ExternalFetcher may bypass it. Anthropic says disabling Claude-User stops retrieval for user queries. Use your firewall to block a user-triggered agent.
  • OpenAI says robots.txt changes can take about 24 hours to take effect for OAI-SearchBot, and Perplexity says the same for PerplexityBot.
  • Anthropic and OpenAI both publish IP ranges. Anthropic advises using robots.txt, not IP blocking, to control ClaudeBot. User agent strings can be faked, so verify bots by IP range before trusting a log line.
  • Grok Bot (xAI): no official crawler documentation was found, so no rule is given here.
  • Test: ask an assistant to open a page on your site, and check server logs for the user agents above.

Example (an illustration: a WordPress site with Yoast that keeps training allowed)

Copy and paste
User-agent: OAI-SearchBot
Allow: /

User-agent: Claude-SearchBot
Allow: /

User-agent: PerplexityBot
Allow: /

User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php

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

Sources

Checked November 2026.

With Conqueror

Conqueror checks which AI crawlers can reach your pages, then drafts the robots.txt change for you to approve.

Use this in your agent

Add the free SEO + AI Citations Brain to Claude, ChatGPT, Cursor, Codex, Gemini CLI or Grok Bot, then ask it to run get_template("robots-txt-ai-crawlers") on your site.

Add the Brain

More templates