WooCommerce

WooCommerce Product Page SEO: Descriptions, Attributes and Canonical Rules

WooCommerce product page SEO is the work of making each product URL distinct, descriptive and safely indexable. In my builds that means one unique description per product, attribute text that answers real queries, alt text that describes the image, breadcrumbs that show hierarchy, and a canonical rule that keeps variations from competing with the parent. I am Saif Al Jahan, a WordPress and PHP developer in Mymensingh, Bangladesh.

By Saif Al Jahanwebdev-saif.com

What WooCommerce product page SEO actually solves

Store problems rarely start with the theme; they start with thin, duplicated product data. A supplier supplies one description, the importer copies it into four hundred rows, and every URL ends up saying the same thing. Attribute archives inherit the same text, gallery images have no alt, and a canonical tag points at the wrong variation. WooCommerce product page SEO fixes those inputs at the source. I treat the product post, its product_cat terms, its pa_* attributes and its media library entries as one content model, then make sure the rendered HTML says exactly one thing per URL: what this product is, who it suits and why this page is the canonical home for it.

  • One unique description per product, not supplier boilerplate
  • Descriptive term text for each pa_* attribute value
  • Alt text written from the image, not the keyword list
  • A single clean canonical URL for the parent product
  • Breadcrumbs that reflect product_cat hierarchy

Write unique descriptions, not template leftovers

Two products sharing a description force Google to choose which URL deserves the impression, and it often chooses neither. I write a distinct short description for each product from its actual specifications, use case and limitations, then keep the long description for details that change a buying decision. In WordPress I hook woocommerce_short_description or render get_the_excerpt() from the same post meta the edit screen uses, so the visible copy and the snippet source cannot drift. I strip repeated warranty boilerplate into one linked policy page instead of pasting it into four hundred rows. A practical target is 40 to 70 words of genuinely product-specific text above the fold, with the differentiator in the first sentence.

  • Lead with what makes this SKU different, not the brand slogan
  • Use get_the_excerpt() as the single snippet source
  • Avoid verbatim manufacturer copy on every variant
  • Move shared warranty and shipping text to one policy page
  • Keep the first 40-70 words specific enough to stand alone

Attribute text that earns long-tail queries

WooCommerce stores attributes as pa_* taxonomies, and each term can carry its own WP_Term->description. That field is the cheapest long-tail surface most shops leave empty. If you sell pa_color or pa_size, term descriptions let the filtered archive explain what blue means for this range, which sizes run small and what pairs well. I use wc_get_attribute_taxonomies() to enumerate the attributes, then write two or three sentences per term that a buyer could actually quote. The trap is thin archives: a filter page with six products and no unique text is noise. Either enrich the term description and add a few internal links, or noindex the filtered URL and let the parent product carry the intent.

  • Enumerate attributes with wc_get_attribute_taxonomies()
  • Write 2-3 specific sentences in WP_Term->description
  • Link filtered archives back to the parent category
  • Noindex thin or empty attribute archives
  • Keep attribute slugs stable when renaming labels

Image alt text without keyword stuffing

Alt text is a description for someone who cannot see the image, not a place to repeat the focus keyword. For the main product photo I use a simple pattern: product type, distinguishing attribute and context, such as matte blue ceramic mug, 350 ml, side view. Gallery shots get their own text — handle detail, packaging, scale in use — while pure decoration gets an empty alt so screen readers skip it. In code I filter wp_get_attachment_image_attributes so every rendered image inherits the value stored in the media library. I also set explicit width and height, serve WebP through srcset and sizes, and keep the LCP image eager-loaded. On a throttled 4G profile my practical target is LCP under 2.5s.

  • Describe the image: product, attribute, view
  • Use alt="" for decorative swatches and icons
  • Filter wp_get_attachment_image_attributes for consistent markup
  • Set width/height and avoid lazy-loading the LCP image
  • Keep alt text under roughly 125 characters

Breadcrumbs and internal links that clarify hierarchy

