Agentic Commerce

Allow AI Shopping Agents and Block Scrapers With robots.txt, llms.txt and a WAF

Robots.txt and llms.txt state your rules for AI shopping agents, while IP checks, Web Bot Auth, WAF and rate limits block scrapers. Starter rule set included.

On this page

To allow AI shopping agents and block scrapers on an ecommerce site, treat robots.txt and llms.txt as signposts and your CDN or web application firewall (WAF) as the lock. The WAF decides who gets in: requests that prove who they are pass, impostors are blocked and everyone else meets a rate limit on search and product paths.

That split matters for agentic commerce, since agents that shop for a buyer may skip robots.txt. The agentic checkout readiness guide covers the wider picture; this page sticks to access control.

What can robots.txt and llms.txt do for AI shopping agents?

Robots.txt can ask well-behaved crawlers to stay on certain paths, and llms.txt can hand agents a short map of your best pages. Neither one can refuse a request, so neither one stops a scraper.

RFC 9309 states that "These rules are not a form of access authorization" and that the protocol "is not a substitute for valid content security measures." Agents that shop for a user may skip the file anyway. OpenAI says of ChatGPT-User: "Because these actions are initiated by a user, robots.txt rules may not apply." Google says its user-triggered fetchers "generally ignore robots.txt rules," and that group includes Google-Agent, which browses and takes actions when a user asks.

llms.txt is narrower still. llmstxt.org says "robots.txt and llms.txt have different purposes" and describes llms.txt as "used on demand, when an agent needs information about a topic while assisting a user." We found no allow or block syntax in the proposal. For crawler tokens operator by operator, see our guide to robots.txt rules for AI crawlers.

LayerWhat it doesWhat it cannot do
robots.txtStates which paths each crawler may readStop a client that ignores it
llms.txtPoints agents to your best pagesAllow or block anything
IP range checkMatches a request to the operator's published addressesCover operators with no published ranges
Web Bot AuthProves the operator with a published keyCover agents that do not sign yet
WAF and rate limitsAllows, blocks and caps requests at the edgeSpot a slow scraper by rate alone

How to block scrapers but allow AI agents in robots.txt

To block scrapers but allow AI agents in robots.txt, name every crawler you want in its own group, close private paths inside that group and tell every other crawler to stay out. Honest crawlers follow it; scrapers that ignore it are a job for the WAF.

Three rules in RFC 9309 shape the file. A crawler obeys the * group only when no group names it, so a named group never inherits your default disallows and has to repeat them. Inside a group, "The most specific match found MUST be used," which lets Disallow: /cart win over Allow: /. Crawlers also "MUST support" the * and $ wildcards, which handle sort and filter parameters.

