To block ChatGPT from your website, add robots.txt rules for OpenAI's three user agents: GPTBot (model training), OAI-SearchBot (ChatGPT search results), and ChatGPT-User (live browsing during conversations). Blocking only GPTBot — the most common advice — stops training but leaves your site fully visible in ChatGPT's answers. Here's the exact code for each outcome.
The three ChatGPT crawlers, and what each block does
"Blocking ChatGPT" is actually three separate decisions, because OpenAI operates three agents with different jobs:
| User agent | What it does | Blocking it means |
|---|---|---|
GPTBot | Collects training data for future GPT models | Your content won't train new models |
OAI-SearchBot | Indexes pages for ChatGPT's search answers | You disappear from ChatGPT search citations |
ChatGPT-User | Fetches a page when a user asks about it live | ChatGPT can't open your pages mid-conversation |
All three are documented by OpenAI and respect robots.txt, so the blocks below genuinely work — this is one of the better-behaved crawler families.
Option 1: Block training only (most common choice)
Keeps you visible in ChatGPT's answers while opting out of model training:
User-agent: GPTBot
Disallow: /
This is the right choice if your concern is "I don't want my content absorbed into models" but you still want the referral visibility when ChatGPT cites sources.
Option 2: Block everything OpenAI
Full opt-out — no training, no search citations, no live browsing:
User-agent: GPTBot
Disallow: /
User-agent: OAI-SearchBot
Disallow: /
User-agent: ChatGPT-User
Disallow: /
Understand what you're giving up: ChatGPT has hundreds of millions of users, and its search mode cites and links sources. Option 2 is the AI-era equivalent of de-indexing yourself from a search engine that your customers may already use daily.
Option 3: Block AI training industry-wide
If your goal is "no AI model trains on my content, period," GPTBot is only one of many training crawlers. You'd also want ClaudeBot (Anthropic), Google-Extended (Gemini), Applebot-Extended, Meta-ExternalAgent, CCBot (Common Crawl — the big one, since many labs train on its public dataset), and more. Our robots.txt Generator for AI Bots builds the complete multi-bot file in one click, with per-bot toggles, and the AI bot directory explains each agent individually.
Blocking only part of your site
robots.txt rules take path prefixes, so you can protect specific content while staying visible elsewhere:
User-agent: GPTBot
Disallow: /premium/
Disallow: /research/
Allow: /
This blocks training on /premium/ and /research/ while leaving your marketing pages, docs, and blog crawlable — a sensible middle ground for publishers with paid content.
Verify the block is working
- Check the file parses: paste your domain into the AI Crawler Access Checker — it reads your live robots.txt and shows exactly which AI bots are allowed, blocked, or unmentioned.
- Watch your logs: GPTBot fetches robots.txt before crawling; after the change, its page requests should stop within a day or two. The AI Bot Log Analyzer counts per-bot hits from a pasted log file, entirely in your browser.
- Don't expect retroactive removal: robots.txt governs future crawling. Anything collected before the block may remain in models already trained.
Common mistakes
- Blocking GPTBot and expecting to vanish from ChatGPT. Training and search are separate pipelines; Option 1 does not touch ChatGPT's answers.
- A
Disallow: /underUser-agent: *. That blocks every crawler including Googlebot — a catastrophic way to block AI. Always name the specific user agents. - Typos in agent names.
GPT-Bot,GPTbotwith a trailing space, orChatGPT_Usersilently match nothing. Copy the strings exactly, or generate the file with a tool instead of typing it. - Editing the wrong robots.txt. CDNs and some hosts overlay their own robots.txt. After editing, always load
yoursite.com/robots.txtin a browser and confirm your rules are actually being served.
Should you block ChatGPT at all?
It's a genuine trade-off, not a default. Blocking training protects content you don't want reproduced; allowing search agents earns citations in front of an enormous audience; and models that never see your content are less likely to know your brand exists. We walk through the decision framework — by site type and business model — in should you block AI bots?