# WooCommerce robots.txt: What to Block and Keep

Source: https://crawlcove.com/blog/woocommerce-robots-txt
Published 2026-11-21 · By Lewis Jones

> What a WooCommerce robots.txt contains by default, what 71 live UK stores served, what to block, and how to edit it without losing WooCommerce's rules.

## Key takeaways
- A WooCommerce store has no robots.txt file unless someone uploads one; WordPress generates it on each request and WooCommerce adds its own rules, including two that block add-to-cart links since WooCommerce 10.3
- On 71 live UK WooCommerce stores on 21 November 2026, 48 served that generated file and 23 served something else, and only 4 of those 23 still blocked add-to-cart links
- 4 stores blocked their cart, checkout or account pages, which hides the noindex WooCommerce puts on them, and 11 named no sitemap
- Block add-to-cart links, internal search and the dashboard; leave the cart, checkout, CSS, JavaScript and every product and category page open
- An uploaded file or an SEO plugin's editor replaces the generated text, so copy WooCommerce's lines into it

A WooCommerce robots.txt is the file at `/robots.txt` that tells crawlers which parts of a store to skip. Most WooCommerce stores never upload one. WordPress generates it on each request, and WooCommerce adds its own rules, including two that block add-to-cart links since version 10.3. We read the robots.txt of 73 UK WooCommerce stores on 21 November 2026: 71 served one, 48 of them the generated file, and the other 23 had mostly lost WooCommerce's rules on the way.

This post covers what the generated file contains, what those stores served, what to block and what to leave open, and how to edit the file without losing WooCommerce's lines. For the rest of a store audit, see the [WooCommerce SEO audit](https://crawlcove.com/blog/woocommerce-seo-audit).

## What a WooCommerce store's robots.txt contains

**Figure:**
src: /media/blog/woocommerce-robots-txt/generated.webp
alt: The robots.txt a WooCommerce store generates, line by line: User-agent star from WordPress; Disallow for the wc-logs, woocommerce_transient_files and woocommerce_uploads folders from WooCommerce 9.2 onwards; Disallow for ?add-to-cart= in two forms from WooCommerce 10.3 onwards; Disallow /wp-admin/ and Allow /wp-admin/admin-ajax.php from WordPress; and a Sitemap line from the SEO plugin or WordPress's own wp-sitemap.xml
label: The generated file
inline: html
caption: Three sources write this file, and none of them is a file on the server.
aspect: 1400/598

There is no robots.txt in a fresh WordPress install. When a crawler asks for `/robots.txt`, WordPress builds the answer:

- **WordPress** writes `User-agent: *`, blocks `/wp-admin/` and allows `/wp-admin/admin-ajax.php`, which themes and plugins use to load content.
- **WooCommerce** adds three of its folders under `/wp-content/uploads/` (logs, temporary export files and downloadable product files), and since version 10.3 two rules for `?add-to-cart=`. The "Add to cart" button on a simple product in a grid is a link with that parameter, and a crawler following those links fills carts and wastes requests.
- **The SEO plugin** adds a `Sitemap:` line. Yoast SEO and Rank Math point it at `sitemap_index.xml`; with no SEO plugin, WordPress points it at `wp-sitemap.xml`.

Yoast SEO also appends its own block, starting with a second `User-agent: *` and an empty `Disallow:`. That looks as if it cancels the rules above it, but Google combines every group that names the same crawler, so WooCommerce's rules still apply.

## What 71 live stores' files said

**Figure:**
src: /media/blog/woocommerce-robots-txt/sample.webp
alt: Robots.txt files of 71 UK WooCommerce stores on 21 November 2026: 48 served the file WordPress generates with WooCommerce 10.3's add-to-cart lines; 4 of the other 23 blocked add-to-cart links and 19 left them open; 11 named no sitemap; 4 blocked the cart, checkout or account pages; 1 had a single rule, Disallow /shop/; 5 set a Crawl-delay
label: 71 stores
inline: html
caption: Most stores that changed the file lost a rule WooCommerce would have written for them.
aspect: 1400/432

