Skip to content
SEO & GEO

Robots.txt: A Practical Guide for B2B Sites (and AI Crawlers)

Robots.txt is not security and not a deindexing tool. Syntax, classic mistakes with field findings, how to test the file, and Klickbee's position on GPTBot and other AI crawlers.

Louis Mauclair · CEO

Updated November 2026 · 10 min read

Website source code on screen during a technical SEO audit

TL;DR Robots.txt is a plain-⁠text file at the root of your site that tells crawlers which URLs they may crawl. It does not secure anything and it does not remove pages from Google: a blocked page can stay indexed, with no description. On a B2B site, check four things first: no leftover Disallow: / from staging, CSS and JavaScript left open, a declared sitemap, and no lines copied from another project. For AI crawlers, allow the ones that get you cited and treat training as a deliberate decision. A sample file and a 10-point checklist follow.

Robots.txt belongs to the foundation of any technical SEO audit, next to indexation and crawl budget. One bad line can shut crawlers out of an entire site. This guide covers the syntax that matters, the classic mistakes (including two findings from audited sites), how to test the file, and then an analysis of AI crawlers based on each vendor's official documentation (read on November 27, 2026).

Robots.txt: what it does, what it doesn't, and how it differs from noindex

A robots.txt file sits at the root of a site, for example example.com/robots.txt. The format is standardized in RFC 9309 (September 2022). It controls crawling, not indexing, and mixing the two up is the costliest mistake.

  • It does: ask crawlers to skip certain paths (internal search, filters, account areas) and point to your sitemap.
  • It does not secure anything: per the RFC, the rules are not a form of access authorization, and listing a path makes it publicly discoverable. Never list a confidential folder.
  • It does not deindex: per Google, a blocked URL can still appear in search results, without a description, if other sites link to it.
  • It does not force anyone: some crawlers may ignore the rules or read them differently.

Robots.txt syntax: user-⁠agent, disallow, allow and sitemap

Google supports only four fields: user-⁠agent, allow, disallow and sitemap. Others, such as crawl-⁠delay, are ignored. Source: Google's robots.txt specification, read November 27, 2026.

  • User-agent: the crawler a rule targets. An asterisk means all crawlers.
  • Disallow: a path the crawler should not fetch. Disallow: / blocks the whole site.
  • Allow: an exception to a Disallow, for a subfolder or a page.
  • Sitemap: the full sitemap URL, protocol and host included. It applies no matter which user-⁠agent group it sits near.

Five traps, all documented by Google:

  • One file per host. It lives at the root, in UTF-8, and covers only its own protocol, host and port: a subdomain (blog, app) needs its own file.
  • Case matters. /fish is not /Fish. The characters * and $ work as wildcards (any string, end of URL).
  • Conflicts. Google follows the most specific rule, and when two rules contradict each other, the least restrictive wins.
  • One group per crawler. A crawler follows the group that names it most precisely, so a group named GPTBot does not inherit the rules of the asterisk group.
  • Size matters. Google reads 500 KiB of the file at most and ignores the rest.

Seven classic robots.txt mistakes on B2B sites

From the most destructive to the quietest.

  1. A leftover Disallow: / from staging. The test file ships to production and the whole site becomes uncrawlable. Check it at every launch, subdomains included.
  2. Blocked CSS and JavaScript. Google asks you not to block resources whose absence makes a page harder to understand.
  3. A missing, broken or undeclared sitemap. See the field example below.
  4. A file copied from another project. It carries the paths, sometimes the name, of a different site.
  5. Noindex written inside robots.txt. Google does not support a noindex directive in robots.txt, so it is ignored.
  6. A page that is both noindex and blocked. The crawler never reads the tag.
  7. A robots.txt that returns an HTTP error. For Google, a 4xx error (except 429) is treated as no file at all: no restrictions. A 5xx error pauses crawling of the site for the first 12 hours. The RFC tells crawlers to assume a full block when the file is unreachable.

If useful pages stay out of the index while your file is clean, work through our crawled, currently not indexed diagnosis.

