In ecommerce, product detail pages carry the highest purchase intent of any page on a store. Yet many Shopify merchants struggle to rank them because they rely on short manufacturer copy, generic image filenames, duplicate variant URLs and blunt redirects for sold-out items. This guide walks through the technical and content changes that make a Shopify product page easier for Google to understand and more useful for shoppers, and shows how to check each change yourself.

Start by Checking What Your Theme Already Outputs

Shopify handles several basics for you: every product gets a canonical URL in the form /products/handle, a sitemap entry, and (in most current themes) structured data generated by the Liquid structured_data filter. Before adding anything, find out what your theme already prints, because two competing Product blocks on one page can confuse validators.

  1. Open a live product page, right-click and choose View page source.
  2. Search for application/ld+json. Note how many blocks appear and whether one has "@type": "Product".
  3. Paste the product URL into Google's Rich Results Test and read which items it detects and which fields it marks as missing.

If the theme already outputs a valid Product block, extend it rather than adding a second one. If it outputs nothing, add your own as shown below.

Injecting Complete JSON-LD Product Schema

Google's merchant features, such as price and availability in search snippets, depend on accurate structured data. Google lists the supported fields in its Product structured data documentation. Basic theme markup often leaves out attributes that help Google match your product to a real-world item: brand, a global identifier such as gtin13, and return or shipping details.

A minimal Liquid-driven block, placed in the main product section, looks like this:

{
  "@context": "https://schema.org/",
  "@type": "Product",
  "name": "{{ product.title | escape }}",
  "image": "https:{{ product.featured_image | image_url: width: 1200 }}",
  "description": "{{ product.description | strip_html | truncatewords: 40 | escape }}",
  "sku": "{{ product.selected_or_first_available_variant.sku }}",
  "brand": { "@type": "Brand", "name": "{{ product.vendor | escape }}" },
  "offers": {
    "@type": "Offer",
    "url": "{{ shop.url }}{{ product.url }}",
    "priceCurrency": "{{ cart.currency.iso_code }}",
    "price": "{{ product.selected_or_first_available_variant.price | money_without_currency | remove: ',' }}",
    "availability": "{% if product.available %}https://schema.org/InStock{% else %}https://schema.org/OutOfStock{% endif %}"
  }
}

If you store barcodes in Shopify, output the variant barcode as gtin13 (or the matching GTIN length). Only include values you actually hold; an empty or invented GTIN is worse than none.

Rich Results Test Validation Checklist
  • Confirm offers.price is a plain number (no currency symbol or thousands separator) and priceCurrency is a three-letter code.
  • Ensure offers.availability resolves to https://schema.org/InStock or OutOfStock and matches what the page shows.
  • Verify that image is an absolute HTTPS URL on Shopify's CDN.
  • Check that the price in the markup equals the visible price for the default variant.

Google treats a mismatch between markup and visible content as a quality problem, so the markup must always describe what the shopper actually sees.

Handling Variants Without Creating Duplicate Pages

Shopify gives each product one URL and selects variants with a ?variant= parameter. Those parameter URLs canonicalise back to the main product URL, which is usually what you want: sizes and minor options should not compete as separate pages.

  • Keep minor options as variants. Size, pack quantity and small colour differences belong on one product page with one description.
  • Split into separate products only when searches differ. If people search for a colour or material by name and the item is meaningfully different, a separate product with its own description and images can be justified. Do not split just to create more URLs.
  • Describe variants honestly in markup. Google supports product variant markup using ProductGroup with hasVariant. Use it only if your theme or app keeps each variant's price, availability and image in sync.

Avoiding Collection-Aware Product URLs

Many themes link from collection grids to URLs such as /collections/shoes/products/trail-runner. Shopify sets the canonical to /products/trail-runner, but internal links still point Google at the longer duplicates. In your collection product-card snippet, look for the Liquid filter within: collection and remove it so cards link straight to /products/handle. This keeps internal link signals pointed at the canonical URL.

Handling Discontinued and Out-of-Stock Products

A common mistake is deleting sold-out products or redirecting their URLs to the homepage. Redirecting unrelated pages to the homepage is often treated by Google as a soft 404, and shoppers who arrive from an old link lose context.

  • Temporarily out of stock: Keep the URL live with a 200 OK status. Set availability to OutOfStock, show an expected restock date if you know it, and offer a back-in-stock email signup.
  • Permanently discontinued with a replacement: 301 redirect to the direct successor product.
  • Permanently discontinued without a replacement: Either keep the page with clear "no longer available" wording and links to close alternatives, or let it return 404/410 once it no longer earns traffic or links.

Overcoming Thin Manufacturer Copy

When dozens of retailers publish the same supplier description, Google has little reason to rank yours. Original content that answers buying questions is what separates a product page:

  • Who the product is for and who it is not for.
  • Sizing or fit guidance based on your own returns data or customer questions.
  • Compatibility notes (which models, refills or accessories it works with).
  • Care, setup or usage instructions, ideally with your own photos or a short video.
  • Genuine customer reviews and a questions section, moderated but not filtered to only positive feedback.

Our guide to writing product descriptions for SEO covers the writing side in more depth.

Image Filenames, Alt Text and Size

Rename image files before upload (for example trail-runner-blue-side.jpg rather than IMG_4821.jpg), and write alt text that describes the image for someone who cannot see it. Use the image_url filter with sensible widths so mobile shoppers are not served desktop-sized files, and avoid lazy-loading the main product image, which is usually the page's Largest Contentful Paint element.

How to Audit a Product Page in Ten Minutes

  1. Run the URL through the Rich Results Test and fix any errors before warnings.
  2. In Google Search Console, use URL Inspection to confirm the indexed canonical is /products/handle.
  3. Check the Merchant listings and Product snippets reports in Search Console for site-wide issues.
  4. Test mobile speed with our page speed checker and note the LCP element.
  5. Scan related-product blocks and collection links with our broken link checker.

For the wider store setup, see our complete Shopify SEO guide, and for markup basics read what structured data is and how to implement it.