Skip to main content
WooCommerce guide

llms.txt for WooCommerce Stores

By ยท Updated ยท 7 min read

What Makes llms.txt Different on WooCommerce

WooCommerce stores face a structural challenge that Shopify or static-site merchants do not: product catalogs, category archives, cart pages, and checkout flows are all dynamically generated by WordPress and WooCommerce PHP templates. An llms.txt file at the domain root still works as a static text file, but the content it points to is rendered server-side on every request, which means AI crawlers following those URLs get full HTML pages rather than clean markdown unless additional steps are taken.

The second distinct issue is URL sprawl. A mid-size WooCommerce store can generate thousands of indexable URLs โ€” product pages, variation pages, tag archives, attribute pages, coupon landing pages, and account endpoints. An llms.txt file that attempts to surface all of them becomes unwieldy. The WooCommerce-specific strategy is to be selective: surface category landing pages and cornerstone product pages, not every SKU variation or filtered URL produced by a plugin like WooCommerce Product Filters.

WordPress Permalink Conventions and File Placement

WooCommerce runs on WordPress, so the domain root maps to the WordPress installation directory โ€” typically public_html or the folder specified in the hosting control panel. The llms.txt file must be placed at that root, not inside the /wp-content/ directory or any theme folder. Accessing yourdomain.com/llms.txt should return the file directly; if it returns a 404, the most common cause is a WordPress rewrite rule intercepting the request before Apache or Nginx serves the static file.

To prevent WordPress from hijacking the llms.txt request, add a rule to the .htaccess file (Apache) or the server block (Nginx) that explicitly serves the file as static content before the WordPress index.php rewrite fires. On Apache, placing RewriteRule ^llms\.txt$ - [L] above the WordPress rewrite block resolves this. Most managed WooCommerce hosts โ€” WP Engine, Kinsta, Cloudways โ€” allow .htaccess edits via their dashboards or SSH.

WooCommerce's default permalink structure uses /product/ as the base for product pages and /product-category/ for categories. These are configurable under Settings > Permalinks. Whatever structure the store uses, the llms.txt file should reflect actual live URLs, not the WordPress default ugly permalinks (?p=123), which AI agents parse but which provide no semantic context about page content.

Plugins and Tools for WooCommerce llms.txt Generation

Several WordPress plugins generate llms.txt files, with the most relevant being those that integrate with WooCommerce post types. A plugin that only queries the 'post' and 'page' post types will miss 'product', 'product_cat', and 'product_tag' taxonomies entirely. Before installing any plugin for this purpose, confirm in its documentation or source code that it explicitly registers WooCommerce post types as part of its crawl scope.

The LLMs.txt for WordPress plugin (available in the WordPress.org repository) includes options to include custom post types, which covers WooCommerce products when 'product' is added to its inclusion list. Rank Math SEO added an llms.txt generation feature in a 2024 update; its WooCommerce schema integration means it can pull structured product data โ€” price, availability, description โ€” into the linked markdown pages it generates at /llms-full.txt. Yoast SEO does not natively generate llms.txt as of mid-2025, but Yoast's sitemap output can serve as a reference list when building llms.txt manually.

For stores with custom development resources, a lightweight WP-CLI script or a custom WordPress plugin using WP_Query against post_type 'product' and 'product_cat' gives the most control. This approach lets developers filter by stock status, exclude low-priority products, and automatically regenerate the file on a cron schedule โ€” important for catalogs that change frequently.

Handling Dynamic Content: Products, Variations, and Filtered URLs

WooCommerce variable products generate child variation posts in the database, but those variations typically share the parent product URL with query parameters or attribute selectors appended. Listing every variation URL in llms.txt adds noise without adding value for AI agents โ€” the parent product page already contains the full attribute matrix. The correct approach is to list only the canonical parent product URL in llms.txt and ensure the product page itself uses structured data (WooCommerce outputs Product schema by default) to describe the variations.

Filtered catalog URLs produced by plugins like YITH WooCommerce Ajax Product Filter or FacetWP generate URLs such as /shop/?pa_color=red&pa_size=large. These URLs should be excluded from llms.txt. They are transient, session-specific in some configurations, and rarely represent standalone content worth directing an AI agent toward. The /shop/ base URL and individual category pages (/product-category/mens-shoes/) are the correct entries.

WooCommerce also generates account pages (/my-account/), cart (/cart/), and checkout (/checkout/) URLs. These pages require authentication or contain no indexable product information and must be omitted from llms.txt. Including them risks an AI agent attempting to crawl authenticated endpoints and receiving error pages or redirect loops.

