Skip to content
Technical SEO 9 min read By Lewis Jones Editorial policy

WooCommerce robots.txt: What to Block and Keep

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.

Part of Technical SEO Guide: Crawl, Index, Speed

In short

  • 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.

What a WooCommerce store's robots.txt contains

The robots.txt a WooCommerce store generates

No file on disk: WordPress builds it on each request, and WooCommerce and the SEO plugin add their lines.

User-agent: *

WordPress. The rules below apply to every crawler.

Disallow: /wp-content/uploads/wc-logs/

WooCommerce 9.2+. Its log folder.

Disallow: /wp-content/uploads/woocommerce_transient_files/

WooCommerce 9.2+. Temporary export files.

Disallow: /wp-content/uploads/woocommerce_uploads/

WooCommerce 9.2+. Downloadable product files.

Disallow: /*?add-to-cart=

WooCommerce 10.3+. Add to cart links, so crawlers do not fill carts.

Disallow: /*?*add-to-cart=

WooCommerce 10.3+. The same, when another parameter comes first.

Disallow: /wp-admin/

WordPress. The dashboard.

Allow: /wp-admin/admin-ajax.php

WordPress. Kept open because themes load content through it.

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

SEO plugin (Yoast, Rank Math), or WordPress's own wp-sitemap.xml.

A robots.txt file uploaded to the site root replaces all of this, WooCommerce's lines included.

Three sources write this file, and none of them is a file on the server.

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

What 71 WooCommerce stores' robots.txt files said

Read from 73 UK WooCommerce stores on 21 November 2026; 71 served a robots.txt file.

48 of 71

served the file WordPress generates, with WooCommerce 10.3's add-to-cart lines

4 of 23

other files blocked add-to-cart links; the other 19 left them open

11 of 71

named no sitemap

4 of 71

blocked the cart, checkout or account pages, hiding WooCommerce's noindex from crawlers

1 of 71

had one rule, Disallow: /shop/, which shut crawlers out of its main product listing

5 of 71

set a Crawl-delay, which Google ignores

Most stores that changed the file lost a rule WooCommerce would have written for them.

We took the 73 UK WooCommerce stores from our 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

What to block in a WooCommerce robots.txt

Block URLs that waste crawling. Never block a page you want search engines to read a tag on.

URLSBLOCK?WHY
?add-to-cart=YESEach link fills a cart. WooCommerce 10.3+ blocks it in the generated file; add it yourself to an uploaded one.
/wp-admin/YESWordPress's default, with admin-ajax.php allowed.
Internal search ?s=YESEndless result pages with nothing to rank.
Sorting and filters ?orderby= ?filter_LARGE SHOPSThe canonical tag already points them at the category. Blocking saves crawl requests once the catalogue runs to thousands of products.
Cart, checkout, My accountNOWooCommerce marks them noindex. A blocked page cannot be fetched, so the noindex is never read.
/wp-content/ CSS and JavaScriptNOGoogle renders the page with them. Block them and it sees a broken layout.
/shop/ /product/ /product-category/NOThese are the pages that should rank.
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.

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 shows how these URLs multiply, and 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 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 explains what Search Console shows when that happens.

How to edit robots.txt on WooCommerce

Where to edit a WooCommerce store's robots.txt

Each route changes what the store serves at /robots.txt in a different way.

ROUTEWHEREWHAT HAPPENS TO WOOCOMMERCE'S LINES
Yoast SEOYoast SEO, Tools, File editorWrites a real robots.txt file to the site root, which replaces the generated one. Copy WooCommerce's lines in.
Rank MathRank Math SEO, General Settings, Edit robots.txtReplaces the generated text with yours. Copy WooCommerce's lines in. Locked if a real file already exists.
All in One SEOAll in One SEO, Tools, Robots.txt EditorChanges the file WordPress generates. Open /robots.txt afterwards and check WooCommerce's lines are still there.
A file in the site rootYour host's file manager or SFTPThe server sends this file and WordPress never builds one. WooCommerce's lines are gone unless you add them.
Two of the four routes drop WooCommerce's rules unless you copy them in.
  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 drafts rules for other crawlers, and the 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 or blocked by robots.txt over the following weeks.

How Crawl Cove reads a WooCommerce robots.txt

What a crawl reports from a WooCommerce robots.txt

The crawl obeys the file by default and reads it as part of the audit.

FINDINGSEVERITYON A WOOCOMMERCE STORE IT USUALLY MEANS
robots.txt blocks search enginesCRITICALA Disallow: / for every crawler, often a staging file uploaded at launch.
AI search crawler blockedMEDIUMA security or CDN setting that shut out crawlers such as OAI-SearchBot or PerplexityBot.
Sitemap named but missingMEDIUMA Sitemap line left over from an SEO plugin you removed.
Sitemap not named in robots.txtLOWAn uploaded file with no Sitemap line, as on 11 of the 71 stores.
The critical one is rare and costly: a launch-day file that still tells every crawler to stay away.

Crawl Cove 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, Wix, Squarespace and Webflow.

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.

Frequently asked questions

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.

Audit your site the easy way

Crawl Cove finds these issues on your machine. Try the SEO Crawler or see every feature.

Download free