technical-seo

Shopify Product Schema: How to Check, Add and Fix It

By
shopify Product Schema Hero

Shopify product schema is the block of structured data that tells Google what a product page in your store sells: the product name, its image, its price, whether it is in stock, and who makes it. Google reads it to build the richer product results you see in search, with prices, stock status and star ratings under the link. Every Shopify theme prints some product schema on its own, so most stores already have it. The real question is whether it is complete. This guide shows what Shopify prints by default, what Google wants on top of that, how to check your own product pages, and how to fill the gaps without breaking anything.

The guide is written for store owners, not developers. You will only need the Shopify admin and, for one optional step, the theme code editor.

What product schema is and what Google uses it for

Structured data is a small piece of code, usually JSON-LD, that sits in the page source and describes the page in a fixed vocabulary from schema.org. Shoppers never see it. Search engines read it so they do not have to guess the price or brand from your page design. If you are new to the idea, start with our guide to schema markup for SEO and come back here for the Shopify part.

According to Google Search Central, product schema can make a page eligible for two kinds of product results:

  • Product snippets: the extra line under an ordinary search result, with a price, stock status or a star rating. Google needs the product name and at least one of offers, review or aggregateRating.
  • Merchant listings: the shopping-style results and panels where people can compare products and prices. These need a name, an image and an Offer with a price above zero and a currency.

Everything else is "recommended". Recommended does not mean optional in practice: brand, GTIN, SKU, shipping details, return policy and ratings are what make a listing useful next to a competitor's. Here is how each field of Shopify product schema maps to the admin:

Schema property

What Google uses it for

Where it comes from in Shopify

In a default Dawn theme?

name

Product title (required)

Product title

Yes

image

Product photo (required for merchant listings)

First product or variant image

Yes

offers: price, priceCurrency, availability

Price and stock status

Variant price, store currency, inventory

Yes

description

Product summary

Product description

Yes (empty if the description is empty)

brand

Manufacturer or brand

Vendor field

Yes

sku

Your own product code

Variant SKU

Only when the SKU is filled in

gtin

Global product ID (UPC, EAN, ISBN)

Variant barcode

Only when the barcode is filled in

aggregateRating, review

Star ratings

A reviews app

No

shippingDetails

Delivery cost and time

Not available in theme code

No

hasMerchantReturnPolicy

Return window and fees

Not available in theme code

No

What your Shopify theme already prints

Shopify's free Dawn theme, and most themes built on it, print product schema from one line in the product section. Open Online Store > Themes, click the three dots next to your live theme and choose Edit code. In sections/main-product.liquid, near the end, you will find a script tag that runs the product through Shopify's structured_data filter:

Shopify theme code editor showing main-product.liquid in the Dawn theme, with the ld+json script tag that prints product schema through the structured_data filter

We loaded a single-variant product page on a Dawn store and read what that filter prints. Trimmed and with demo values, it looks like this:

{
  "@context": "http://schema.org/",
  "@type": "Product",
  "name": "The Collection Snowboard: Hydrogen",
  "description": "",
  "image": "https://cdn.shopify.com/.../hydrogen.jpg",
  "brand": { "@type": "Brand", "name": "Hydrogen Vendor" },
  "category": "snowboard",
  "url": "https://www.example.com/products/the-collection-snowboard-hydrogen",
  "offers": {
    "@type": "Offer",
    "price": "600.00",
    "priceCurrency": "INR",
    "availability": "http://schema.org/InStock",
    "url": "https://www.example.com/products/the-collection-snowboard-hydrogen?variant=..."
  }
}

That covers the required fields for both kinds of product result, which is why many stores never think about product schema at all. But look at what it leaves out. Because that product had no SKU and no barcode, there is no sku and no gtin. The description is empty because the product description was empty. There are no ratings, no shipping details and no return policy, because the theme has no data for them.

Products with several variants come out differently. Dawn prints a ProductGroup with a productGroupID and one Product per variant under hasVariant, each with its own price and stock. On our test store it did not print variesBy, the property that tells Google whether the variants differ by size, colour or material. Google lists it as recommended for product variants.

Other themes differ. Some older themes still write their own JSON-LD by hand, some leave out the brand, and some print product schema twice when an app adds its own. That is why checking your own pages matters more than trusting the theme.

How to check Shopify product schema on your store

Check one product of each kind you sell: a simple product, a product with variants, and an out-of-stock product. Three pages are usually enough to see how your theme behaves across the catalogue.

Step 1: Find the JSON-LD in the page source

Open a product page in your browser, right-click and choose View page source, then search for ld+json. Each match is one block of structured data. On a Dawn store you will normally find an Organization block from the theme layout and the product block from main-product.liquid. If you find two blocks with "@type": "Product", an app and your theme are both printing product schema.

Step 2: Run the Rich Results Test

Google's Rich Results Test is the tool Google Search Central recommends for product structured data. Paste a product URL and it lists the product results the page is eligible for, with errors (missing required fields) and warnings (missing recommended fields). A warning such as "Missing field shippingDetails" does not stop the page from being eligible. It tells you what would make the listing richer.

The test cannot open a store that is still behind Shopify's password page. Until you launch, paste the page source into the test's code tab instead.

Step 3: Watch the reports in Search Console

Once the store is live, Google Search Console shows Product snippets and Merchant listings reports under Shopping. They list every product page Google found with product schema, grouped by error and warning. If the reports are empty, first make sure the pages are indexed. Our guide on how to check if page is indexed by Google walks through it.

