How to fix invalid rating value on Shopify

Fix the AggregateRating.ratingValue in your structured data so it falls within the valid numeric range (1–5 by default, or within the declared bestRating/worstRating bounds).

Steps for Shopify

  1. Go to Online Store > Themes > current theme > Actions > Edit code.
  2. Search for 'ratingValue' across theme files — commonly in product.liquid, product-template.liquid, or a snippets/structured-data.liquid (or similar) file.
  3. Locate the line outputting ratingValue. Ensure the value comes from a real average (e.g. {{ product.metafields.reviews.rating.value }}) and is ≥ 1 on a 1–5 scale.
  4. Add explicit bestRating and worstRating fields alongside ratingValue: e.g. "worstRating": "1", "bestRating": "5".
  5. If you use a review app (Judge.me, Okendo, Stamped, etc.), the schema may be injected by the app — check the app's settings panel for a 'structured data' or 'SEO' toggle rather than editing theme files directly.
  6. Save, then validate with the Rich Results Test (search.google.com/test/rich-results).
Official Shopify documentation ↗
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "Example Product",
  "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "4.3",
    "reviewCount": "28",
    "worstRating": "1",
    "bestRating": "5"
  }
}

What is invalid rating value?

Structured data is hidden code on your product and review pages that tells Google exactly what your content means — things like star ratings, prices, and product names. The `AggregateRating` block inside that code includes a `ratingValue` field (the average star score) and should also declare `bestRating` and `worstRating` to define the scale. Google requires `ratingValue` to be a real number that sits between `worstRating` and `bestRating`. A value like "0.5" on a 1–5 scale, or any value outside the declared bounds, is treated as invalid and disqualifies the entire rating from appearing in search results.

Star ratings displayed directly in Google search results (called Rich Results or Review Snippets) dramatically increase click-through rates — shoppers trust and click on listings with visible stars far more than plain blue links. An invalid `ratingValue` causes Google to silently drop the star display from your listing entirely, costing you that visibility advantage. Over time, losing those stars means lower organic traffic and fewer first-click conversions compared to competitors whose ratings show correctly. There is also an accuracy obligation: Google's guidelines explicitly require that rating values reflect real customer ratings and fall within a valid numerical range — violations can result in manual actions against your structured data.

See the complete Invalid rating value guide for every platform and the full background.

Not sure if your Shopify store has this?

Run a free SEOLZ audit — we’ll find invalid rating value and every other issue across your whole site.

Scan my site free

Fix invalid rating value on another platform