How to fix seo variant urls in sitemap on WooCommerce
Remove product variant URLs (e.g. ?variant=, ?sku=) from your XML sitemap so only the canonical product page URL is submitted to Google.
Steps for WooCommerce
- If you use Yoast SEO: Go to WordPress Admin → SEO → General → Features → enable XML Sitemaps, then go to SEO → Search Appearance → Taxonomies and ensure product attribute pages (pa_color, pa_size, etc.) are set to 'noindex' so their URLs don't leak into the sitemap.
- Go to SEO → Tools → Bulk editor or SEO → XML Sitemaps → check the sitemap for any ?attribute_pa_* or ?variation_id= URLs and confirm they are excluded. Yoast excludes query-string URLs from its sitemaps by default — if they appear, a custom filter is overriding this.
- If you use Rank Math: Go to Rank Math → Sitemap Settings → Products → ensure 'Include Product Variations' is toggled OFF.
- If you use All in One SEO (AIOSEO): Go to All in One SEO → Sitemaps → Additional Pages — remove any manually added variant URLs.
- Add a canonical tag to variation pages: WooCommerce renders variation state via JavaScript without changing the URL in most themes, but if your theme or a plugin generates unique URLs for variations, use a snippet in functions.php or a plugin like Rank Math to enforce the canonical pointing to the parent product URL.
- Regenerate the sitemap (Yoast: deactivate/reactivate XML Sitemaps toggle; Rank Math: flush sitemap cache in Rank Math → Status & Tools → Database Tools) and resubmit in Google Search Console.
<link rel="canonical" href="https://www.yourstore.com/products/blue-t-shirt" />What is seo variant urls in sitemap?
When shoppers choose a color, size, or other option on a product page, many ecommerce platforms generate a new URL with a query parameter — for example, `/products/blue-t-shirt?variant=12345`. These variant URLs display the same product page with slightly different state; they are not separate, standalone pages. An XML sitemap is a file you submit to Google that lists the pages you want indexed. If variant URLs appear in that sitemap alongside the main product URL, you are effectively telling Google that each variant is its own unique page — which it isn't.
Submitting variant URLs in your sitemap wastes Google's crawl budget — the limited time Googlebot spends on your site — on duplicate or near-duplicate content instead of discovering and re-indexing your real product and category pages. It signals to Google that you may have a thin-content or duplicate-content problem, which can suppress your organic rankings. Google may also split ranking signals (links, engagement data) across the variant URLs instead of concentrating them on the single canonical product URL, weakening your page authority. Cleaning this up focuses all SEO value on one authoritative URL per product and keeps your sitemap lean and trustworthy in Google's eyes.
See the complete Seo variant urls in sitemap guide for every platform and the full background.
Not sure if your WooCommerce store has this?
Run a free SEOLZ audit — we’ll find seo variant urls in sitemap and every other issue across your whole site.
Scan my site free