Short answer
GPTBot is OpenAI’s crawler that collects public web pages that may be used to train its AI models. You block it by adding “User-agent: GPTBot” and “Disallow: /” to your robots.txt file. Blocking it does not take you out of ChatGPT search, because ChatGPT search uses a different robot, OAI-SearchBot.
Key points
- GPTBot collects pages for training OpenAI’s models. It is not the robot that shows your site in ChatGPT search.
- OAI-SearchBot finds and links pages for ChatGPT search; ChatGPT-User opens a page when a ChatGPT user asks it to.
- In robots.txt you only write the short name: “User-agent: GPTBot”. The long user agent string is what appears in your server logs.
- OpenAI says the version number in the user agent string can change, so match on the word “GPTBot”, not the full string.
- Anyone can fake a user agent. To be sure a visit is really GPTBot, check its IP address against OpenAI’s published list.
What is GPTBot?
GPTBot is the web crawler (robot) OpenAI uses to collect publicly available pages that may be used to train its AI models. It reads your robots.txt file before it visits, and OpenAI says it follows the rules you set there.
OpenAI runs more than one robot, and each one does a different job. Blocking one does not block the others, so it helps to know which is which before you change anything.
| Robot | What it does | If you block it |
|---|---|---|
| GPTBot | Collects pages that may be used to train OpenAI’s models | Your pages are not used for future training. ChatGPT search is not affected. |
| OAI-SearchBot | Finds and links pages for ChatGPT search answers | ChatGPT search may not show or link your pages. |
| ChatGPT-User | Opens a page when a ChatGPT user asks it to (for example, pastes your link) | ChatGPT can’t read your page when a user asks about it. |
What is the full GPTBot user agent string?
These are the full user agent strings OpenAI documents for its three robots. You will see them in your server logs. OpenAI notes that the version numbers (such as GPTBot/1.4) may change, so check its official crawler page before you rely on an exact string.
In robots.txt you never write the full string. You only write the short name after “User-agent:”, for example “User-agent: GPTBot”.
| Robot | Full user agent string (as documented by OpenAI) |
|---|---|
| GPTBot | Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; GPTBot/1.4; +https://openai.com/gptbot |
| OAI-SearchBot | Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36; compatible; OAI-SearchBot/1.4; +https://openai.com/searchbot |
| ChatGPT-User | Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; ChatGPT-User/1.0; +https://openai.com/bot |
How do you block GPTBot in robots.txt? (copy-paste)
This file asks GPTBot to stay out of your whole site while keeping OAI-SearchBot and every other robot allowed. Copy it into the robots.txt file at the root of your website (yoursite.com/robots.txt). Leave a blank line between groups.
- To block GPTBot from one folder only, use “Disallow: /courses/” (or your folder) instead of “Disallow: /”.
- Test the finished file in our free robots.txt tester: GPTBot should be blocked and OAI-SearchBot allowed.
# Block OpenAI training, stay in ChatGPT search
User-agent: GPTBot
Disallow: /
User-agent: OAI-SearchBot
Allow: /
User-agent: *
Allow: /How do you allow GPTBot? (copy-paste)
If you have no robots.txt at all, every robot is allowed by default. If you want to say it clearly, or you are removing an old block, use a file like this one. Delete any older “User-agent: GPTBot” group with “Disallow: /”, because a robot follows the group that names it and ignores the “*” group.
- Then check AI bot access for your domain to confirm GPTBot, OAI-SearchBot and the other AI robots are allowed.
- Firewalls and security plugins (Cloudflare, Wordfence and others) can block AI robots even when robots.txt allows them. Check those settings too.
# Allow every OpenAI robot (and everyone else)
User-agent: GPTBot
Allow: /
User-agent: OAI-SearchBot
Allow: /
User-agent: *
Allow: /
Disallow: /admin/How do you see GPTBot in your server logs?
Every visit is written to your web server’s access log with its user agent string. Search the log for the word “GPTBot”. On a Linux server with Nginx or Apache, commands like these show how often it visits and which pages it reads (your log file path may differ; many hosting panels also let you download the raw log).
# Count GPTBot visits in an Nginx or Apache access log
grep -c "GPTBot" /var/log/nginx/access.log
# See the IP address and page of the last 20 GPTBot visits
grep "GPTBot" /var/log/nginx/access.log | awk '{print $1, $7}' | tail -20How do you check a visit really came from OpenAI?
A user agent is just text, so any scraper can pretend to be GPTBot. To be sure, compare the visitor’s IP address with the lists OpenAI publishes for each robot. If the IP address is not in the list, the visit did not come from OpenAI.
- GPTBot: openai.com/gptbot.json
- OAI-SearchBot: openai.com/searchbot.json
- ChatGPT-User: openai.com/chatgpt-user.json
Should you block GPTBot?
It is a business choice, and both answers are fair. Blocking GPTBot asks OpenAI not to use your pages for future training, which some businesses want for original writing, photos or paid content. It does not remove you from ChatGPT search, as long as OAI-SearchBot stays allowed.
If you want AI assistants to know your business well, many owners leave GPTBot allowed. Either way, keep OAI-SearchBot allowed if you want ChatGPT search to show and link your pages. For every other AI robot, see our guide to robots.txt for AI crawlers.
Frequently asked questions
What is the GPTBot user agent string?
OpenAI documents it as “Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; GPTBot/1.4; +https://openai.com/gptbot”. The version number can change. In robots.txt you only write “User-agent: GPTBot”.
Does blocking GPTBot stop ChatGPT search?
No. GPTBot is only for training. ChatGPT search uses OAI-SearchBot, so if you keep OAI-SearchBot allowed, ChatGPT search can still show and link your pages.
How do I see GPTBot in my server logs?
Search your web server’s access log for the word “GPTBot”, for example with grep on Linux or by downloading the log from your hosting panel. Then check the visitor’s IP address against openai.com/gptbot.json to make sure it is really OpenAI.
Does blocking GPTBot remove content OpenAI already collected?
No. robots.txt only controls future visits. It does not remove pages that were collected before you added the rule.
Will blocking GPTBot hurt my Google rankings?
No. Google uses its own robot, Googlebot, which follows its own rules in robots.txt. A rule for GPTBot does not affect Googlebot.