Skip to content
24/7 support · 7-day money-back guarantee · Free plan, no card neededSee plans

Blog › Technical SEO ›

AI crawlers and robots.txt: a practical guide to controlling GPTBot, ClaudeBot, Google-Extended and others

Cover image: AI crawlers and robots.txt: a practical guide to controlling GPTBot, ClaudeBot, Google-Extended and others

Open the server logs of almost any website today and you will find visitors with names that did not exist a few years ago: GPTBot, ClaudeBot, PerplexityBot, CCBot, Applebot-Extended and many more. These are crawlers and agents operated by AI companies, collecting content to train models, to power AI search features or to fetch pages when a user asks an assistant a question. Site owners have strong and varied feelings about them. Some want their content used widely to gain visibility in AI answers. Others want to keep their content out of training datasets. Many want something in between.

Contents of the guide: AI crawlers and robots.txt: a practical guide to controlling GPTBot, ClaudeBot, Google-Extended and others
The main sections of this guide.

Robots.txt, the decades-old file that tells crawlers where they may go, has become the main tool for expressing those preferences. Used well, it lets you allow AI search visibility while opting out of training, or block specific bots entirely. Used carelessly, it can remove your site from AI answers you wanted to appear in, or fail to block the bots you meant to stop. This guide explains the main types of AI bots, how to identify them, how to write robots.txt rules for each, the limits of robots.txt and how to choose a policy that fits your goals.

Three kinds of AI bots

It helps to group AI bots by purpose, because the right policy depends on what each does.

Training crawlers collect web content to build datasets for training AI models. Examples include OpenAI’s GPTBot, Anthropic’s ClaudeBot, Common Crawl’s CCBot and various others. Blocking them opts your future content out of their training crawls, though it does not remove content already collected.

Search and indexing bots build indexes that AI assistants use to find and cite sources when answering questions. Examples include OpenAI’s OAI-SearchBot and PerplexityBot. Blocking them can prevent your site from appearing as a cited source in those products’ answers.

User-initiated fetchers retrieve a specific page when a user asks an assistant to read it or when the assistant needs it to answer a question in real time. Examples include ChatGPT-User, Perplexity-User and similar agents from other providers. Some providers state that these fetchers may not follow robots.txt in the same way as crawlers, because they act on direct user requests.

Google adds a special case. Googlebot crawls for Google Search, including AI Overviews and AI Mode, which are part of Search. Google-Extended is not a separate crawler but a robots.txt product token that controls whether content Google crawls may be used to train and ground its Gemini models outside Search. Blocking Google-Extended does not affect your Google Search rankings or inclusion.

Comparison: AI bot types and what blocking them does
AI bot types and what blocking them does

Identifying AI bots in your logs

Before writing rules, see who actually visits. Server access logs record each request with a user agent string. Search for known AI bot names and count requests over a month. Many hosting dashboards, content delivery networks and security plugins also provide bot analytics.

Be aware that user agent strings can be faked. Malicious scrapers sometimes pretend to be well-known bots. Major providers publish ways to verify their crawlers, such as IP ranges or reverse DNS lookups. If a bot claiming to be GPTBot ignores your rules, check whether it comes from OpenAI’s published IP ranges before concluding that OpenAI is misbehaving.

Note which bots request which parts of your site and how often. Heavy crawling of large sites can consume server resources, which may influence your policy independently of content concerns.

How robots.txt rules work

Robots.txt is a plain text file at the root of your domain. It contains groups of rules, each starting with one or more User-agent lines naming the crawlers the group applies to, followed by Disallow and Allow lines specifying paths. A crawler follows the most specific group that matches its name; if none matches, it follows the group for all user agents, written as User-agent followed by an asterisk.

To block a specific bot entirely, you create a group with its user agent name and a Disallow line for the root path. To block it from only part of the site, you disallow specific paths. To allow everything, you can leave the Disallow line empty or omit a group for that bot.

