Robots.txt for online shops: what to allow and what to block
What a shop's robots.txt should block (cart, checkout, filters) and must leave open (products, images, CSS), with a complete example file and a block for AI crawlers.
On this page
In short
- robots.txt controls which URLs crawlers fetch; it does not control indexing, and RFC 9309 says its rules are not a form of access authorization.
- A shop usually disallows cart, checkout, account pages, internal search results and filter and sort parameters, and leaves product pages, category pages, images, CSS and JavaScript crawlable.
- A crawler follows only the group that names it most specifically, and within that group the longest matching rule wins, so a named group must repeat every shared rule.
- Google Merchant Center disapproves products whose landing pages Googlebot cannot crawl, and warns of disapproval when robots.txt blocks Googlebot-image from product images.
- OpenAI, Anthropic, Perplexity and Google document separate robots.txt names for search, training and user requests, so a shop can allow one and block another.
- As of November 2026, Google ignores Crawl-delay, reads the first 500 kibibytes of a robots.txt file and generally caches it for up to 24 hours.
What to allow and what to block#
A shop's robots.txt has one job: keep crawlers away from pages with nothing to find, and leave everything a search engine, a shopping channel or an AI assistant needs to read.
| Part of the shop | In robots.txt | Why |
|---|---|---|
| Product and category pages | Allow (no rule needed) | They are what search, Shopping and assistants read |
| Product images | Allow | Merchant Center fetches them with Googlebot-image; Google says blocked media files stay out of its search results |
| CSS and JavaScript the pages need | Allow | Google asks you not to block resources when pages are harder to understand without them |
| Cart, checkout, account | Disallow | No content for search, only crawl traffic |
| Internal search results | Disallow | A set of URLs without end, all similar to pages you already have |
| Filter and sort parameters | Disallow, unless you want them in search | Google's guidance on faceted navigation |
| Pages that must stay private or out of search | Not a job for robots.txt | Use a login or noindex |
What robots.txt does and does not do#
It controls crawling. A crawler requests /robots.txt before it fetches pages and follows the group of rules that names it. The IETF published the format as a standards track document, RFC 9309, in September 2022.
It does not control indexing. Google's introduction to robots.txt says the file is used mainly to manage crawler traffic and is not a mechanism for keeping a page out of Google. A blocked URL can still appear in results, without a description, when other pages link to it.
It is not access control. RFC 9309 says the rules are not a form of access authorization, and warns that every path you list is public. Following the file is each crawler's decision.
It covers one host. Google applies a file only to the host, protocol and port it is served from: the file on www.example.com does not cover example.com or shop.example.com.
The syntax in one table#
| Line or sign | What it does | Example |
|---|---|---|
User-agent: | Starts a group and names the crawler it is for; * means every crawler without its own group | User-agent: Googlebot |
Disallow: | A path the crawler must not fetch; an empty value blocks nothing | Disallow: /checkout |
Allow: | An exception inside a disallowed path | Allow: /account/help |
Sitemap: | The full URL of a sitemap; not tied to any group | Sitemap: https://www.example.com/sitemap.xml |
* | Any run of characters, as Google documents it | Disallow: /*?*sort= |
$ | The end of the URL | Disallow: /*.pdf$ |
# | A comment, to the end of the line | # checked in November |
Five rules decide how Google reads the file, as of November 2026:
- One group per crawler. A crawler uses the group with the most specific user agent that matches it and ignores all others. The
*group is not added to a named group. - The most specific rule wins. Inside the group, the rule with the longest matching path applies. When an allow and a disallow rule are equally long, the less restrictive one applies. RFC 9309 says the same.
- Paths are case-sensitive, names are not.
Disallow: /fishdoes not match/Fish.asp. - Size and caching. Google ignores everything after 500 kibibytes and generally caches the file for up to 24 hours.
- Errors count. If the file returns a 4xx status other than 429, Google crawls as if there were no restrictions. On a server error, Google stops crawling the site for the first 12 hours and keeps requesting the file.
Crawl-delay is not part of RFC 9309, and Google does not support it. Bing and Anthropic say they honor it.
A complete robots.txt for a shop, to copy and adapt#
Northpeak, a fictional outdoor shop, keeps products under /products/ and categories under /collections/. Your paths and parameter names will differ: take them from your own URLs.
User-agent: * # every crawler without its own group
Disallow: /cart # cart, checkout, account: nothing to find
Disallow: /checkout
Disallow: /account
Disallow: /search # internal search results
Disallow: /*?*sort= # sort orders of the same list
Disallow: /*?*color= # filters (faceted navigation)
Disallow: /*?*size=
Disallow: /*?*price=
Sitemap: https://www.example.com/sitemap.xmlThe filter rules follow the pattern in Google's guidance on faceted navigation URLs. Google explains that crawlers cannot tell whether a filtered URL is useful without fetching it, so they fetch very many, and new products are found more slowly. If you do not need filtered pages in search, Google recommends disallowing them and says there is often no good reason to let them be crawled. If you want some of them indexed, leave them crawlable and follow Google's rules for them instead, such as & between parameters and a 404 for combinations without results.
How the file treats Northpeak's URLs:
| URL | Result | Why |
|---|---|---|
/products/trail-runner-2 | Crawled | No rule matches |
/collections/jackets?page=2 | Crawled | No rule matches, so later pages of a category stay reachable |
/collections/jackets?color=blue | Blocked | Matches /*?*color= |
/search?q=headlamp | Blocked | Starts with /search |
/cartridges | Blocked by mistake | Starts with /cart: a rule is a prefix |
The last row is the classic trap. If a category begins with the same letters as a blocked path, end the rule where the path ends: Disallow: /cart/ plus Disallow: /cart$.
Nothing in this file mentions images, CSS or JavaScript, and that is the point. They need a rule only when they sit in a folder you disallow. In that case, add an Allow line for the folder that holds them. What a crawler should find on the pages it may read is the subject of product page SEO.
How to allow or block AI crawlers, one by one#
AI companies read the same file, but with several names per company: one for search, one for training, one for pages a user asks about. Whether an assistant's search can show a page starts with whether its search crawler may read it. Crawlers are one of the paths described in how AI assistants find and sell products; feeds are another.
- OAI-SearchBot, Claude-SearchBot, PerplexityBot
- Indexes your pages
- Assistants can show and link your shop
- GPTBot, ClaudeBot, CCBot, Google-Extended
- Collects content or controls its use
- Your content may train models
- ChatGPT-User, Claude-User, Perplexity-User
- Opens one page because a person asked
- robots.txt may not apply
This block goes below the first one. It lets the search crawlers and user fetchers read the catalog and blocks training. To change a decision, move a crawler's line to the other kind of group.
User-agent: OAI-SearchBot # OpenAI: ChatGPT search
User-agent: ChatGPT-User # OpenAI: a page a user asks about
User-agent: Claude-SearchBot # Anthropic: Claude's search
User-agent: Claude-User # Anthropic: a page a user asks about
User-agent: PerplexityBot # Perplexity: search results
Disallow: /cart # the same rules as the * group
Disallow: /checkout
Disallow: /account
Disallow: /search
Disallow: /*?*sort=
Disallow: /*?*color=
Disallow: /*?*size=
Disallow: /*?*price=
User-agent: GPTBot # OpenAI: training
Disallow: /
User-agent: ClaudeBot # Anthropic: training
Disallow: /
User-agent: Google-Extended # Google: Gemini training and grounding
Disallow: /
User-agent: Applebot-Extended # Apple: training
Disallow: /
User-agent: CCBot # Common Crawl: open crawl data
Disallow: /
User-agent: meta-externalagent # Meta: training or indexing
Disallow: /The first group is optional: a crawler without a group follows * anyway. Naming the crawlers documents the decision, and it shows why a named group must repeat the shared rules.
| Crawler | Allow it if you want | Block it if you want |
|---|---|---|
OAI-SearchBot | Your pages shown in ChatGPT's search answers | To stay out of those answers (OpenAI says navigational links can still appear) |
GPTBot | Your content available for training OpenAI's models | To signal that it should not be used for training |
ChatGPT-User | ChatGPT to open a page when a user asks | OpenAI says robots.txt rules may not apply to it |
Claude-SearchBot | Your site indexed for Claude's search | No indexing; Anthropic says visibility may drop |
Claude-User | Claude to fetch a page for a user's question | Claude cannot retrieve your content for those requests |
ClaudeBot | Your content available for training Anthropic's models | Future content left out of training datasets |
PerplexityBot | Your pages shown and linked in Perplexity's results | To stay out of them; Perplexity says the bot is not used for foundation model training |
Google-Extended | Google to use crawled content for Gemini training and grounding | To opt out; Google says Search inclusion and ranking are unaffected |
Applebot-Extended | Apple to train its foundation models on your content | To opt out; Apple says pages can still appear in search results |
CCBot | Your pages in Common Crawl's open dataset | To stop its crawling |
Two limits apply. Perplexity-User generally ignores robots.txt, as Perplexity states, because a user asked for the page. And AI Overviews and AI Mode are Google Search features: Google's page on AI features names the Googlebot rules as the crawl control, not Google-Extended. Each crawler's page in this library, from GPTBot to Google-Extended, has the details, and the AI crawler overview lists them company by company.
Merchant Center and Shopping: what a block breaks#
Google Merchant Center checks every product's landing page and image, and its help pages name the crawlers: Googlebot for landing pages and Googlebot-image for images.
| What robots.txt blocks | What Google's help says happens |
|---|---|
| Product pages | "Unable to check product pages": the products stay disapproved and stop showing in Shopping ads |
| Product images | "Can't access product images": the products still show at first and will be disapproved soon if the file is not changed |
| Either one | Product crawl issues: without these crawls, Google cannot show the items in listings |
A block rarely comes from a line that says Googlebot. More often a broad rule in the * group catches the image folder, or a group written for Googlebot-Image years ago is still there. The token Storebot-Google matters too: Google's crawler list says its rules affect all surfaces of Google Shopping.
Google's pages give different waiting times after a fix. The image link page says robots.txt changes may take 24 to 48 hours, the page on product pages says 24 to 72 hours, and the crawl issues page says products may take up to 48 hours to reappear. Our guide to disapproved products in Merchant Center covers the other causes.
How to test your file#
- Open it.
https://www.yourshop.com/robots.txtshould load as plain text, on every subdomain you use. - Read Google's view. The robots.txt report in Search Console shows the files Google found for up to 20 hosts, when it last fetched each one, the fetch status, the size and any lines it could not parse. You can view versions from the last 30 days and request a recrawl after a fix.
- Test single URLs. Google's help points to the URL Inspection tool to see whether one URL is blocked. Test a product page, a product image and a filtered category.
- Check Bing. Bing Webmaster Tools has a robots.txt Tester that validates the file and confirms that Bingbot can reach your key content.
- Check the AI crawlers. The AI crawler checker reads your shop's robots.txt and shows which AI crawlers may read it. The AI shopping readiness checker also looks at structured data, llms.txt and the sitemap.
The usual mistakes#
- Hiding pages with robots.txt. A crawler that may not fetch a page never sees its
noindex. Google's noindex documentation says the page must not be blocked for the rule to work. - A named group without the shared rules. Give
Googlebotorbingbotits own group and it stops reading*. Bing's Webmaster Blog made the same point in May 2012: Bingbot honors only one set of directives. - A broad Allow.
Allow: /collections/is longer thanDisallow: /*?*sort=, so/collections/jackets?sort=priceis crawled again. - A leftover
Disallow: /. A line from a test site or a relaunch blocks the whole shop. - A file that fails. A robots.txt that returns a server error can stop crawling of the whole site.
- Secrets in the file. Paths listed in robots.txt are public. Protect admin areas with a login.
- Only robots.txt. A firewall or CDN bot rule can block a crawler the file allows. OpenAI and Perplexity both recommend allowing requests from their published IP ranges.
- Changing what you cannot edit. Google notes that with a hosted site builder or CMS you may not be able to edit the file directly and get a settings page instead.
Where the file ends, the content begins: image SEO for product pages covers what image crawlers need, and GEO for online shops covers what assistants do with the pages they may read.
Where Central helps#
robots.txt decides whether a crawler or an assistant may read a product page. What it finds there is the product data. Central researches that data from your own data, the open web and verified databases, backs every value with sources you can check, and holds back what the sources do not support. It writes titles, descriptions and attributes within each channel's limits and flags texts when a fact behind them changes.
Questions
What should an online shop block in robots.txt?
Pages with nothing to find and URL sets without end: cart, checkout, account pages, internal search results, and filter and sort parameters you do not need in search. Product pages, category pages, images, CSS and JavaScript stay crawlable.
Does blocking a page in robots.txt remove it from Google?
No. Google says robots.txt is not a mechanism for keeping a page out of Google. A blocked URL can still be indexed when other pages link to it. Use noindex on a page crawlers can reach, or a password.
How do I block AI crawlers in robots.txt?
Add a group for each crawler you want to block, for example User-agent: GPTBot followed by Disallow: /. OpenAI, Anthropic, Perplexity, Google, Apple and Meta each document the names their bots listen to, and search, training and user requests have separate names.
Does blocking AI training crawlers hurt Google Search or Shopping?
Google says the Google-Extended token does not affect a site's inclusion in Google Search and is not a ranking signal. Merchant Center needs Googlebot for product pages and Googlebot-image for images, so those two must stay allowed.
Does Google follow Crawl-delay?
No. Google's documentation lists user-agent, allow, disallow and sitemap as supported fields and says other fields such as crawl-delay are not supported. Bing and Anthropic say they honor it.
Sources
- RFC 9309: Robots Exclusion ProtocolIETFchecked 23 November 2026
- How Google interprets the robots.txt specificationGoogle for Developerschecked 23 November 2026
- Introduction to robots.txtGoogle Search Centralchecked 23 November 2026
- Managing crawling of faceted navigation URLsGoogle Search Centralchecked 23 November 2026
- Block Search indexing with noindexGoogle Search Centralchecked 23 November 2026
- Google's common crawlersGoogle for Developerschecked 23 November 2026
- AI features and your websiteGoogle Search Centralchecked 23 November 2026
- How to fix: Unable to check product pagesGoogle Merchant Center Helpchecked 23 November 2026
- How to fix: Can't access product imagesGoogle Merchant Center Helpchecked 23 November 2026
- Product crawl issuesGoogle Merchant Center Helpchecked 23 November 2026
- Image link [image_link]Google Merchant Center Helpchecked 23 November 2026
- robots.txt reportGoogle Search Console Helpchecked 23 November 2026
- To crawl or not to crawl, that is BingBot's questionBing Webmaster Blogchecked 23 November 2026
- Start Using Bing Webmaster Tools to Improve Your Site VisibilityBing Webmaster Blogchecked 23 November 2026
- Overview of OpenAI CrawlersOpenAI developer docschecked 23 November 2026
- Does Anthropic crawl data from the web, and how can site owners block the crawler?Anthropic (Claude Help Center)checked 23 November 2026
- Perplexity CrawlersPerplexitychecked 23 November 2026
- About ApplebotApplechecked 23 November 2026
- CCBotCommon Crawlchecked 23 November 2026
- Meta Web CrawlersMeta for Developerschecked 23 November 2026
- ACP vs UCP vs MCP: agentic commerce protocols comparedComparisons
- Agentic commerceGlossary
- Agentic Commerce ProtocolGlossary
- Conversational commerce: the product data AI assistants ask forGuides
- Generative engine optimizationGlossary
- Generative engine optimization (GEO) for online shopsGuides
- Google-ExtendedGlossary
- How to get your products into ChatGPT Shopping with a product feedGuides
- How to get your products shown in ChatGPT: what merchants controlGuides
- llms.txtGlossary
- OAI-SearchBotGlossary
- PerplexityBotGlossary
- Universal Commerce ProtocolGlossary