A product should sit in a readable chain: Home > Shop > Category > Product. I build that trail from product_cat terms with wp_get_object_terms() and render it once, either through the woocommerce_breadcrumb filter or by replacing the default output with one breadcrumb component. If Yoast or Rank Math owns the breadcrumb, I disable the duplicate so the page does not emit two trails. I never include the selected variation in the breadcrumb, because that invents a new pseudo-page for the visitor. From the product I link upward to the parent category and sideways to two genuinely related products with descriptive anchor text. That gives crawlers a second path to the category and gives buyers an exit.

Canonical rules for variations, filters and add-to-cart URLs

By default a variation permalink resolves to the parent product with an attribute query string, so the safe rule is a self-referencing canonical on the parent and a canonical from every variation URL back to it. I enforce it with the wpseo_canonical filter, or woocommerce_canonical_url where applicable, and strip parameter noise such as add-to-cart, attribute_pa_color, filter_ and session IDs before comparing URLs. I only give a variation its own indexable URL when it has genuinely distinct content — its own description, image, SKU, gtin and stable stock and price — and even then I keep one canonical per chosen representation. Out-of-stock variations get a noindex, not a redirect loop.

  • Parent product: self-referencing canonical
  • Variation query URLs: canonical to the parent
  • Strip add-to-cart, attribute and filter parameters
  • Exceptions only with unique copy, image, SKU and gtin
  • noindex permanently out-of-stock variations

Structured data, verification and what to measure

On webdev-saif.com I emit Product JSON-LD from the same PHP function that renders the visible page, so the sku, mpn, gtin, brand, Offer price and AggregateRating cannot drift from what the buyer sees. BreadcrumbList mirrors the visible trail, and FAQ markup is only added when the questions are actually on the page. Verify with the Rich Results Test and the URL Inspection tool in Search Console, then watch impressions for product-plus-attribute queries rather than vanity traffic. For performance I keep LCP under 2.5s, INP under 200ms and CLS under 0.1 on a mid-range Android device. A page that is fast, distinct and correctly canonicalised is the one answer engines quote.

  • Product JSON-LD with sku, mpn, gtin and Offer
  • BreadcrumbList matching the rendered trail
  • FAQ markup only for questions visible on the page
  • Check with Rich Results Test and Search Console
  • LCP under 2.5s, INP under 200ms, CLS under 0.1

Frequently asked questions

Should product variations have their own canonical URL?

Usually no. In WooCommerce a variation permalink resolves to the parent product plus an attribute query string, so I set a self-referencing canonical on the parent and point variation URLs back to it. That consolidates signals and avoids duplicate results. I only break the rule when a variation has its own description, image, SKU, gtin and stable price and stock.

How long should a WooCommerce product description be?

Length matters less than uniqueness. A practical target is 40 to 70 words of product-specific copy in the short description, with the differentiator in the first sentence, and a longer technical section below. What hurts is copying manufacturer text into every row or padding with generic claims. Two URLs with the same description make Google choose a winner.

What is the best alt text for product images?

Write what the image shows: product type, the distinguishing attribute and the view — for example, matte blue ceramic mug, 350 ml, side view. Each gallery image gets its own description; decorative swatches and icons get an empty alt attribute. Do not start with the words image of, and do not repeat the focus keyword. I store the value in the media library.

Do attribute archive pages need to be indexed?

Only when they add value. A pa_* term archive with two or three genuine sentences, useful internal links and several relevant products can rank for long-tail queries such as matte blue ceramic mugs. A thin filtered page with six near-identical items should be noindex, because it competes with the parent category for the same intent. I decide per term, not per taxonomy.

Which structured data does a WooCommerce product page need?

At minimum Product with name, image, sku, brand and an Offer carrying price, currency and availability. Add gtin and mpn when you have real values, and AggregateRating only from genuine reviews shown on the page. BreadcrumbList should match the visible trail. Generate it in PHP from the same model as the page so markup never contradicts the HTML.

Written by Saif Al Jahan, webdev-saif.com · Mymensingh, Bangladesh. Last updated .