Rules are case-sensitive for paths, and each bot’s documentation specifies the exact user agent token to use. Always check the current documentation, because names and behaviors change. After editing, test your file with the robots.txt tool to make sure it parses and applies as you expect.

Step by step: Setting an AI bot policy in robots.txt
Setting an AI bot policy in robots.txt

Policy option 1: allow everything

Some sites want maximum visibility in AI products and are comfortable with their content being used for training. Marketing sites, documentation and businesses that benefit from brand awareness often take this approach. The policy is simple: do not block AI bots in robots.txt, and make sure your security systems do not block them either.

Even with an open policy, consider rate limits if crawling becomes heavy, and monitor for abusive bots that disguise themselves as legitimate ones.

Policy option 2: allow search, block training

This is a common middle ground. You want to appear as a cited source in AI answers, which can bring visibility and traffic, but you do not want your content used to train models. The policy blocks training crawlers such as GPTBot, ClaudeBot and CCBot, blocks Google-Extended if you want to opt out of Gemini training, and allows search bots such as OAI-SearchBot and PerplexityBot. Googlebot remains allowed so that Google Search, including AI Overviews and AI Mode, continues to include you.

This policy depends on providers keeping training and search crawlers separate and documenting them clearly, which several major providers do. Where a provider uses a single crawler for both purposes, you have to choose.

Policy option 3: block all AI bots

Some publishers and content owners block all known AI bots, often because their content is their product and they do not want it summarized or used without compensation. This policy lists all known AI user agents with full disallow rules.

Understand the trade-off: you are likely to lose citations and referral traffic from AI assistants that respect your rules. Also understand the limits: new bots appear regularly, some bots do not follow robots.txt and content already collected is not removed. Blocking Googlebot to stop AI Overviews would remove you from Google Search entirely, which few sites want.

Snippet controls versus robots.txt

For Google, there is another lever: snippet controls. The nosnippet meta tag or header prevents Google from showing text snippets from a page in search results, including in AI features. The max-snippet directive limits snippet length. These controls let you limit how your content appears in AI Overviews and AI Mode without blocking crawling. They also affect classic snippets, so pages may look less appealing in regular results.

The data-nosnippet attribute can exclude specific parts of a page from snippets while allowing others. This can be useful for protecting certain content, such as paywalled excerpts, while keeping the rest visible.

Use the meta tag checker to confirm which robots and snippet directives a page currently sends.

The limits of robots.txt

Robots.txt is a voluntary convention. Reputable companies follow it, but it is not a security mechanism. Bad actors can ignore it, and it does not protect content from people who copy it manually. It also does not retroactively remove content already collected.

For stronger protection, consider server-level measures: blocking IP ranges, rate limiting, firewall rules from your host or content delivery network and bot management services that detect behavior rather than relying on names. Some content delivery networks offer one-click options to block AI crawlers or to require payment for crawler access.

Legal measures, such as terms of service and copyright notices, may also play a role, though their effectiveness against automated collection varies. Seek legal advice for significant concerns.

Performance and crawl load

Aggressive crawling can strain small servers. If AI bots are consuming significant resources, robots.txt may not be enough, because some bots crawl heavily even while following path rules. Options include rate limiting specific user agents at the server or CDN, using Crawl-delay where supported (not all bots honor it) and caching pages efficiently so that bot requests are cheap to serve.

Monitor server load and response times. If legitimate users experience slowdowns, prioritize their experience over bots.

WordPress-specific tips

WordPress generates a virtual robots.txt by default. Many SEO plugins let you edit it from the dashboard, and some offer toggles to block known AI bots. If you use such a toggle, check which bots it covers and whether it blocks search bots as well as training crawlers. A physical robots.txt file in your site root overrides the virtual one.

After changing robots.txt, purge any caching layers so the new version is served. Then verify by visiting yourdomain.com/robots.txt and testing with the robots.txt tool. Remember that robots.txt changes do not affect how WordPress itself behaves; they only instruct crawlers.