How to test your robots.txt in three steps

  • Read it directly. Open /robots.txt on every host in a private window. Confirm a 200 status and the content you expect.
  • Search Console. The robots.txt report shows whether the file was fetched, when Google last crawled it, its size and any parsing errors. It also lets you request a recrawl after a fix.
  • Crawl the site. List the URLs blocked by robots.txt with the crawler of your choice. That is how you spot a key page caught by a pattern that is too broad.

A third-⁠party robots.txt tester is fine for a quick syntax check, but it shows what that tool parses, not what Google fetched.

After an edit, be patient: Google caches the file for up to about 24 hours, and OpenAI and Perplexity both cite a delay of about 24 hours before an update is picked up.

The fastest way to see where you stand is to have your robots.txt, your sitemap and AI crawler access reviewed together with indexation. Get your free action plan

AI crawlers: GPTBot, Google-⁠Extended and the rest

Method and limits. This section analyzes the official documentation from OpenAI, Anthropic, Perplexity and Google, read on November 27, 2026. It is not a field finding: we have not measured the effect of blocking on citations. These rules move fast, so recheck them before acting.

Three families of crawlers

OpenAI states that each setting is independent: you can allow OAI-⁠SearchBot to appear in search results while disallowing GPTBot.

  • Search and citation: OAI-⁠SearchBot, Claude-⁠SearchBot, PerplexityBot. Blocking them can take you out of answers. OpenAI says blocking OAI-⁠SearchBot keeps a site out of ChatGPT search answers, and Anthropic warns that disabling Claude-⁠SearchBot may reduce your visibility.
  • Training: GPTBot, ClaudeBot and the Google-⁠Extended token. Per the Google-⁠Extended page, this token, which has no dedicated crawler, does not affect inclusion or ranking in Google Search and does not control AI Overviews or AI Mode (a separate setting in Search Console).
  • User-⁠initiated requests: ChatGPT-⁠User, Claude-⁠User, Perplexity-⁠User. OpenAI says robots.txt rules may not apply to these actions, and Perplexity says its fetcher generally ignores them.

Klickbee's position on blocking AI crawlers

Our position: allow everything that gets you cited, and block training only when your content is the product. For a B2B company, four reasons:

  1. Search crawlers are the front door to citations. Blocking them, for example with a blanket ban on AI bots, can remove you from answers. For a lesser-⁠known company, that is the worst trade.
  2. Blocking training protects less than it seems. Compliance with robots.txt depends on each vendor's goodwill, user-⁠initiated requests may bypass it, and Google notes that its models may still link to domains that disallowed Google-⁠Extended.
  3. The benefit is unmeasured. We have no measurement of what a block does to visibility. It is a reasoned bet, not a result.
  4. The exception: paid research, databases, courses, licensed content. There, refuse training and gate access behind a login.

Our guide on how to rank in ChatGPT shows the cautious variant: search allowed, OpenAI training refused. Both policies are defensible. What is not defensible is blocking OAI-⁠SearchBot out of habit, or forgetting that a CDN or firewall can turn crawlers away without robots.txt saying so.

Limits, upcoming signals and verification

Robots.txt compels no one. Two training signals are on the way: Google says it intends to support a shared signal (user-⁠agent: __usage_ai-training) in early 2027, and Anthropic says that, as of October 30, 2026, it has begun recognizing a machine-⁠readable "no AI training" signal, though the page we read does not give its syntax.

To see who actually visits you, filter your server logs by user-⁠agent and check IP addresses: OpenAI, Anthropic and Perplexity publish their ranges. The free Klickbee AI Visibility extension reads your robots.txt crawler by crawler, locally.

An llms.txt file neither allows nor blocks anything: access is set in robots.txt. Measuring your citations afterward is the job of our AI SEO and GEO service.

A sample robots.txt for a B2B site

A starting file to adapt (domain and paths). Each bullet is one line of the file; in the real file, a blank line separates the groups.

Group for all crawlers, AI search crawlers included

  • User-⁠agent: *
  • Disallow: /search/
  • Disallow: /client-portal/

