Free SEO audit for new clients — claim yours
Home/Blog/Ecommerce/Product Variants and SEO: Colors, Sizes and URLs…
Ecommerce

Product Variants and SEO: Colors, Sizes and URLs Done Right

Product Variants and SEO: Colors, Sizes and URLs Done Right
Table of contents
  1. Key Takeaways
  2. Why Product Variants Are an SEO Problem
  3. Choosing a URL Strategy for Variants
  4. Canonical Tags for Variants
  5. Product Variant Structured Data
  6. How to Set Up Product Variants for SEO: Step by Step
  7. On-Page Details That Help Variant Pages
  8. Common Product Variant SEO Mistakes
  9. Related Guides
  10. Frequently Asked Questions
    1. Should each product variant have its own URL?
    2. Can I use URL fragments like #color=red for variants?
    3. What is ProductGroup structured data?
    4. Should colour variants be separate pages?
    5. How do variants affect Google Shopping?
  11. Conclusion
  12. References

A single T-shirt sold in six colours and five sizes is 30 product variants. Multiply that across a catalogue and variants become one of the biggest technical SEO decisions an online store makes. Handle them badly and you either flood Google with near-duplicate URLs or make your most-searched variants (“red running shoes”, “king size linen duvet”) impossible to find.

The good news is that Google has published clear documentation on product variants, including how variant URLs should behave and how to describe variant groups with structured data. Applied consistently, these rules let you rank for variant-level searches while keeping crawling efficient.

This guide explains when variants deserve their own URLs, how to use parameters and canonicals, how to mark up variants with ProductGroup structured data, and the mistakes that cause duplicate content and lost visibility.

Key Takeaways

  • Every variant should be reachable at its own distinct URL (path or query parameter), not just via a JavaScript selector or URL fragment.
  • Google does not index URL fragments, so #color=red does not create a separate page.
  • Decide between a single product page with variant parameters and separate pages per variant based on search demand and content differences.
  • Use ProductGroup with hasVariant, variesBy and unique IDs for each variant.
  • Make the preselected variant URL show the correct image, price and availability.

Why Product Variants Are an SEO Problem

Variants create two opposite risks. The first is duplication: if every combination of colour, size and material gets its own indexable page with near-identical content, you create crawl waste, index bloat and duplicate content that splits signals. The second is invisibility: if variants only exist inside a JavaScript dropdown, Google may never see that you sell the product in navy, and shoppers searching for “navy” land on a competitor.

Google’s ecommerce URL guidance resolves much of this. It recommends that each variant be identified by a separate URL, using either a path segment or a query parameter, and notes that when a variant uses an optional query parameter, the URL without it should be the canonical. It also warns that fragments are ignored:

“Google does not use fragment identifiers in indexing”

— Google Search Central, Designing a URL structure for ecommerce sites

Choosing a URL Strategy for Variants

ApproachExample URLBest whenWatch out for
Single page, variant parameters/linen-shirt?color=navyVariants differ only in colour or size; little unique demand per variantCanonical to the base URL; parameter URLs must still preselect the variant
Separate page per key variant/linen-shirt-navyVariants have distinct search demand, images, content or pricesEach page needs unique, useful content and self-contained markup
HybridColour pages + size parametersColour drives searches, size does notConsistency across templates and internal links
Fragment only (avoid)/linen-shirt#navyNever for variants you want indexedGoogle ignores fragments; variant is invisible to search

A useful test is search demand. Check whether people search for the variant itself (“green velvet sofa” often has its own demand, while “sofa size 3” usually does not). Colours, materials and finishes often justify their own pages; sizes rarely do. Our guide to URL parameters covers parameter handling in more depth.

As a starting point, this is how attributes commonly play out (always confirm with your own keyword and sales data):

Variant attributeSeparate indexable page?Typical reasoning
ColourOften yesShoppers search by colour; images differ substantially
Material or finishOften yesDistinct demand (“oak” vs “walnut”) and different descriptions or prices
Pattern or printSometimesWorth it when patterns have names people search for
SizeRarelyLittle standalone demand; content is otherwise identical
Pack quantityRarelyUsually better as an option on one page with unit pricing
Model or generationUsually yesDifferent specifications often make it a different product rather than a variant

Canonical Tags for Variants

For the single-page approach, parameter URLs such as ?color=navy should usually carry a canonical tag pointing to the base product URL, which is the version you want in search results. For the separate-page approach, each variant page should canonicalise to itself. Do not canonicalise distinct, valuable colour pages to a parent, or Google may drop the very pages you built to rank.

Keep variant parameters separate from filter parameters on category pages. Filters and sorting create a different problem, covered in our guide to faceted navigation SEO.

Product Variant Structured Data

Google supports describing variant groups with schema.org ProductGroup. The group holds shared properties (brand, description, audience) and lists variants with hasVariant; variesBy names the properties that differ, such as size or colour, and productGroupID identifies the parent. Google is explicit about identifiers:

“Each variant must have a unique ID in its corresponding structured data markup.”

— Google Search Central, Product variant structured data

A simplified single-page example:

