<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Mayank Sharma]]></title><description><![CDATA[Mayank Sharma]]></description><link>https://mayank-sharma.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Thu, 05 Nov 2026 07:54:39 GMT</lastBuildDate><atom:link href="https://mayank-sharma.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[robots.txt for the AI era: copy-paste templates for GPTBot, ClaudeBot, PerplexityBot and Google-Extended]]></title><description><![CDATA[Copy-paste robots.txt templates for GPTBot, ClaudeBot, PerplexityBot and Google-Extended, plus a table of AI user agents and common mistakes.]]></description><link>https://mayank-sharma.hashnode.dev/robots-txt-for-the-ai-era-copy-paste-templates-for-gptbot-claudebot-perplexitybot-and-google-extended</link><guid isPermaLink="true">https://mayank-sharma.hashnode.dev/robots-txt-for-the-ai-era-copy-paste-templates-for-gptbot-claudebot-perplexitybot-and-google-extended</guid><category><![CDATA[SEO]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[Artificial Intelligence]]></category><category><![CDATA[robots.txt]]></category><dc:creator><![CDATA[Mayank Sharma]]></dc:creator><pubDate>Mon, 12 Oct 2026 05:30:09 GMT</pubDate><content:encoded><![CDATA[<p>Most <code>robots.txt</code> files I review were written for one crawler: Googlebot. Today the same file is read by a dozen AI agents, each run by a different company and each doing a different job. One line in the wrong group can keep you out of ChatGPT's answers, or hand your private paths to a training crawler.</p>
<p>This is a reference, not an essay. Pick the policy that matches your decision, paste it, change the paths, and test.</p>
<h2>First, know who's knocking</h2>
<p>AI user agents fall into two groups. The distinction matters, because "block training" and "stay out of AI answers" are different decisions.</p>
<p><strong>Agents that fetch pages for AI answers</strong></p>
<table>
<thead>
<tr>
<th>User agent</th>
<th>Company</th>
<th>What it does</th>
</tr>
</thead>
<tbody><tr>
<td><code>OAI-SearchBot</code></td>
<td>OpenAI</td>
<td>Builds the index behind ChatGPT search</td>
</tr>
<tr>
<td><code>ChatGPT-User</code></td>
<td>OpenAI</td>
<td>Fetches a page when a ChatGPT user asks about it</td>
</tr>
<tr>
<td><code>PerplexityBot</code></td>
<td>Perplexity</td>
<td>Builds Perplexity's index</td>
</tr>
<tr>
<td><code>Perplexity-User</code></td>
<td>Perplexity</td>
<td>Fetches a page for a user's question</td>
</tr>
<tr>
<td><code>Claude-SearchBot</code></td>
<td>Anthropic</td>
<td>Builds the index behind Claude's search</td>
</tr>
<tr>
<td><code>Claude-User</code></td>
<td>Anthropic</td>
<td>Fetches a page a Claude user asks about</td>
</tr>
<tr>
<td><code>DuckAssistBot</code></td>
<td>DuckDuckGo</td>
<td>Sources DuckDuckGo's AI answers</td>
</tr>
</tbody></table>
<p><strong>Agents that collect training data</strong></p>
<table>
<thead>
<tr>
<th>User agent</th>
<th>Company</th>
<th>What it does</th>
</tr>
</thead>
<tbody><tr>
<td><code>GPTBot</code></td>
<td>OpenAI</td>
<td>Training data for OpenAI models</td>
</tr>
<tr>
<td><code>ClaudeBot</code></td>
<td>Anthropic</td>
<td>Training data for Anthropic models</td>
</tr>
<tr>
<td><code>Google-Extended</code></td>
<td>Google</td>
<td>A control token, not a separate crawler: governs use in Gemini (training and grounding)</td>
</tr>
<tr>
<td><code>Applebot-Extended</code></td>
<td>Apple</td>
<td>A control token for Apple's AI models</td>
</tr>
<tr>
<td><code>meta-externalagent</code></td>
<td>Meta</td>
<td>Training data for Meta's AI</td>
</tr>
<tr>
<td><code>CCBot</code></td>
<td>Common Crawl</td>
<td>An open dataset that many models are trained on</td>
</tr>
<tr>
<td><code>Bytespider</code></td>
<td>ByteDance</td>
<td>Training data for ByteDance models</td>
</tr>
</tbody></table>
<p>Two notes before you copy anything:</p>
<ul>
<li><strong>Googlebot is separate.</strong> Google Search, AI Overviews and AI Mode use Googlebot. Blocking <code>Google-Extended</code> doesn't remove you from Search, but it can keep your pages out of Gemini's answers, because the token covers grounding as well as training.</li>
<li><strong>User-triggered fetchers may not obey robots.txt.</strong> Some operators say agents like <code>Perplexity-User</code> act on a person's behalf and may ignore the file. If you need a hard block, do it at your CDN or firewall.</li>
</ul>
<h2>Template 1: Welcome every AI crawler</h2>
<p>For brands that want to be read, cited and recommended everywhere.</p>
<pre><code class="language-txt">User-agent: *
Allow: /
Disallow: /admin/
Disallow: /account/
Disallow: /checkout/