Keeping your policy current

The AI crawler landscape changes quickly. New companies launch bots, existing companies rename or split them and policies on robots.txt compliance evolve. Review your logs and policy at least quarterly. Subscribe to updates from major providers where possible. Maintain a short internal document listing which bots you allow or block and why, so decisions remain clear as your team changes.

Communicating your policy

If your stance on AI use matters to your audience, consider stating it publicly, for example on an AI policy page or in your terms. Readers, partners and clients increasingly ask how content is used. A clear statement helps manage expectations and demonstrates thoughtfulness.

Understanding what each choice costs and gains

Every robots.txt decision about AI bots is a trade-off, and it helps to write down both sides. Allowing training crawlers costs control over how your content contributes to models, but it may increase the chance that models know about your brand and describe it accurately even without live retrieval. Blocking training crawlers protects your content from future training collection, but it does not remove what is already collected and may slightly reduce how familiar models are with you over time.

Allowing AI search bots gains you eligibility for citations and referral traffic in assistant answers, and costs you some control over how your content is summarized. Blocking them protects against summarization in those products but removes a growing discovery channel. Allowing user-initiated fetchers lets assistants read your pages when users ask about them, which can be important for customer service and product questions. Blocking them may frustrate users who try to use assistants with your site.

There is no universally right answer. A publisher whose revenue depends on page views and subscriptions weighs these trade-offs differently from a software company that wants maximum awareness, or a local business that wants customers to find it wherever they search. Decide based on your business model, and revisit the decision as the market and your data change.

Checking compliance with your rules

Once your rules are in place, verify that bots respect them. In your server logs, filter by each bot’s user agent and confirm that requests to disallowed paths stop within a reasonable time after the change. If requests continue, check whether the requests come from the provider’s published IP ranges. Genuine requests that ignore robots.txt can be reported to the provider. Requests from other IP ranges using the bot’s name are likely impostors, which you can block at the server or firewall level.

Keep notes of what you find. Patterns of non-compliance are useful evidence if you later decide to use stronger technical or legal measures.

Robots.txt for multiple subdomains

Robots.txt applies per host. A file at www.example.com/robots.txt does not govern shop.example.com or blog.example.com. If your content spans subdomains, each needs its own robots.txt with consistent rules. This is easy to overlook when a shop or documentation site runs on a separate platform. Audit every subdomain that serves public content, and check that rules match your intended policy on each.

Questions to settle with stakeholders

Decisions about AI bots often involve people beyond the SEO team. Marketing may want visibility in assistants. Legal may have concerns about licensing and copyright. Editorial teams may worry about summaries replacing visits. Engineering may care about server load. Bring these views together with a few questions. What is our content worth, and how do we earn from it? Do we want to be cited in AI assistants, and which ones matter to our audience? Are we comfortable with our content being used to train models, and does that differ by section? How much crawling can our infrastructure handle? Who will review the policy and how often?

Recording the answers turns a technical file into a business decision with clear ownership. It also makes it easier to explain the policy to partners, clients or readers who ask.

A short glossary

User agent. The name a crawler uses to identify itself in requests and in robots.txt groups. Disallow. A robots.txt rule telling a crawler not to request matching paths. Allow. A rule permitting paths within a broader disallow. Product token. A robots.txt name, like Google-Extended, that controls a use of content rather than a separate crawler. Snippet controls. Meta directives such as nosnippet that limit how search engines show text from a page. Rate limiting. Server-side limits on how many requests a client can make in a period. Bot management. Tools that classify and control automated traffic by behavior, not just by name.

