Robots.txt Templates for AI and Search Crawlers

Choose a template by the outcome you want, not by copying the longest list of bot names. Each template provides a starting file, explains what its rules change, and should be merged with your existing robots.txt before you verify the live result.

Choose a template by policy outcome

The templates in this section cover common decisions: keeping search open while limiting AI training, blocking a particular provider, restricting a broader crawler group, or editing robots.txt safely on WordPress and Shopify. Start with the narrowest template that matches your actual goal.

Three questions to answer before copying

  1. Which use are you controlling? Training, AI search discovery, user-triggered retrieval, conventional search, dataset collection, and SEO analysis are different activities.
  2. Does the site already generate robots.txt? A CMS, ecommerce platform, SEO plugin, CDN, or hosting layer may own the live response. Edit the active source instead of uploading a second unused file.
  3. What must remain discoverable? A broad wildcard block can affect Googlebot, Bingbot, product feeds, images, or other services you did not intend to restrict.

Use every template as a reviewed starting point

Copy the relevant groups, replace example domains and paths, and merge them with rules already required by your platform. Do not publish duplicate or contradictory groups without understanding how the target crawler combines and evaluates them. The examples are intentionally readable so the final policy can be explained later to a client, editor, or developer.

Verify the result after deployment

Open the live /robots.txt URL, confirm HTTP 200 and plain-text content, then test representative URLs with the robots.txt checker. Recheck the file after plugin changes, platform updates, CDN rules, staging-to-production moves, or domain migrations.

If no existing template matches the policy, use the robots.txt generator to create crawler-specific groups. Robots.txt remains a cooperative crawling instruction; it should never be used as the only protection for private or paid content.

Browse this section

Website allowing search and AI discovery routes while blocking a separate model-training collection route

Allow Search, Block AI Training robots.txt Template

Use separate user-agent groups: block documented training or dataset agents such as GPTBot and ClaudeBot, while allowing ordinary search and dedicated AI-search crawlers.

Website blocking several dedicated AI access routes while leaving a separate ordinary search route open

Block All AI Crawlers robots.txt Template

Use explicit groups for known AI-related tokens rather than User-agent: *. This broad template blocks documented training, AI-search, dataset, and user-request agents while leaving ordinary search open.

Three separate Claude crawler routes blocked by independent robots.txt rules while regular search remains open

Block Claude Crawlers robots.txt Template

To block Anthropic’s documented Claude agents, publish separate Disallow groups for ClaudeBot, Claude-SearchBot, and Claude-User. Blocking all three also removes training, Claude search discovery, and user-directed retrieval, so use only the groups that match your policy.

Google Search route remaining open while a separate Google-Extended AI use route is blocked

Block Google-Extended robots.txt Template

Add a Google-Extended Disallow group to restrict eligible content from Gemini model training and grounding uses. Google-Extended is a control token rather than a separate HTTP crawler, and Google states that blocking it does not affect inclusion or ranking in Google Search.

Training crawler route blocked at a website while a separate AI search discovery route remains open

Block GPTBot robots.txt Template

Add a dedicated GPTBot group with Disallow: /. This blocks OpenAI's training-oriented crawler without automatically blocking OAI-SearchBot or ordinary search engines.

Website blocking separate OpenAI training, search, and user-request access routes at one policy boundary

Block OpenAI Crawlers robots.txt Template

For the broadest OpenAI robots.txt preference, disallow GPTBot, OAI-SearchBot, and ChatGPT-User separately. Expect loss of ChatGPT search visibility and use server controls for user-requested access.

Automated Perplexity crawler stopped by robots.txt while a user-triggered request reaches separate server access controls

Block Perplexity Crawlers robots.txt Template

Use a Disallow group for PerplexityBot to opt out of Perplexity’s automated search indexing. You may also publish a Perplexity-User rule, but Perplexity states that this user-triggered fetcher generally ignores robots.txt, so enforce a real block at the server or application layer.

Shopify storefront preserving default robots rules while adding targeted AI crawler blocks

Shopify robots.txt Template for AI Crawlers

Shopify already generates a default robots.txt file. Create a robots.txt.liquid template only when you need custom rules, keep Shopify’s default groups and sitemap output, then append crawler-specific AI blocks instead of replacing the entire file with a generic static template.

Small business website keeping search discovery open while selected AI training crawlers are blocked

Small Business robots.txt Template

A practical small-business robots.txt file should keep ordinary search discovery open, block only the crawler purposes you have intentionally rejected, and point compliant crawlers to your sitemap. Review every user-agent before publishing because robots.txt is a public policy file, not a security control.

WordPress site generating one managed robots.txt response with AI crawler rules, admin exception, and sitemap

WordPress robots.txt Template for AI Crawlers

WordPress can serve a virtual robots.txt file even when no physical file exists. Add crawler-specific AI rules without blocking Googlebot, preserve the WordPress admin exception for admin-ajax.php, include the sitemap URL actually generated by your SEO setup, and verify the live root file.

FAQ

Should I replace my entire robots.txt with one template?

Usually not. Merge the relevant groups with the file your site already serves, preserving platform rules and reviewing conflicts before publishing.

Which template is safest for keeping search visibility?

Use a narrow crawler-specific template or the allow-search/block-training template. Avoid a broad User-agent: * block unless removing ordinary search access is intentional.

Why do some templates contain several user-agent groups from one company?

Providers may publish independent tokens for training, search discovery, and user-triggered requests. Separate groups make the intended policy explicit.

Do these templates stop non-compliant scrapers?

No. Robots.txt is a voluntary protocol. Use authentication, authorization, rate limiting, firewall rules, or application controls when access must be enforced.

How do I know which robots.txt file is active on WordPress or Shopify?

Open the public /robots.txt URL first, then follow the platform-specific template instructions for the mechanism that generates that response.