{
  "@context": "https://schema.org",
  "@type": "ProductGroup",
  "name": "Linen Shirt",
  "url": "https://example.com/linen-shirt",
  "brand": { "@type": "Brand", "name": "Example" },
  "productGroupID": "LS100",
  "variesBy": ["https://schema.org/color", "https://schema.org/size"],
  "hasVariant": [
    {
      "@type": "Product",
      "sku": "LS100-NAVY-M",
      "name": "Linen Shirt Navy M",
      "color": "Navy",
      "size": "M",
      "image": "https://example.com/img/ls100-navy.jpg",
      "offers": {
        "@type": "Offer",
        "url": "https://example.com/linen-shirt?color=navy&size=m",
        "price": 49.00,
        "priceCurrency": "USD",
        "availability": "https://schema.org/InStock"
      }
    }
  ]
}

Google’s documentation notes that the ProductGroup url property applies to single-page setups and should be omitted on multi-page setups, where each page carries its own self-contained markup. Variants can alternatively point to their parent using isVariantOf or inProductGroupWithID. Combine this with complete merchant listing product schema so price, availability, shipping and returns data are accurate.

How to Set Up Product Variants for SEO: Step by Step

  1. Inventory your variant attributes. List every attribute (colour, size, material, pattern) and how many values each has.
  2. Research demand per attribute. Use keyword tools and your site search data to see which variants people search for directly.
  3. Pick the URL model. Choose single page with parameters, separate pages, or a hybrid based on demand and content differences.
  4. Make variants preselectable. Each variant URL should load with the correct image, price, stock status and add-to-cart option.
  5. Set canonicals. Parameter variants to the base URL in single-page setups; self-referencing canonicals on standalone variant pages.
  6. Add ProductGroup markup. Include unique SKUs or GTINs per variant, variesBy and productGroupID.
  7. Align your product feed. Use matching item group IDs and variant URLs in Merchant Center.
  8. Validate and monitor. Test markup with Google’s Rich Results Test and watch the Merchant listings and Product snippets reports in Search Console.

On-Page Details That Help Variant Pages

  • Variant-specific images. When a shopper picks “navy”, the main image should change; see product photography for consistent variant shots, and match product videos to the selected variant where colours differ a lot.
  • Dynamic titles and headings on standalone variant pages (“Linen Shirt in Navy”).
  • Stock clarity. Grey out unavailable sizes rather than hiding them, and handle discontinued variants carefully; see out-of-stock products SEO.
  • Crawlable variant links. Swatches should be real links (or update the URL) so crawlers can discover variant URLs.
  • Consistent internal linking. Category pages should link to the canonical product or to the right colour page, not to random parameter versions. Semrush’s ecommerce navigation guide makes a related point: clear, consistent navigation helps both shoppers and search engine crawling.

Common Product Variant SEO Mistakes

  • Using fragments for variants. #red URLs are not indexed separately.
  • Indexing every size and colour combination. Thin, near-identical pages waste crawl budget.
  • Canonicalising valuable colour pages to a parent. This removes the pages you want to rank.
  • Variant URLs that load the default variant. If ?color=navy shows black, Google and shoppers get mismatched information.
  • Reusing the same SKU or GTIN across variants. Google requires unique IDs per variant.
  • Mismatched feed and page data. Different prices or availability in Merchant Center and on the page cause disapprovals.

Frequently Asked Questions

Should each product variant have its own URL?

Each variant should be reachable at a distinct URL, through a path or query parameter. Whether that URL is indexed on its own or canonicalised to a parent depends on search demand and how different the variant content is.

Can I use URL fragments like #color=red for variants?

Not for SEO. Google does not use fragment identifiers in indexing, so fragment-based variants are not seen as separate pages.

What is ProductGroup structured data?

It is a schema.org type that describes a group of product variants, with shared properties at group level, hasVariant for each variant, variesBy for the differing attributes and productGroupID for the parent.

Should colour variants be separate pages?

Often, if people search for specific colours and each colour has distinct images and content. Sizes rarely justify separate pages.

How do variants affect Google Shopping?

Merchant Center uses item group IDs to group variants. Keep feed IDs, URLs, prices and availability consistent with on-page data and structured data.

Conclusion

Product variants are where ecommerce SEO meets product data. Give every variant a real URL, decide deliberately which deserve to rank on their own, set canonicals to match, and describe variant groups with ProductGroup markup so Google understands exactly what you sell.

Need help untangling variants, parameters and structured data on your store? Our ecommerce SEO services include technical audits. Get a free quote today.

References

  1. Google Search Central: Product variant structured data
  2. Google Search Central: URL structure for ecommerce sites
  3. Google Search Central: Managing crawling of faceted navigation URLs
  4. Semrush Blog: Ecommerce Navigation Best Practices
Rohit Choudhary
Written byRohit ChoudharyCo-Founder, My SEO Experts

Rohit Choudhary is the co-founder of My SEO Experts and has more than 14 years of hands-on experience in SEO, paid advertising and digital marketing. Since starting out in 2011 he has helped hundreds of businesses grow through practical, data-driven search strategies, and he also serves as a consulting Digital Marketing Director for several US-based companies.

Keep reading

Related articles

Meta Description Templates for Large Sites
Ecommerce

Meta Description Templates for Large Sites

Hand-writing thousands of meta descriptions isn't realistic. Here is how to build templates from real page data that read naturally, avoid duplicates and leave room for hand-written copy on your best pages.

Ready to grow your business online?

Get a free, no-obligation proposal tailored to your goals and budget.

CallFree Quote