How to fix invalid rating value on Adobe Commerce (Magento)
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 Adobe Commerce (Magento)
- Structured data in Magento is typically output by the theme or a third-party module. Search your theme for 'ratingValue' under app/design/frontend/<Vendor>/<Theme>/.
- The default Luma theme generates rating schema in Magento_Review/templates/. Open the relevant .phtml file and locate the ratingValue output.
- Ensure the value is cast to float and clamped: e.g. max(1, min(5, (float)$block->getRatingSummary() / 20)) for a 0–100 summary score converted to 1–5.
- Add worstRating and bestRating properties to the same JSON-LD or microdata block.
- Run bin/magento cache:flush after saving template files, then validate with the Rich Results Test.
{
"@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 Adobe Commerce (Magento) 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