·4分で読める

AIボット完全ブロック用robots.txtテンプレート【2026年版コピペOK】

13種類のAIボットを全てブロックするrobots.txtのコピペ用テンプレートです。WordPress・Nginx・Apache・Next.js向けの設定も掲載。

robots.txtテンプレートAIボットコピペ設定

AIボット完全ブロック用robots.txt(コピペOK)

以下をそのままコピーして robots.txt に貼り付けてください:

# ===================================
# AIボット完全ブロック設定(2026年版)
# AI Access Monitor推奨テンプレート
# ===================================

# OpenAI
User-agent: GPTBot
Disallow: /

User-agent: OAI-SearchBot
Disallow: /

# Anthropic (Claude)
User-agent: ClaudeBot
Disallow: /

User-agent: anthropic-ai
Disallow: /

# Perplexity
User-agent: PerplexityBot
Disallow: /

# Common Crawl (多くのAIの学習データ源)
User-agent: CCBot
Disallow: /

# Google Gemini / AI Overviews
User-agent: Google-Extended
Disallow: /

# Diffbot
User-agent: Diffbot
Disallow: /

# ByteDance / TikTok
User-agent: Bytespider
Disallow: /

# Amazon
User-agent: Amazonbot
Disallow: /

# You.com
User-agent: YouBot
Disallow: /

# Cohere
User-agent: cohere-ai
Disallow: /

# Mistral AI
User-agent: MistralBot
Disallow: /

# ===================================
# 通常の検索エンジンは引き続き許可
# ===================================
User-agent: Googlebot
Allow: /

User-agent: Bingbot
Allow: /

User-agent: Slurp
Allow: /

User-agent: DuckDuckBot
Allow: /

# サイトマップ
Sitemap: https://yourdomain.com/sitemap.xml

特定ディレクトリのみ保護するバージョン

# コラム・専門記事のみ保護、トップページは許可
User-agent: GPTBot
Disallow: /column/
Disallow: /blog/
Disallow: /knowledge/
Disallow: /case-study/

User-agent: ClaudeBot
Disallow: /column/
Disallow: /blog/

User-agent: PerplexityBot
Disallow: /

WordPress向け設定方法

  1. Yoast SEO → ツール → ファイルエディター → robots.txtを編集
  2. またはFTPで public_html/robots.txt を直接編集
  3. All in One SEO → ツール → robots.txt エディター

Next.js(App Router)向け設定

// app/robots.ts
import { MetadataRoute } from 'next'

export default function robots(): MetadataRoute.Robots {
  return {
    rules: [
      { userAgent: 'GPTBot', disallow: '/' },
      { userAgent: 'ClaudeBot', disallow: '/' },
      { userAgent: 'PerplexityBot', disallow: '/' },
      { userAgent: 'Google-Extended', disallow: '/' },
      { userAgent: 'CCBot', disallow: '/' },
      { userAgent: 'Diffbot', disallow: '/' },
      { userAgent: 'Bytespider', disallow: '/' },
      { userAgent: 'Amazonbot', disallow: '/' },
      { userAgent: 'OAI-SearchBot', disallow: '/' },
      { userAgent: 'anthropic-ai', disallow: '/' },
      { userAgent: 'YouBot', disallow: '/' },
      { userAgent: 'cohere-ai', disallow: '/' },
      { userAgent: 'MistralBot', disallow: '/' },
      { userAgent: '*', allow: '/' },
    ],
    sitemap: 'https://yourdomain.com/sitemap.xml',
  }
}

設定後の確認

# GPTBotとしてアクセスして確認
curl -A "GPTBot" https://yourdomain.com/ -I
# 403または200(robots.txtの場合は通常アクセスが返る)

# robots.txtの内容確認
curl https://yourdomain.com/robots.txt

より詳細なAIボット対策とリアルタイム監視は、AI Access Monitorで無料で始められます。

AIボット監視を無料で始める →

AI Access Monitor

まず計測から始めよう

1行のコード追加で、AIクローラーの計測を今日から開始。無料・設定不要。

無料で始める →