WooCommerce AI readiness: llms.txt, robots.txt and schema
In short
WooCommerce runs on WordPress, which generates a virtual robots.txt and a /wp-sitemap.xml for you. WooCommerce adds Product JSON-LD with price, availability and GTIN, but no brand. Neither WordPress nor WooCommerce documents an llms.txt feature, so you add it yourself.
robots.txt
Built inYes. WordPress builds robots.txt on the fly with do_robots() and passes it through the robots_txt filter, so a few lines of PHP in a small plugin can add rules. Since WordPress 5.5 the file also lists the core sitemap.
How to do it
Look at the generated file
Open
https://your-store.com/robots.txt. The default starts withUser-agent: *and disallows the admin area while allowingadmin-ajax.php.Append rules with the robots_txt filter
Add this to a small site plugin (or a code-snippets plugin) rather than the theme, so theme updates do not remove it.
wp-content/plugins/ai-robots/ai-robots.php<?php /* Plugin Name: AI robots rules */ add_filter( 'robots_txt', function ( $output, $public ) { $output .= "\nUser-agent: CCBot\nDisallow: /\n"; return $output; }, 10, 2 );
Limits and notes
SEO plugins often expose a robots.txt editor that uses the same filter. Use one place only.
If your host serves a physical
robots.txtfile from the web root, that file is what crawlers get; check the live URL with Citeto.
llms.txt
WorkaroundNot built in. Neither WordPress core nor WooCommerce documents an llms.txt feature. On a self-hosted store you can serve one with the WordPress Rewrite API, or upload a static file if your host gives you access to the web root.
How to do it
Write the file content
Follow the llms.txt format: an H1 with the store name, a one-line summary in a blockquote, then sections of links to your key category, policy and help pages. See the generic guide for a template.
Serve it at /llms.txt with a rewrite rule
Register a rewrite rule and a query var, then print plain text on
template_redirect. After activating the plugin, visit Settings > Permalinks and save once to flush rewrite rules.wp-content/plugins/llms-txt/llms-txt.php<?php /* Plugin Name: llms.txt */ add_action( 'init', function () { add_rewrite_rule( '^llms\.txt$', 'index.php?llms_txt=1', 'top' ); } ); add_filter( 'query_vars', function ( $vars ) { $vars[] = 'llms_txt'; return $vars; } ); add_action( 'template_redirect', function () { if ( ! get_query_var( 'llms_txt' ) ) { return; } header( 'Content-Type: text/plain; charset=utf-8' ); echo "# Your Store\n\n> What you sell and who it is for.\n\n## Shop\n\n- [Best sellers](https://your-store.com/shop/): Top products\n"; exit; } );
Limits and notes
Some SEO plugins offer an llms.txt generator. That is plugin behaviour, not WordPress or WooCommerce, so check the live file.
Organization schema
LimitedPartly. Current WooCommerce code outputs an OnlineStore node (a schema.org Organization subtype) with your return policy on product pages and the refund policy page, and WebSite with a search action on the shop front page. A full Organization block with logo and sameAs on the homepage is not part of core.
How to do it
Check the homepage first
Your SEO plugin or theme may already print Organization markup. Run Citeto on the homepage before adding anything.
Add Organization JSON-LD on the front page
If nothing is there, print one block from
wp_headon the front page only.wp-content/plugins/org-schema/org-schema.php<?php /* Plugin Name: Organization schema */ add_action( 'wp_head', function () { if ( ! is_front_page() ) { return; } $data = array( '@context' => 'https://schema.org', '@type' => 'Organization', 'name' => get_bloginfo( 'name' ), 'url' => home_url( '/' ), 'logo' => 'https://your-store.com/wp-content/uploads/logo.png', 'sameAs' => array( 'https://www.instagram.com/your-brand' ), ); echo '<script type="application/ld+json">' . wp_json_encode( $data ) . '</script>'; } );
Limits and notes
The
OnlineStoreoutput is in the current WooCommerce source; older versions may not print it. Check your live pages.
Product schema
Built inYes. WooCommerce prints Product JSON-LD on single product pages: name, URL, description, image, SKU, gtin (when valid), MPN, and an Offer (or AggregateOffer for variable products) with price, currency, availability and seller. The core markup does not set brand or shippingDetails.
How to do it
Fill the GTIN field
Since WooCommerce 9.2 the product editor has a GTIN, UPC, EAN or ISBN field (
global_unique_id). Fill it per product or per variation; core only outputsgtinwhen the value passes validation.Add brand with the product filter
Extend the markup with
woocommerce_structured_data_productinstead of printing a second Product block.wp-content/plugins/product-brand/product-brand.php<?php /* Plugin Name: Product brand in schema */ add_filter( 'woocommerce_structured_data_product', function ( $markup, $product ) { $markup['brand'] = array( '@type' => 'Brand', 'name' => 'Your Brand' ); return $markup; }, 10, 2 );Verify on a live product page
Run Citeto or Google’s Rich Results Test on one simple and one variable product.
Limits and notes
Some SEO plugins replace WooCommerce’s markup with their own. Keep one Product block per page.
XML sitemap
Built inYes. Since WordPress 5.5, core serves a sitemap index at /wp-sitemap.xml covering public post types (including products), taxonomies, author archives and the homepage, and lists it in robots.txt.
How to do it
Open the sitemap index
Visit
https://your-store.com/wp-sitemap.xml. If an SEO plugin is active it may replace it with its own sitemap at a different URL.Keep search engine visibility on
If Settings > Reading > Discourage search engines is ticked, WordPress disables the core sitemap.
Limits and notes
Remove post types you do not want listed with the
wp_sitemaps_post_typesfilter.
AI crawler access
Not documentedNot documented. WordPress and WooCommerce have no setting that blocks AI crawlers as a group; you write rules with the robots_txt filter. Your host or CDN may block bots on its own, which neither WordPress nor WooCommerce documents.
How to do it
Write per-crawler rules
Use the
robots_txtfilter from the robots.txt section. Allow search and answer crawlers you want to be cited by; block training crawlers only if that is your policy.Test from outside
Firewalls at the host can return 403 to AI user agents even when
robots.txtallows them. Citeto fetches your site the way a crawler does and shows the result.
FAQ
Yes. Core WooCommerce prints Product JSON-LD with price, currency, availability, SKU and a valid GTIN. It does not add brand; add it with the woocommerce_structured_data_product filter.
WordPress core serves it at /wp-sitemap.xml since version 5.5. SEO plugins may replace it with their own sitemap at another URL.
Yes, but not natively. Serve it with a small plugin that uses the WordPress Rewrite API, or upload a static file to the web root if your host allows it.
Based on official WooCommerce documentation checked on November 16, 2026. Platforms change often: run the free check to see what your live site actually serves.