Sitemap: https://www.example.com/sitemap.xml
</code></pre>
<p>That's genuinely enough, as long as no named group exists for an AI crawler further down. The moment you add one, see the mistakes section below.</p>
<h2>Template 2: Yes to AI answers, no to training</h2>
<p>The most common choice for publishers and SaaS companies: be cited, but don't donate your content to training sets.</p>
<pre><code class="language-txt"># AI answer and search agents: allowed
User-agent: OAI-SearchBot
User-agent: ChatGPT-User
User-agent: PerplexityBot
User-agent: Perplexity-User
User-agent: Claude-SearchBot
User-agent: Claude-User
User-agent: DuckAssistBot
Allow: /
Disallow: /admin/
Disallow: /account/
Disallow: /checkout/

# Training crawlers: blocked
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Applebot-Extended
User-agent: meta-externalagent
User-agent: CCBot
User-agent: Bytespider
Disallow: /

# Everyone else, including Googlebot
User-agent: *
Allow: /
Disallow: /admin/
Disallow: /account/
Disallow: /checkout/

Sitemap: https://www.example.com/sitemap.xml
</code></pre>
<p>Stacking several <code>User-agent</code> lines over one set of rules is valid under the robots.txt standard (RFC 9309), and it keeps the file readable.</p>
<p><code>Google-Extended</code> is deliberately left out. Add it to the blocked group only if you accept losing Gemini answers along with Gemini training.</p>
<h2>Template 3: Block all AI, keep Google Search</h2>
<p>For sites with licensing concerns or paid content.</p>
<pre><code class="language-txt">User-agent: GPTBot
User-agent: OAI-SearchBot
User-agent: ChatGPT-User
User-agent: ClaudeBot
User-agent: Claude-SearchBot
User-agent: Claude-User
User-agent: PerplexityBot
User-agent: Perplexity-User
User-agent: DuckAssistBot
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: meta-externalagent
User-agent: CCBot
User-agent: Bytespider
Disallow: /

User-agent: *
Allow: /
Disallow: /admin/

Sitemap: https://www.example.com/sitemap.xml
</code></pre>
<p>Remember the caveat above: this states your wishes. Enforcement happens at the edge, so pair it with your CDN's bot rules.</p>
<h2>Template 4: Section by section</h2>
<p>Sometimes the answer is "docs yes, everything else no", for example to let assistants help your users without exposing your blog archive.</p>
<pre><code class="language-txt">User-agent: OAI-SearchBot
User-agent: PerplexityBot
User-agent: Claude-SearchBot
Allow: /docs/
Allow: /pricing
Disallow: /

User-agent: *
Allow: /
Disallow: /admin/
</code></pre>
<p>Under RFC 9309 the most specific (longest) matching rule wins, so <code>Allow: /docs/</code> beats <code>Disallow: /</code> for anything under <code>/docs/</code>.</p>
<h2>The mistakes that quietly undo all of this</h2>
<p><strong>1. Named groups drop your wildcard rules.</strong> A crawler that finds a group with its own name follows only that group and ignores <code>User-agent: *</code> entirely. Add <code>User-agent: GPTBot</code> / <code>Allow: /</code> to be friendly, and every <code>Disallow</code> under <code>*</code> stops applying to GPTBot. Repeat your private paths in every named group, as the templates above do.</p>
<p><strong>2. Leftover blanket blocks.</strong> Lots of sites copied <code>User-agent: GPTBot</code> / <code>Disallow: /</code> in 2023. Fine if you still mean it. But check that nobody extended the same block to <code>OAI-SearchBot</code> or <code>ChatGPT-User</code>, which removes you from ChatGPT's answers rather than just its training data.</p>
<p><strong>3. Typos fail silently.</strong> <code>GPT-Bot</code>, <code>Claudebot-User</code>, <code>Perplexitybot/1.0</code>: a token that matches no crawler is ignored without error. Copy names from the operators' docs, or from a list you trust.</p>
<p><strong>4. Assuming robots.txt is a wall.</strong> It's a request. Your CDN or firewall decides what a crawler actually receives, and it can block an agent your file allows, or let through one your file forbids.</p>
<p><strong>5. Forgetting to test.</strong> After any change, request a page as each crawler and compare the result with a normal browser request.</p>
<h2>Tools to save some typing</h2>
<p>If you'd rather tick boxes than hand-edit, I help build Presence Scout, and we made a free <a href="https://presencescout.com/tools/robots-txt-generator">robots.txt generator for AI crawlers</a> with these same presets. It runs in your browser, no sign-up. Then paste a page into the free <a href="https://presencescout.com/tools/ai-crawler-checker">AI crawler checker</a> to see what each crawler actually receives.</p>
<p>The list of AI user agents changes every few months. Whatever you pick, put a reminder in your calendar to review it each quarter.</p>
<hr />
<p><em>Mayank is the Digital Marketing Manager at Presence Scout, which tracks how brands appear in AI answers and Google search.</em></p>
]]></content:encoded></item></channel></rss>