How to fix the most common product schema gaps

Most gaps in Shopify product schema are fixed in the admin, not in code. Work through them in this order: the fields Shopify already reads first, then the data your theme cannot reach.

1. Fill in the product fields that feed the schema

Open Products and pick a product. The title, description, media and vendor all go straight into the product schema. Write a real description (two or three plain sentences is fine), add at least one clear image, and set the Vendor to the brand name, because Shopify prints the vendor as the brand. Many stores leave the vendor as the store name, which tells Google the product is made by the shop itself.

Shopify product editor showing the title, description, media and vendor fields that Shopify uses for product schema

Further down, under Inventory, open More details. The SKU becomes the sku property, and the Barcodes field (ISBN, UPC, GTIN and similar) becomes the gtin. For branded goods, the GTIN is the single most useful extra field, because it lets Google match your offer to the same product sold elsewhere. Use the barcode printed on the packaging. Do not make one up.

Shopify product editor Price and Inventory sections with the SKU and Barcodes fields used for product schema

If you have hundreds of products, fill these fields in bulk with a product CSV export and import, or with the bulk editor. For the titles and descriptions themselves, see how to bulk edit Shopify SEO metadata.

2. Add ratings only from a real reviews app

Star ratings come from aggregateRating and review. Shopify has no built-in reviews, so the data has to come from a reviews app. Most reviews apps either print their own rating markup or save the rating in Shopify's standard review metafields (reviews.rating and reviews.rating_count) for the theme to use. Check which one your app does, and make sure only one source prints the rating. Never add a fixed rating by hand: the ratings must come from real customer reviews shown on the page.

3. Add shipping and return details

Liquid, the theme language, has no access to your shipping rates or return rules, so no theme can print shippingDetails or hasMerchantReturnPolicy on its own. You have three options:

  • Set store-wide shipping and return policies in Google Merchant Center, or in the shipping and returns settings in Search Console, if you use them.
  • Add the policies once under your Organization markup. Google Search Central recommends this for policies that apply to the whole store.
  • Store the details in metafields and print them inside the product's offer with an app or a theme edit.

Pick one source and keep it current. A 30-day return window in the markup and a 14-day window on your policy page is worse than no markup at all.

4. Remove duplicate product schema

Two Product blocks on one page (one from the theme, one from an SEO or reviews app) often disagree on price, rating or availability, and Google has to guess which one to trust. Keep the more complete block and turn the other off. Apps usually have a setting for this. In the theme, removing or commenting out the structured_data script tag in main-product.liquid turns the theme's version off. Duplicates are a structured-data version of a wider problem; our guide to fix duplicate content covers the page-level side.

5. Keep the schema in step with the page

Because Dawn builds product schema from live product data, price and stock stay in sync on their own. Hand-written markup does not. If you or an app hard-coded a price, a sale price or "InStock" into a template, it will drift the moment you change the product. Re-run the Rich Results Test after each theme change, a theme switch or a new app install, since these are the moments Shopify product schema usually breaks.

How CrawlHunt helps with Shopify product schema

Checking Shopify product schema one page at a time is slow on a large catalogue. Two parts of the CrawlHunt SEO Shopify app help here:

  • See the schema on every crawled page. After an audit, open any page's details and the Schema tab lists each JSON-LD block found on that page, with its fields, so missing brands, empty descriptions and duplicate Product blocks are easy to spot.
  • Add the missing types to your theme. In Search Engine Tools > Schema Markup, choose the Product template and tick the types you need, such as ProductGroup with variants, AggregateRating, MerchantReturnPolicy and OfferShippingDetails. CrawlHunt writes them to one snippet in your live theme. Each type prints only when its data exists: ratings come from the review metafields, while shipping and return details come from custom.shipping_details and custom.return_policy metafields that you fill in. You can remove the whole snippet again from the same tab.
CrawlHunt Schema Markup tab with the Product template selected and product schema types such as ProductGroup, MerchantReturnPolicy, OfferShippingDetails and AggregateRating ticked

If your theme already prints a Product block, keep only one source: either turn off the theme's version or leave the CrawlHunt product type unticked. For the rest of the product page (titles, alt text, FAQs), read our guide to Shopify product page SEO.

Schema updates count towards a monthly allowance that depends on your plan; see pricing plans for details.

FAQ

Does Shopify add product schema automatically?

Yes, in most themes. Dawn and other Online Store 2.0 themes print product schema through the structured_data filter, with name, image, description, brand, price, currency and availability. SKU and GTIN appear only when you fill in those fields. Ratings, shipping and returns are not included.

Is Shopify product schema a ranking factor?

Not directly. Product schema helps Google understand the page and makes it eligible for richer results, such as prices and stars in search. Those results can earn more clicks, but they do not move a page up the rankings on their own.

Why don't my star ratings show in Google?

Either no rating markup is printed (check the page source for aggregateRating), it is printed twice with different values, or Google chose not to show it. Valid markup makes a page eligible for star ratings, but Google decides whether to display them.

Do I need a GTIN for every product?

No, it is recommended, not required. Add it for branded products that have a barcode. Handmade or own-brand products without a barcode can skip it. Never invent one.

Can I add FAQ schema to Shopify product pages too?

Yes, as long as the questions and answers are visible on the page. Our product FAQ guide shows how to add them to Shopify product pages.

Start auditing your website with CrawlHunt

Automatically detect and fix SEO issues with AI-powered recommendations.

Get Started Free