Key takeaways

  • AI bots fall into training crawlers, search bots and user-initiated fetchers, each with different effects when blocked.
  • Google-Extended controls Gemini training use without affecting Google Search.
  • A common policy allows search bots and Googlebot while blocking training crawlers.
  • Robots.txt is voluntary and not retroactive; combine it with server-level controls for stronger protection.
  • Snippet controls limit how content appears in Google’s AI features without blocking crawling.
  • Review logs and rules regularly, because the landscape changes fast.

Frequently asked questions

Does blocking GPTBot remove me from ChatGPT search? GPTBot is OpenAI’s training crawler. Its search and user-initiated agents use different names. Check OpenAI’s documentation for current details.

Will blocking Google-Extended hurt my rankings? No. Google states that Google-Extended does not affect inclusion or ranking in Google Search.

Can I stop AI Overviews from using my content? Snippet controls such as nosnippet limit how content appears in Google search features, including AI features, but also affect classic snippets.

Do all AI bots follow robots.txt? Major providers state that their documented crawlers do. Others may not, and user-initiated fetchers may follow different rules.

Does blocking bots remove content already collected? No. Robots.txt only affects future crawling.

Should small businesses block AI bots? Most small businesses benefit from visibility, so blocking search bots is usually counterproductive. Blocking training crawlers is a personal or business choice.

Example policies in plain words

It can help to describe policies in plain language before translating them into rules. A local bakery might say: we want to be found everywhere, so we allow all bots, but we will rate-limit any bot that slows the site. A publisher might say: we allow Googlebot and Bingbot for search, allow AI search bots that cite and link to us, and block crawlers that collect content for model training, including Google-Extended. A premium research firm might say: our reports are our product, so we block all known AI bots, use snippet controls on report pages and rely on server-level bot management for unknown scrapers.

Writing the policy in words first makes it easier to discuss with colleagues and to check that the robots.txt file matches the intent.

Monitoring the effects of your policy

After changing your AI bot rules, watch for effects. In server logs, confirm that blocked bots stop requesting disallowed paths and that allowed bots continue. In analytics, monitor referral traffic from AI assistants; a sudden drop after blocking a search bot suggests the change removed you from that product’s citations. Sample key questions in AI assistants to see whether your site is still cited. If results do not match your goals, adjust your rules.

A note on new and unknown bots

Not every AI-related bot is documented or well known. New companies launch crawlers frequently, and some do not identify themselves clearly. A robots.txt file that lists only famous bots will miss many others. A catch-all rule for all user agents applies to unknown bots that respect robots.txt, but it also applies to search engines unless you carve them out with specific allow groups. For sites that want strict control, combining a curated robots.txt with behavior-based bot management at the server or CDN level is more effective than trying to list every name.

Mistakes that cause accidental damage

Several mistakes recur when sites adjust AI bot rules. Copying a long blocklist from a website without checking it can block search bots you wanted to allow. Adding a disallow rule under the wrong user agent group can block Googlebot or Bingbot by accident. Leaving a staging robots.txt with a blanket disallow in place after launch removes the site from all search. Blocking resources such as CSS and JavaScript folders can prevent search engines from rendering pages properly. Always test changes and check the live file after deployment.

Licensing and paid access

Some publishers have signed licensing agreements with AI companies, granting access to content in exchange for payment or other benefits. Some infrastructure providers now offer tools that let sites charge crawlers for access or require crawlers to identify themselves before receiving content. These approaches are still developing. If your content has significant commercial value, it may be worth exploring them alongside robots.txt rules, and staying informed as industry practices and regulations evolve.

How robots.txt interacts with your sitemap

Robots.txt often includes a Sitemap line pointing to your XML sitemap, which helps all crawlers discover your pages. If you block certain bots from the whole site, they will not use the sitemap. If you block them from specific paths, make sure your sitemap does not list URLs you have disallowed for crawlers you care about, since that sends mixed signals. Keep the sitemap focused on pages you want indexed and the robots.txt rules consistent with it.

Keep reading

Comments

Leave a comment

Check your own site

Run a free audit and see what to fix first.

Run a free audit