Sitemap declaration

  • Sitemap: https://www.example.com/sitemap.xml

Variant, only if you decide to refuse training

  • User-⁠agent: GPTBot
  • Disallow: /
  • User-⁠agent: ClaudeBot
  • Disallow: /
  • User-⁠agent: Google-⁠Extended
  • Disallow: /

What the file leaves out is deliberate: no blocked CSS or JavaScript, no noindex line, no dedicated group for search crawlers (the asterisk group covers them). The client portal should sit behind a login anyway.

Robots.txt checklist: 10 points to verify

  1. /robots.txt returns 200 on every host (domain and subdomains), not 403, 404 or 5xx.
  2. No Disallow: / in production.
  3. CSS, JavaScript and images needed for rendering are not blocked.
  4. A Sitemap line gives a full URL, and that sitemap returns 200.
  5. No line was copied from another project (unknown domain or path).
  6. No noindex directive is written in the file.
  7. Pages set to noindex are not blocked in the file.
  8. No confidential path is listed: those areas are behind a login.
  9. AI search and user crawlers are blocked by neither the file, the CDN nor the firewall.
  10. Your AI training policy is decided, written down, dated and reviewed every six months.

Bottom line

A B2B robots.txt file fits in a few lines, but every line counts: crawling open to the pages that earn revenue, a declared sitemap, no confusion with noindex, and a clear policy for AI crawlers. This week, open the file on every host, run the checklist, then decide in writing whether you allow training.

To have your robots.txt reviewed with the rest of your indexation and AI visibility: Get your free action plan

FAQ

Do robots.txt files actually work?

Yes, for crawlers that choose to honor it. The RFC describes the rules as requests that crawlers are asked to honor, and Anthropic says its bots follow them. But the protocol relies on goodwill, so it is a request, not a lock, and user-⁠initiated fetchers may bypass it.

Should I use robots.txt or noindex to keep a page out of Google?

Noindex. Robots.txt blocks crawling, but a blocked page can still appear if other pages link to it. Noindex only works when the page stays crawlable, so do not block it in robots.txt.

How do I test my robots.txt?

Open the file in a browser, check the robots.txt report in Search Console, then crawl the site to list blocked URLs. Compare that list with your key pages and request a recrawl of the file after each fix.

Should my sitemap be listed in robots.txt?

Yes: one Sitemap line with the full URL, valid for all crawlers. Also confirm the sitemap returns 200: on audited sites, we found sitemaps that were missing or whose child files returned 404.

Should I block GPTBot?

It is a choice, not a requirement. Blocking GPTBot tells OpenAI not to use your content for training, without removing you from ChatGPT search, which relies on OAI-⁠SearchBot. Our position: never block OAI-⁠SearchBot, and refuse GPTBot only if your content is the product or a legal constraint requires it.

Does blocking Google-⁠Extended remove me from Google AI Overviews?

No. Google says Google-⁠Extended does not affect inclusion in Google Search, and that AI Overviews and AI Mode grounding is managed with a separate Search generative AI control in Search Console. Check that setting separately.

Sources

Share

LinkedInX

Louis Mauclair

Louis leads growth and digital acquisition for B2B and e-⁠commerce companies in France and the UAE. Before Klickbee, he co-⁠built and sold an e-⁠commerce business that served more than 13,000 customers. He moved to Dubai in 2026 to work with companies across the GCC.

Free action plan

Want more leads from your traffic?

Get your 6-page action plan within 48 hours.

Get my free action plan

Related articles

All articles

Free action plan

Grow faster. Get your free action plan.

A tailored plan to generate more leads and sales from your existing traffic.

  • Built for B2B & e-⁠commerce teams
  • No commitment
  • A 15-minute call, then your plan within 48 hours
  • ★ 5.0 on Google · 22 reviews
  • Senior experts + in-⁠house AI
  • Founders of a 13,000-customer e-⁠commerce

Your action plan

6 pages · 3 priority levers · within 48 h

Free

Step 1 of 3 — Your business

Got a question first? Message us on WhatsApp
Get my free action planWhatsApp