User-agent: Googlebot
User-agent: Bingbot
User-agent: OAI-SearchBot
User-agent: ChatGPT-User
Allow: /
Disallow: /cart
Disallow: /checkout
Disallow: /account
Disallow: /search
Disallow: /*?*sort=

User-agent: *
Disallow: /

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

This allowlist style shuts out any crawler you forget to name, so give it an owner, a review date and the search tokens of every operator you want.

How to allow AI shopping agents with robots.txt and llms.txt

To allow AI shopping agents with robots.txt and llms.txt, name their tokens in the open group above, then publish an llms.txt at the site root that lists the pages an agent needs to answer a buyer.

An H1 with the store's name is "the only required section" and the rest is optional. For a hypothetical outdoor store, the parts look like this.

Part of llms.txtRequiredWhat a store puts there
H1 lineYesThe store's name
BlockquoteNoWhat you sell, where you ship and a note that product pages show live prices
H2 sections of linksNoTop category pages, then shipping, returns and sizing
"Optional" sectionNoSecondary pages such as care guides

You can start a draft with EGGKNITE's llms.txt generator. Access only gets an agent to the page; product data decides what it picks, as our guide to how ChatGPT product recommendations work explains.

Which identity checks separate real agents from impostors?

Check something a scraper cannot copy cheaply: the source IP against the operator's published ranges, or a cryptographic signature on the request. The user-agent string alone proves nothing; Google warns that "The user agent string can be spoofed."

CheckWhere the operator publishes itWhat you compare
User-agent tokenThe operator's crawler pageThe token in the request header
IP rangeOpenAI: one JSON file per bot; Google: user-triggered-agents.json for Google-AgentSource IP against the current list
Web Bot AuthThe agent's key directory at /.well-known/http-message-signatures-directoryThe signature against the published public key

OpenAI's files include searchbot.json and chatgpt-user.json on openai.com, and Google says Google-Agent uses ranges from user-triggered-agents.json. Refresh these lists on a schedule.

Signatures go further. Cloudflare documents Web Bot Auth as three headers, Signature, Signature-Input and Signature-Agent, with a tag of web-bot-auth and created and expires timestamps; a short expiry "reduces the likelihood of replay attacks." The signing follows RFC 9421 and the protocol "relies on IETF drafts," so details can still change. Google says it is "experimenting with the Web Bot Auth protocol."

Which WAF and rate-limit rules keep scrapers out?

Let verified bots and signed agents through first, block requests that claim an AI agent's name without the matching verification, then cap request rates on search and product paths for everyone else. On Cloudflare each step maps to a documented field.

Cloudflare says cf.bot_management.verified_bot marks "a known good bot or crawler" and "Provides the same information as" cf.client.bot; it needs Enterprise Bot Management, except in rate limiting rules, where "this field is available on all plans." The cf.bot_management.signed_agent field, per Cloudflare, flags "a known agent that self-identifies with Web Bot Auth" and also needs Enterprise Bot Management.

Plan size sets how many rate limits you get. Cloudflare lists 1 rule on Free, limited to the Path and Verified Bot fields, 2 on Pro, 5 on Business and 100 on Enterprise, adding that "The number of rules depends on the exact contract terms." Free and Pro count by IP only.

Starter configuration to allow AI shopping agents and block scrapers

A starter configuration for an ecommerce store runs in six steps: publish robots.txt and llms.txt, let verified bots skip your bot rules, block unverified requests that use an AI agent's name and rate-limit search and product pages. Thresholds are labeled assumptions for a hypothetical mid-size store on Cloudflare Pro; tune them to your traffic.

  1. robots.txt: publish the allowlist file above.
  2. llms.txt: publish a short map of category and policy pages at the root.
  3. Skip rule: cf.client.bot skips your bot rules. On Enterprise Bot Management, add or cf.bot_management.signed_agent.
  4. Impostor block: (http.user_agent contains "GPTBot" or http.user_agent contains "ChatGPT-User") and not cf.client.bot blocks the request; add each AI token you allow. Check a week of logs first: if genuine traffic from an operator's published IP file arrives without the verified flag, add those ranges as an exception.
  5. Search rate limit: starts_with(http.request.uri.path, "/search") and not cf.bot_management.verified_bot, counted per IP. Assumption: 30 requests per 60 seconds, then block for 10 minutes.
  6. Catalog rate limit: the same expression on /products/. Assumption: 120 requests per 60 seconds per IP.

Step 5 uses only the Path and Verified Bot fields, so it can run as the single Free rule, but Free allows only a 10-second counting period and a 10-second block, so scale the thresholds down. Robots.txt changes take effect on a lag, since RFC 9309 lets crawlers cache the file for up to 24 hours.

Starter configuration on Cloudflare
Six steps to let shopping agents in and keep scrapers out
1
Publish robots.txt
The allowlist file above
2
Publish llms.txt
Category and policy pages
3
Skip verified bots
cf.client.bot skips bot rules
4
Block impostors
AI agent name, no verified flag
5
Rate-limit search
Per IP on /search
Rate-limit catalog
Same expression on /products/
Free allows 1 rate limiting rule with a 10-second period; signed_agent needs Enterprise.
Verified bots skip the bot rules first, so the impostor block and the rate limits only meet unverified traffic.

How do you check that shopping agents still get in?

Compare verified agent hits per token in your CDN logs for the weeks before and after the rules ship. Steady verified hits and rising impostor blocks mean the rules work; a drop in verified hits means a rule caught a real agent.

Then check the demand side. The AI shopping visibility KPIs guide sets a scorecard for a pilot, AI share of voice tracks how often assistants name you against competitors and EGGKNITE's free AI visibility checker is a quick first test. For citation work run as a program, see Apex, our AEO program built to get brands cited by ChatGPT, Claude, Gemini, Perplexity and more.

Sources

Frequently asked questions

Can an AI shopping agent ignore robots.txt?
Yes, and some operators say so in their own documentation. OpenAI says robots.txt rules may not apply to ChatGPT-User because a person starts those visits, and Google says its user-triggered fetchers, Google-Agent among them, generally ignore robots.txt. That is why the access decision for agents belongs in your WAF, where IP ranges and signatures can be checked before a request reaches the store.
Does blocking GPTBot keep my products out of ChatGPT search?
No. OpenAI documents GPTBot as the crawler for content that may be used to train its foundation models, while OAI-SearchBot surfaces sites in ChatGPT search features. Each one follows its own robots.txt group, so a store can disallow GPTBot and still allow OAI-SearchBot. Decide training access and search access as two separate questions.
Do I need Cloudflare Enterprise to recognize signed agents?
For the dedicated field, yes. Cloudflare's cf.bot_management.signed_agent field requires an Enterprise plan with Bot Management. On other plans you can still separate verified bots from everyone else, since Cloudflare says its verified bot field is available on all plans inside rate limiting rules, or you can verify signatures in your own code against the agent's published keys.
How long do robots.txt changes take to reach AI crawlers?
Up to about a day for crawlers that follow the standard. RFC 9309 says crawlers should not use a cached copy of robots.txt for more than 24 hours unless the file is unreachable. WAF and rate-limit rules take effect at the edge once deployed, so put urgent blocks there and treat robots.txt as the slower signal.
Should llms.txt list my product prices?
Our view is that it should link to pages with live prices instead. The llms.txt proposal describes a title, a summary, sections of links and an optional section, and a static file drifts from your catalog the first time a price or stock level changes. Keep the file to pages that stay true, such as categories, shipping, returns and sizing.

Free tools for this topic

FREE TOOLAI Brand Visibility MonitorDoes ChatGPT recommend you — or your competitor?CALCULATORAI & Automation ROI CalculatorPut a payback date on every automation idea.FREE TOOLAI Readiness ScorecardTwelve questions. Your automation roadmap, scored.

Keep reading

EcommerceYour Next Customer May Never See Your WebsiteRead →GuidesWhich AI Crawlers to Allow or Block in robots.txtRead →EcommerceHow ChatGPT Product Recommendations Work and How to Earn ThemRead →
CATALIST NEWSLETTER

Monthly dose of growth marketing.

Get marketing tips, narratives, guides, and playbooks delivered to your inbox.

Protected by reCAPTCHA — Google's Privacy Policy and Terms of Service apply.