We took the 73 UK WooCommerce stores from our [WooCommerce image alt text](https://crawlcove.com/blog/woocommerce-image-alt-text) study and requested `/robots.txt` from each. 71 answered with a file.

- **48 served the generated file** with WooCommerce's current lines, so their add-to-cart links were blocked without anyone touching anything.
- **23 served something else:** a file uploaded to the server, a version rewritten by an SEO plugin, or the output of an older WooCommerce. Only 4 of them blocked add-to-cart links. Six had only WordPress's two default lines, and three were a single `Disallow:` with nothing after it, which allows everything.
- **11 named no sitemap,** so crawlers have to find it another way.
- **4 blocked the cart, checkout or account pages.** That stops crawlers reading the noindex WooCommerce puts on those pages, which is the opposite of what the rule was meant to do.
- **1 had a single rule, `Disallow: /shop/`,** which keeps crawlers off the store's main product listing. Its products, at `/product/`, were not blocked.
- **5 set a Crawl-delay,** which Google ignores. Bing reads it.

Six stores shut named bots out completely, with `Disallow: /` under their user agent, mostly SEO tool crawlers such as AhrefsBot and AI crawlers. None did that to Googlebot or Bingbot.

## What to block and what to leave open

**Figure:**
src: /media/blog/woocommerce-robots-txt/what-to-block.webp
alt: Table of what to block in a WooCommerce robots.txt: add-to-cart links yes, WooCommerce 10.3 does it in the generated file; /wp-admin/ yes, WordPress's default; internal search ?s= yes; sorting and filters ?orderby= and ?filter_ only on large shops, since the canonical tag already handles ranking; cart, checkout and My account no, because the noindex must be read; /wp-content/ CSS and JavaScript no, Google renders with them; /shop/, /product/ and /product-category/ no, these should rank
label: Block or keep
inline: html
caption: A robots.txt rule saves crawl requests. It does not remove a page from Google, and it can stop Google reading the tag that would.
aspect: 1400/729

**Block add-to-cart links, internal search and the dashboard.** None of them has anything to rank, and on a store with a product grid on every category page, add-to-cart links can outnumber the real pages.

**Block sorting and filters only on a big catalogue.** `?orderby=`, `?min_price=` and `?filter_` URLs repeat a category in a different order or a smaller selection. An SEO plugin's canonical tag already points them at the category, so they do not compete in search. They do cost crawl requests, which starts to matter once a store has thousands of products. [WooCommerce duplicate content](https://crawlcove.com/blog/woocommerce-duplicate-content) shows how these URLs multiply, and [crawl budget explained](https://crawlcove.com/blog/crawl-budget-explained) covers when the requests matter.

**Leave the cart, checkout and My account open.** WooCommerce already marks them `noindex`. If robots.txt blocks them, Google cannot fetch the page to read that tag, and a page that something links to can be indexed by its address alone. [WooCommerce cart and checkout noindex](https://crawlcove.com/blog/woocommerce-cart-checkout-noindex) covers the rest of those pages.

**Never block CSS, JavaScript, or the shop itself.** Google renders each page with its stylesheets and scripts, so blocking `/wp-content/` or `/wp-includes/` makes the store look broken to it. Blocking `/shop/`, `/product/` or `/product-category/` hides the pages you want in search; [blocked by robots.txt](https://crawlcove.com/blog/blocked-by-robots-txt) explains what Search Console shows when that happens.

## How to edit robots.txt on WooCommerce

**Figure:**
src: /media/blog/woocommerce-robots-txt/edit.webp
alt: Where to edit a WooCommerce robots.txt and what happens to WooCommerce's lines: Yoast SEO, Tools, File editor writes a real file that replaces the generated one; Rank Math, General Settings, Edit robots.txt replaces the generated text and is locked if a real file exists; All in One SEO, Tools, Robots.txt Editor changes the generated file, so check the result; a file uploaded to the site root is sent instead and WordPress never builds one
label: Where to edit
inline: html
caption: Two of the four routes drop WooCommerce's rules unless you copy them in.
aspect: 1400/558

1. **Open the current file.** Visit `/robots.txt` on the live store and copy everything in it. That is your starting point, WooCommerce's lines included.
2. **Pick one place to edit.** Use your SEO plugin's editor, or upload a file to the site root with your host's file manager. Not both: an uploaded file wins, and Rank Math locks its editor when one exists.
3. **Keep WooCommerce's lines.** Yoast's File editor and an uploaded file replace the generated text, so the add-to-cart rules only survive if you paste them in.
4. **Add your rules and the sitemap.** A file for a typical store looks like this:

```
User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php
Disallow: /wp-content/uploads/wc-logs/
Disallow: /wp-content/uploads/woocommerce_transient_files/
Disallow: /wp-content/uploads/woocommerce_uploads/
Disallow: /*?add-to-cart=
Disallow: /*?*add-to-cart=
Disallow: /*?s=
Disallow: /search/

Sitemap: https://www.example.co.uk/sitemap_index.xml
```

Swap the sitemap address for your own. The free [robots.txt generator](https://crawlcove.com/tools/robots-txt-generator) drafts rules for other crawlers, and the [AI crawler access checker](https://crawlcove.com/tools/ai-crawler-access-checker) shows which AI crawlers your current file lets in.

## How to test your changes

- **Read the live file.** Open `/robots.txt` in a private window. If you still see the old rules, a caching plugin or the host's cache is serving a saved copy; clear it.
- **Check it in Search Console.** The robots.txt report under Settings shows the version Google last fetched and any lines it could not parse, and lets you ask Google to fetch it again.
- **Test the URLs that matter.** URL Inspection on a product, a category and the shop page should say crawling is allowed. On an add-to-cart link it should say blocked.
- **Watch the Page indexing report.** A rule that catches too much shows up as pages under [indexed, though blocked by robots.txt](https://crawlcove.com/blog/indexed-though-blocked-by-robots-txt) or blocked by robots.txt over the following weeks.

## How Crawl Cove reads a WooCommerce robots.txt

**Figure:**
src: /media/blog/woocommerce-robots-txt/crawl-checks.webp
alt: Table of robots.txt findings on a WooCommerce store: robots.txt blocks search engines is critical, often a staging file uploaded at launch; AI search crawler blocked is medium, a security or CDN setting; sitemap named but missing is medium, a line left from a removed SEO plugin; sitemap not named in robots.txt is low, an uploaded file with no Sitemap line as on 11 of 71 stores
label: What a crawl reports
inline: html
caption: The critical one is rare and costly: a launch-day file that still tells every crawler to stay away.
aspect: 1400/479

[Crawl Cove](https://crawlcove.com/ecommerce-seo-crawler) obeys robots.txt by default, counts the URLs it skipped in the crawl summary, and reads the file as part of the audit. A group that blocks Googlebot or Bingbot from the whole site is a critical finding. Blocked AI search crawlers are medium, and blocked AI training crawlers are reported for information only, because blocking those is often deliberate. A missing Sitemap line is low, and one that names a sitemap that does not exist is medium. A per-crawl option ignores robots.txt, so you can check the blocked pages themselves before you keep a rule. The same post exists for [Shopify](https://crawlcove.com/blog/shopify-robots-txt), [Wix](https://crawlcove.com/blog/wix-robots-txt), [Squarespace](https://crawlcove.com/blog/squarespace-robots-txt) and [Webflow](https://crawlcove.com/blog/webflow-robots-txt).

## How we checked

On 21 November 2026 we requested `/robots.txt` from the 73 UK WooCommerce stores in our product sample (shops in OpenStreetMap in Bristol, Manchester, Leeds and Edinburgh that answered WooCommerce's public Store API with products), with an honest crawler user agent. 71 returned a robots.txt; one returned an HTML page and one a 404. A file counted as generated when it had WordPress's default lines and WooCommerce's upload-folder lines together. What WordPress, WooCommerce and Yoast SEO write was read from their source and from the live files: WooCommerce added the upload folders in 9.2 and the add-to-cart rules in 10.3. Stores are not named.

## FAQ

### Does WooCommerce have a robots.txt file?
Not as a file. WordPress builds robots.txt when it is requested, and WooCommerce adds rules to it: its upload folders, and since WooCommerce 10.3 two rules that block add-to-cart links. If someone uploads a robots.txt file to the site root, the server sends that file instead and none of the generated rules apply.

### What should I block in robots.txt for WooCommerce?
Add-to-cart links, internal search results and the WordPress dashboard. On a catalogue of thousands of products you can also block sorting and filter parameters. Do not block the cart, checkout or My account pages, CSS or JavaScript, or any shop, product or category page.

### Should I block the cart and checkout pages in robots.txt?
No. WooCommerce marks them noindex, and a crawler can only read that tag on a page it is allowed to fetch. A blocked cart page that something links to can still be indexed by its address.

### How do I edit robots.txt in WooCommerce?
Through your SEO plugin: in Yoast SEO under Tools, File editor; in Rank Math under General Settings, Edit robots.txt; in All in One SEO under Tools, Robots.txt Editor. Or upload a robots.txt file to the site root. Yoast's editor and an uploaded file replace the generated rules, so copy WooCommerce's lines into them.

### Does Google follow Crawl-delay in robots.txt?
No. Google ignores the Crawl-delay line. Bing reads it. If Googlebot crawls too fast, the server's response time and errors are what slow it down.
