Free Robots.txt Generator with AI Crawler Rules
Runs locallyUpdated October 25, 2026
Free robots.txt generator with AI crawler presets: block AI training bots (GPTBot, ClaudeBot, Google-Extended) while keeping ChatGPT Search, Claude, and Perplexity citations, plus Allow, Disallow, and Sitemap rules.
User-agent: *
Disallow: /admin/
Disallow: /api/
# Opt out of AI model training
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: Meta-ExternalAgent
User-agent: CCBot
Disallow: /
# AI search crawlers (OAI-SearchBot, Claude-SearchBot, PerplexityBot) follow the * rules above
Sitemap: https://example.com/sitemap.xmlUpload the file to the root of your domain, e.g. https://yourdomain.com/robots.txt. Crawlers ignore robots.txt files in subfolders.
How to use Robots.txt Generator
Pick an AI crawler policy: block AI training but allow AI search (recommended), allow all AI bots, or block all AI bots.
Enter the paths every bot should skip (such as /admin/ or /api/), any Allow exceptions, and your XML sitemap URL.
Copy or download the generated robots.txt file and upload it to the root of your domain (https://example.com/robots.txt).
Generate a robots.txt file with AI crawler rules
A robots.txt file tells search engine bots (Googlebot, Bingbot) and AI crawlers (GPTBot, OAI-SearchBot, ClaudeBot, PerplexityBot) which paths on your server they may request. This free robots.txt generator adds one-click AI crawler policies on top of the usual Disallow, Allow, and Sitemap rules, so you can opt out of AI model training without disappearing from AI search answers.
AI crawler reference: training vs. search vs. user fetchers
Crawler (User-agent) | Company | Purpose | Blocked by "Block AI training" preset? |
|---|---|---|---|
GPTBot | OpenAI | Collects content to train models | Yes |
ClaudeBot | Anthropic | Collects content to train models | Yes |
Google-Extended | Control token for Gemini training (not a separate crawler; Search unaffected) | Yes | |
Applebot-Extended | Apple | Control token for Apple AI training | Yes |
Meta-ExternalAgent | Meta | Collects content to train models | Yes |
CCBot | Common Crawl | Open web dataset widely used for AI training | Yes |
OAI-SearchBot | OpenAI | Indexes pages for ChatGPT Search citations | No (allowed) |
Claude-SearchBot | Anthropic | Indexes pages for Claude search answers | No (allowed) |
PerplexityBot | Perplexity | Indexes pages for Perplexity answers | No (allowed) |
ChatGPT-User, Claude-User, Perplexity-User | Various | Fetch a page when a user asks about it; may not consult robots.txt | Only in "Block all AI" |
Crawler names change; check each company's crawler documentation before relying on a rule. robots.txt is a request, not access control: use authentication or firewall rules for content that must stay private.
Example output: block AI training, keep AI search
User-agent: *
Disallow: /admin/
Disallow: /api/
# Opt out of AI model training
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: Meta-ExternalAgent
User-agent: CCBot
Disallow: /
Sitemap: https://www.example.com/sitemap.xml
Grouping several User-agent lines above one rule set is valid under RFC 9309.
Core robots.txt directives reference
| Directive | Syntax Example | What It Controls | Crawler Support |
|---|---|---|---|
User-agent | User-agent: * or User-agent: Googlebot | Specifies which crawler bot the following rules apply to | All compliant bots (RFC 9309) |
Disallow | Disallow: /admin/ | Instructs the bot not to request URLs starting with that path prefix | Googlebot, Bingbot, AI crawlers |
Allow | Allow: /admin/public-help | Overrides a broader Disallow rule for a specific subpath | Googlebot, Bingbot |
Sitemap | Sitemap: https://example.com/sitemap.xml | Points crawlers directly to your XML sitemap or sitemap index | Google, Bing, Yandex |
Crawl-delay | Crawl-delay: 10 | Requests a delay (in seconds) between crawler requests | Respected by Bingbot; ignored by Googlebot |
Production robots.txt example (SEO + AI Search ready)
For most websites that want full Google and ChatGPT Search visibility while blocking private admin routes and internal search spam:
User-agent: *
Allow: /
Disallow: /admin/
Disallow: /api/
Disallow: /search?
Sitemap: https://www.example.com/sitemap.xml
robots.txt vs noindex vs Canonical tags
- Use
robots.txt Disallowto save crawl budget on non-public directories (/api/,/admin/, infinite faceted filter URLs). - Use
<meta name="robots" content="noindex">when you want a page completely removed from Google search results. (Important: do not block anoindexpage inrobots.txt, or Googlebot will never see thenoindextag!) - Use
rel="canonical"when duplicate or UTM-tagged URLs show the same content and you want ranking signals consolidated.
Related technical SEO tools & guides
Build your sitemap file with the free XML sitemap generator, create meta robots tags with the SEO meta tag generator, or consolidate duplicate URLs with the canonical URL generator. For full examples, read our robots.txt beginner's guide and how to allow ChatGPT search crawlers.
Robots.txt Generator FAQs
robots.txt file sits at the root of your website (https://example.com/robots.txt) and follows the Robots Exclusion Protocol (RFC 9309) to tell search engine crawlers and AI bots which directories or URLs they are allowed or disallowed from requesting.Related SEO Analysis Tools
More seo analysis tools and nearby utilities.
XML Sitemap Generator
Free XML sitemap generator: paste canonical URLs with optional last-modified dates to build a valid sitemap.xml with lastmod tags. Invalid and duplicate URLs are filtered out.
Open tool →Meta Tag Generator
Free SEO meta tag generator: create HTML title tags, meta descriptions, robots directives, and Open Graph tags with live character counters and copy-and-paste head code.
Open tool →Canonical URL Generator
Free canonical URL tag generator: create HTML <link rel="canonical"> tags to consolidate duplicate URLs, UTM query parameters, and syndicated content.
Open tool →Open Graph Tag Generator
Free Open Graph tag generator: create og:title, og:description, og:url, og:image, and og:type HTML meta tags for LinkedIn, Facebook, Discord, Slack, and WhatsApp.
Open tool →
Guides for Robots.txt Generator
Step-by-step articles that use this tool.
- OAI-SearchBot vs GPTBot: Allow ChatGPT Search & Block AI Training in robots.txtLearn the exact difference between OpenAI's OAI-SearchBot, GPTBot, and ChatGPT-User crawlers. Copy a tested robots.txt snippet that allows ChatGPT Search citations while blocking AI model training.
- Robots.txt Guide: Examples, Rules, and Indexing ChecksLearn robots.txt with practical Allow and Disallow examples, sitemap rules, and a checklist for diagnosing crawling versus indexing problems.
- ChatGPT Visibility Checker: How to Check Brand Visibility in ChatGPTCheck your brand visibility in ChatGPT Search, Google AI Overviews, Gemini, and Perplexity using free AI visibility checkers, copy-paste prompts, and a robots.txt audit.