Markdown Companion Pages for WooCommerce Catalog Content

The llms.txt specification encourages linking to markdown-formatted versions of pages via an llms-full.txt file. For WooCommerce, this means creating clean markdown representations of product descriptions, category copy, and buying guides. WordPress does not natively serve markdown; a plugin must either generate static .md files or return markdown-formatted content at a dedicated endpoint. The Rank Math implementation creates an llms-full.txt that aggregates page content in plain text, which approximates this goal.

A practical WooCommerce-specific pattern is to create a dedicated WordPress page for each major product category that contains editorial content โ€” buying guide text, comparison tables, expert recommendations โ€” beyond the default WooCommerce category archive. That page gets a clean URL (/guides/running-shoes/), is listed in llms.txt, and contains content an AI agent can actually extract and summarize. This separates machine-readable editorial content from the dynamic product grid that WooCommerce archives generate.

Actionable Setup Sequence for WooCommerce Store Owners

Start by auditing the store's URL structure: identify the five to twenty category pages and ten to fifty product pages that represent the store's core catalog and highest commercial intent. These become the primary entries in llms.txt. Exclude variation URLs, filtered archive URLs, account pages, and any URL behind a login wall. Use a crawl tool like Screaming Frog with WooCommerce logged out to see the URL set an unauthenticated agent encounters.

Install a plugin that supports WooCommerce post types or write a WP-CLI script to generate the file. Place the file at the WordPress root directory and add a .htaccess or Nginx rule to serve it as a static file before WordPress rewrites intercept the request. Verify the file is accessible at yourdomain.com/llms.txt with a browser and confirm no WordPress login redirect occurs. Set a monthly review cadence โ€” or a cron-triggered regeneration โ€” to keep the file current as the catalog changes.

After deployment, test by querying AI assistants with questions directly related to the store's product categories and brand. If the llms.txt is being processed, AI-generated answers citing the store's content should begin to reflect the editorial framing from the linked pages rather than generic category descriptions. This is the clearest signal that the file is doing its job within WooCommerce's dynamic architecture.

Frequently asked questions

Does WooCommerce automatically create an llms.txt file?

No. WooCommerce and WordPress core do not generate llms.txt files by default. Store owners must either install a compatible plugin โ€” such as the LLMs.txt for WordPress plugin with WooCommerce post types enabled, or Rank Math SEO โ€” or create and place the file manually at the WordPress root directory.

Why does my llms.txt return a 404 on my WooCommerce site even though the file exists?

WordPress rewrites intercept most requests before Apache or Nginx serves static files. Add a rewrite exception in .htaccess โ€” RewriteRule ^llms\.txt$ - [L] โ€” placed above the WordPress rewrite block. On Nginx-based hosts, add a location block that serves the file directly. This prevents WordPress from treating llms.txt as an unknown route and returning a 404.

Should WooCommerce product variation URLs be included in llms.txt?

No. Variable product variations share the parent product's canonical URL. Listing variation-specific URLs or query-string filtered URLs adds noise without additional value for AI agents. Include only the canonical parent product URL and ensure the product page contains complete structured data describing all available variations.

How often should a WooCommerce store update its llms.txt file?

Update the file whenever major catalog changes occur: new category pages added, cornerstone products discontinued, or site structure reorganized. For active stores, a monthly automated regeneration via WP-Cron or a deployment hook is sufficient. Stores with stable catalogs can review quarterly. Outdated URLs in llms.txt that return 404s actively degrade the file's usefulness.

Is llms.txt more important for WooCommerce stores than for Shopify stores?

WooCommerce stores benefit more from deliberate llms.txt implementation because WordPress's dynamic URL generation and plugin ecosystem create more indexable noise โ€” filtered archives, variation URLs, account endpoints โ€” that AI crawlers otherwise have to parse unsorted. Shopify's more constrained URL structure means its stores produce less ambiguous signal without an llms.txt, though the file remains useful on both platforms.

MG
Written by

Matt is the founder of RunOctopus. He built All Angles Creatures from zero to page-1 rankings in reptile feeder insects in under 60 days using exactly this method โ€” turning a hard, entrenched niche into RunOctopus's proof store for programmatic SEO and AI search citation.

Connect on LinkedIn →

See what Otto would build for your store

Free architecture preview. No card required. Five minutes.

Generate Preview →