WooCommerce stores run on WordPress, and WordPress creates robots.txt on the fly rather than storing it as a file. That setup gives you two possible places to make your edit, and only one of them wins. Knowing which one is in charge on your site saves you from the most common frustration on this platform: saving changes that never appear.
Platform screens change over time. If a menu name in this guide does not match what you see, check the vendor docs linked in Sources for the current path.
Two versions, one winner
WordPress can generate a virtual robots.txt for you. Separately, a real file can sit in your site's root folder, usually called public_html. When both exist, the real file in the root folder wins outright, and anything you type into a plugin editor is ignored.
That is why the first move on WooCommerce is detective work, not editing. Before you touch a plugin, look in the root folder for a file named robots.txt. Many stores carry a leftover one from a migration or an earlier redesign, long forgotten.
WordPress on its own blocks very little: only the admin and includes folders. WooCommerce itself adds no crawler rules. Cart, checkout, and account pages are kept out of search results by other means, not by this file. So the AI crawler groups you add here are purely extra. You are welcoming crawlers that were never blocked, and making that welcome explicit.
One more thing to settle before you edit. Yoast SEO and Rank Math each have their own file editor, and each writes the file in its own way. Figure out which plugin actually controls your site, then use that one editor only.
The steps
First, look at the live file. Open yourdomain.com/robots.txt in a browser, using your real domain. Notice whether the rules look like standard WordPress output or something custom. That tells you a lot about what you are starting from.
Second, hunt for a real file. Open your hosting file manager or connect over FTP and check the site root, usually public_html, for robots.txt. If you find one, that file is the boss. Either edit it directly, or delete it so the virtual file and your plugin editor can take over.
Third, if no real file exists, open your SEO plugin editor. With Yoast SEO, go to SEO in the WordPress dashboard, then Tools, then File editor. If no file exists yet, Yoast will offer to create one. Change the rules and click Save changes to robots.txt. With Rank Math, go to Rank Math, then General Settings, then Edit robots.txt, make your changes, and save.
Fourth, add the AI crawler groups high in the file, ahead of any broad block rules:
User-agent: OAI-SearchBot
Allow: /
User-agent: ChatGPT-User
Allow: /
User-agent: Claude-SearchBot
Allow: /
User-agent: Claude-User
Allow: /
User-agent: PerplexityBot
Allow: /
User-agent: meta-webindexer
Allow: /
User-agent: bingbot
Allow: /
One limit to know: ChatGPT-User only shows up when a person asks ChatGPT to look at a page. Your allow line gives it permission, but it cannot steer a fetcher that pays no attention to robots.txt.
While you are in there, keep the standard WordPress blocks on the admin and includes folders. And do not block the content folder wholesale. Crawlers need the stylesheets and scripts stored there to render your product pages properly.
Save the file, then reload yourdomain.com/robots.txt. Your new groups should appear near the top.
The leftover file story
Imagine a shop selling garden tools on WooCommerce, with Yoast installed. The owner adds the AI crawler groups in Yoast, saves, and reloads the file URL. Nothing has changed. The old rules are still there. The editor is not broken. A stale robots.txt from a past migration is still sitting in public_html, quietly overriding everything Yoast writes. Once that leftover file is deleted, the plugin version takes over and the new rules appear at once.
On WooCommerce, always inspect the root folder before you conclude the editor is at fault.
The file alone is not the whole story
Robots.txt states what you intend. It cannot force a result. If a security plugin or your hosting firewall stops an AI crawler before it reads the file, your allow rules never get a chance to matter. Checking that outer layer, and keeping an eye on it over time, sits outside this edit.
Frequently Asked Questions
I saved new rules in my SEO plugin, but the live file did not change. Why?
A real robots.txt in your site root is the most likely cause. It overrides the virtual file completely. Check public_html, and either edit that file or delete it so the plugin can take over.
Should I block the content folder to keep things tidy?
No. Blocking it wholesale stops crawlers from reaching the stylesheets and scripts they need to render your product pages. Leave it open.
Does it matter whether I use Yoast or Rank Math?
Only in the sense that you should use the one that controls your site. Each plugin has its own editor and writes the file its own way, so pick the authoritative one and stick with it.
Do I need to block cart and checkout pages in this file?
No. WooCommerce adds no rules of its own for those pages, and they are kept out of search results through other means, not through robots.txt.
Verified Sources & Technical Documentation
- WooCommerce documentation, core products General Docs https://woocommerce.com/documentation/woocommerce/core-products/
- Yoast help, editing robots.txt through Yoast SEO General Docs https://yoast.com/help/how-to-edit-robots-txt-through-yoast-seo/
- Rank Math knowledge base, blocking web crawlers General Docs https://rankmath.com/kb/how-to-block-web-crawlers/
- WordPress developer docs, robots_txt hook General Docs https://developer.wordpress.org/reference/hooks/robots_txt/
links marked specific point to the page that supports the claim in this guide. Links marked general docs point to the vendor's general docs section for that topic, not to a page that proves every step. Check the vendor docs for the current path before relying on a menu name or click path in this guide.