FIRST CH TOOLS / 36 ROBOTS.TXT GENERATOR
robots.txt Generator
Fill in a form and get a robots.txt that tells search engines and AI crawlers where they may go. Presets cover the common request — turn away training crawlers such as GPTBot and ClaudeBot while letting AI search engines in. Upload the file to your site root (https://example.com/robots.txt).
1 — Basic rules
2 — AI crawlers
A crawler obeys exactly one matching group. As soon as an AI crawler has its own group, the User-agent: * rules stop reaching it — so it is best to leave the checkbox above on.
3 — Sitemaps
4 — Output
Nothing you type leaves the browser — the file is assembled and checked on this page. You can also call the tool from a URL: /en/robots-txt/?site=https%3A%2F%2Fexample.com&ai=training or /en/robots-txt/?policy=custom&disallow=/admin/,/cart/&sitemap=https%3A%2F%2Fexample.com%2Fsitemap.xml
How to Use
- Pick a policyAllow the whole site, or list the paths to keep out of the index. Admin screens, carts and search results can be added with the quick-add buttons.
- Decide on AI crawlersThe preset switches between block training only, allow everything and block everything. You can also set each crawler by hand.
- Upload to the rootDownload the file and put it at the top level of your site (https://example.com/robots.txt). A copy in a subdirectory is never read.
About This Tool
robots.txt is the note you leave for crawlers at the door. Search engines and AI crawlers read this text file at the site root before anything else. User-agent names the crawler, Disallow lists what it must not fetch and Allow carves out exceptions. It was a de facto standard for nearly thirty years and became a real specification, RFC 9309, in 2022.
"Don't train on my site, but do cite it" is a setting here. AI crawlers come with three different jobs: collecting training data (GPTBot, ClaudeBot, Google-Extended), building an AI search index (OAI-SearchBot, PerplexityBot, Claude-SearchBot) and fetching on demand when a user pastes a link (ChatGPT-User). This tool groups them by job, so the most common request — refuse training, keep the AI search citations — is one preset away. Pair it with the llms.txt generator to state both who is turned away and who is welcome.
It closes the gap a dedicated group opens. A crawler follows one matching group and ignores the rest. So Disallow: /admin/ under User-agent: * stops applying to GPTBot the moment a User-agent: GPTBot group exists. By default this tool copies the shared disallow paths into every AI group it writes, so nothing leaks through.
Mistakes are flagged as you type. Missing leading slashes, full URLs pasted where a path belongs, spaces inside a path, non-ASCII paths that need percent-encoding, the same User-agent in two groups, a Crawl-delay that Googlebot will ignore, a missing sitemap — all of it appears under "What we noticed". Leading slashes and pasted URLs are fixed for you.
Once the file is live, check it with the robots.txt report in Search Console. Related tools: llms.txt, JSON-LD generator and the OGP meta tag wizard.
Where robots.txt trips people up
Disallow does not remove a page from search
Disallow: /secret/ ← only stops the fetch <meta name="robots" content="noindex"> ← this is what removes it
Disallow keeps a crawler from fetching the page. If another site links to it, the URL can still be listed without its contents. Worse, blocking a page that carries noindex means the crawler never reads the noindex, so the page stays. To drop a page from search, let it be crawled and mark it noindex.
It is not a place to hide URLs
Disallow: /admin-secret-2026/ ← published the address to everyone
robots.txt is a public file. Naming a directory you want hidden is the same as announcing it. Anything that must not be reached needs a password, authentication or an IP restriction. robots.txt is a request to well-behaved crawlers and nothing more; hostile ones ignore it.
A crawler reads one group and only one
User-agent: * Disallow: /admin/ User-agent: GPTBot Disallow: ← GPTBot never sees /admin/ above, so it may crawl it
A crawler looks for the group naming it and, once found, follows that group alone. The * group is the fallback for crawlers with no group of their own. Whenever you write an exception for one crawler, repeat the shared rules inside it (this tool does that by default).
Blocking CSS and JS hurts the page
Disallow: /assets/ ← the page is judged as a broken layout
Googlebot renders the page before judging it. Blocking stylesheets, JavaScript and images gets the page evaluated in its broken state, which also affects mobile-friendliness. Old advice to block /wp-includes/ or /assets/ wholesale no longer holds.
The location and the file name are fixed
https://example.com/robots.txt ← the only file that is read https://example.com/sub/robots.txt ← ignored https://sub.example.com/robots.txt ← a separate file for the subdomain
There is one robots.txt per host, at the root. A copy in a subdirectory is ignored, and subdomains (blog.example.com) and schemes (http vs https) each get their own file. The name is lowercase robots.txt; mixed case is not read.
Wildcards and $ are an extension, not a guarantee
Disallow: /*?utm_source= ← URLs carrying a query parameter Disallow: /*.pdf$ ← URLs ending in .pdf
* (any run of characters) and $ (end of URL) are in RFC 9309 and understood by Google, Bing and OpenAI, but not by every crawler. A crawler without support reads them as literal characters, and the exclusion silently does nothing.
Googlebot ignores Crawl-delay
Crawl-delay: 10 ← honoured by Bing and Yandex, ignored by Google
People add Crawl-delay to spare the server, but Googlebot does not read it (Google crawl rate is a Search Console setting). Bing and Yandex do follow it. Keep the value small — a large delay slows indexing to a crawl.
Anything unnamed is allowed
User-agent: GPTBot Disallow: / (every crawler not named here is welcome)
robots.txt permits whatever it does not mention. Crawlers you did not name — including ones that launch next month — are all allowed. Blocking "AI in general" means a rule under User-agent: *, and that stops search engines too. How far to go is a business decision, not a technical one.
From AI Agents
This generation logic is also available as the robotstxt_generate tool in our MCP (Model Context Protocol) server @first-ch/tools-mcp, callable directly by AI agents with no browser needed. See Using These Tools from AI Agents for setup details.
Install
claude mcp add firstch-tools -- npx -y @first-ch/tools-mcp
Example call
# write a robots.txt that turns away training crawlers only
robotstxt_generate(siteUrl="https://example.com",
sitemaps="https://example.com/sitemap.xml",
ai={"preset": "training"})
# block the admin area and copy the same rules into the AI groups
robotstxt_generate(disallow="/admin/\n/cart/", ai={"preset": "training"})
# just list the AI crawlers (name, vendor, purpose) without generating
robotstxt_generate(listCrawlers=true)
Other Tools
- 01WebP Converter画像→WebP一括変換
- 02White BG Remover白背景の透過
- 03Contrast Checkerコントラスト比チェッカー
- 04Character Counter文字数カウント
- 05llms.txt Generatorllms.txt ジェネレーター
- 06JSON-LD GeneratorJSON-LD構造化データ生成
- 07Markdown → PDFMarkdown→PDF変換
- 08OGP Meta Tag WizardOGPメタタグ生成ウィザード
- 09Favicon Generatorfaviconジェネレーター
- 10TikTok PublisherTikTok投稿ツール
- 11Encoding Converter文字コード・改行コード変換
- 12AVIF Converter画像→AVIF変換+picture生成
- 13Test Data Generatorテストデータ生成
- 14Marp SlidesMarp Markdown→スライド
- 15Diff Checkerテキスト・コード差分チェッカー
- 16Cron ExplainerCron式ビジュアル解説&発火日時
- 17Base64 & Data URIBase64 & Data URI変換
- 18URL Parameter EditorURLパラメータ分解・UTMタグ編集
- 19HTML EscapeHTMLエンティティ・特殊文字エスケープ
- 20JSON ⇄ YAML ConverterJSON ⇄ YAML 相互変換
- 21PX ⇄ REM / EM ConverterPX ⇄ REM / EM 単位変換&スケール表
- 22Color ConverterColorコード変換&アルファ透過
- 23Hash GeneratorMD5 / SHA-256 ハッシュ生成
- 24JWT Decoder & Expiry CheckerJWTデコーダー&有効期限チェッカー
- 25User-Agent ParserUser-Agent解析&デバイス判定
- 26UUID & ULID GeneratorUUID (v4) & ULID 一括生成
- 27Aspect Ratio Calculatorアスペクト比計算&サイズ算出
- 28Markdown Table GeneratorMarkdownテーブル整形&CSV/TSV変換
- 29SQL FormatterSQLクエリフォーマッター&整形
- 30QR Code GeneratorQR Code Generator
- 31Regex Tester正規表現テスター
- 32Unix Timestamp ConverterUNIXタイムスタンプ⇄日時変換
- 33New Tab Memo — Chrome Extension新規タブメモ帳 Chrome拡張
- 34Image Resizer & Cropper画像リサイズ&クロップ
- 35EXIF Viewer & RemoverEXIF情報の確認&除去
- 37Password Generator安全なパスワード生成
- 38Case Converter文字列ケース変換