What a robots.txt file controls
Before a well-behaved crawler fetches a page, it reads /robots.txt at the root of the host. The file says which paths each crawler may request. It controls crawling, not indexing: a blocked URL can still appear in Google if other sites link to it. To keep a page out of search results, let it be crawled and add a noindex tag instead.
Each subdomain needs its own file. https://blog.example.com/robots.txt is separate from https://example.com/robots.txt, and a file in a subfolder is ignored.
How to create a custom robots.txt file
Most sites need only a few lines: one group for all crawlers that blocks private or duplicate areas, and a Sitemap line. Add a named group only when one crawler needs different rules.
A common starting point for a blog or business site, including a custom robots.txt for Blogger or WordPress:
- User-agent: * with Disallow lines for admin, login, cart, checkout and internal search result pages.
- No rules that block CSS, JavaScript or image folders: Google needs them to render the page.
- A Sitemap line with the full URL of your sitemap or sitemap index.
- For Blogger, paste the result into Settings, Crawlers and indexing, Custom robots.txt. For WordPress, upload the file to the site root or paste it into your SEO plugin's robots.txt editor.
Robots.txt rules for AI crawlers
AI companies publish the user-agent names their crawlers use, so you can allow or block each one. GPTBot (OpenAI), ClaudeBot (Anthropic), PerplexityBot (Perplexity) and CCBot (Common Crawl) each read their own group, and Google-Extended controls whether Google may use your content for Gemini.
Blocking a crawler is a trade-off. It keeps your pages out of that company's crawls, but it can also keep them out of the answers its assistant builds from crawled pages. Decide per bot, and check later which bots actually visit.
2026年にカスタムrobots.txt作成ツールが必要な理由
無料のrobots.txtジェネレーターツールを使用すると、ウェブサイトに最適なrobots.txtファイルを簡単に作成できます。
robots.txtファイルは、検索エンジンによるサイトのクロール方法を制御するために不可欠であり、
SEOパフォーマンスに大きな影響を与えます。
robots.txtメーカーの使い方
robots.txtファイルを生成するには、許可またはブロックしたいボットを選択するだけです。
当社のrobots.txtビルダーが、コピー&ペーストするだけのコードを自動作成します。
AIスクレイパー(GPTBot、ClaudeBotなど)をブロックするrobots.txtファイルの生成方法
AIエージェントの台頭に伴い、GPTBot、ClaudeBot、OpenAI-SearchBotのようなAIスクレイパーから知的財産を守る重要性がかつてないほど高まっています。
当社のツールを使えば、こうした最新のAIクローラー向けに最適化されたディレクティブを簡単に生成できます。
主な機能
- 簡単な設定: Simple interface to set up directives
- プリセットテンプレート: Quick templates for common use cases
- カスタムディレクティブ: Add custom allow, disallow, and other directives
- 即時生成: Get your robots.txt file ready for upload
- 登録不要: Use the tool immediately without signing up
一般的なユースケース
- すべてのクローラーによるサイトへのアクセスを許可する
- 管理画面やプライベートコンテンツへのアクセスをブロックする
- APIエンドポイントのクロールを制御する
- サーバー保護のためのクロール遅延を設定する
- XMLサイトマップを指定する
生成したrobots.txtの使い方
- 生成されたrobots.txtファイルをダウンロードする
- ウェブサイトのルートディレクトリ(例: yourdomain.com/robots.txt)にアップロードする
- サイトのクロール統計を監視する
ベストプラクティス
- robots.txtファイルはシンプルで分かりやすく保つ
- デプロイする前にrobots.txtファイルをテストする
- 機密情報を隠すためにrobots.txtを使用しない
- robots.txtにサイトマップのURLを記載する
- 大規模サイトには適切なクロール遅延を設定する