Review Schema Markup: How to Get Star Ratings in Google Search Results
Star ratings in Google search results come from AggregateRating schema — but there are strict requirements, common pitfalls, and Google policy rules that trip up most stores. Here's what actually works.
Those yellow star ratings in Google search results — the ones that appear below the page title and dramatically improve click-through rates — come from structured data markup, specifically the AggregateRating type within a Product schema. Getting them is not complicated, but there are several places stores go wrong that result in rich snippets being ignored or suppressed.
What Google Requires for Product Review Stars
Google's structured data documentation for Product rich results has strict requirements. The minimum valid markup for star ratings in search results needs all of the following:
- A
Productschema with@type: "Product" - A
nameproperty - An
aggregateRatingproperty containing: ratingValue— the average rating (number between 1 and 5, or your max scale)reviewCountORratingCount— how many reviews contributed to the rating- Either an
offersblock (price + availability) or areviewarray with at least one individual review
That last requirement trips up many stores. Google wants evidence that real users left reviews — either through individual review objects in the markup, or through a price+availability Offer (which signals the page is actively selling the product). A Product schema with only name + aggregateRating and no Offer or review is valid JSON-LD but often won't trigger rich results.
Correct Minimum Markup
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Classic Leather Wallet",
"image": "https://example.com/wallet.jpg",
"description": "Slim bifold leather wallet with 6 card slots",
"brand": { "@type": "Brand", "name": "YourBrand" },
"offers": {
"@type": "Offer",
"url": "https://example.com/products/wallet",
"priceCurrency": "USD",
"price": "39.99",
"availability": "https://schema.org/InStock",
"itemCondition": "https://schema.org/NewCondition"
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.7",
"reviewCount": "143",
"bestRating": "5",
"worstRating": "1"
}
}
Note the bestRating and worstRating fields. While not strictly required, omitting them can cause confusion if your review system uses a 10-point scale. Google assumes 1-5 if omitted — if your ratingValue is 8.4 on a 10-point scale, you need to specify "bestRating": "10" or your stars will be miscalculated.
Platform-Specific Implementation
Shopify
Shopify's default themes include Product schema, but the aggregateRating block is often missing unless you install a reviews app that adds it. Apps like Judge.me, Okendo, and Yotpo all inject AggregateRating schema alongside their review widgets. Verify with Google's Rich Results Test after installing.
Important: Shopify's built-in schema (added in Dawn and newer themes) may conflict with your reviews app schema. Check your product pages for duplicate <script type="application/ld+json"> blocks — having two Product schemas on the same page can confuse Googlebot. The reviews app should merge into your existing Product schema, not add a second one.
WooCommerce
WooCommerce generates Product schema automatically and includes AggregateRating when products have reviews. Yoast SEO and Rank Math both enhance this. Check the output using Google's Rich Results Test — the most common issue is products with zero reviews showing ratingValue: 0 or reviewCount: 0, which Google correctly ignores.
Custom / Headless
If you're fetching review data from a third-party API (Stamped, Reviews.io, Bazaarvoice), you need to inject the aggregateRating dynamically. The data should be embedded in the HTML response (not loaded via client-side JavaScript after hydration) so Googlebot sees it during initial rendering. Server-side rendering or static generation with revalidation at review-update time is the right pattern.
Google's Policy Rules
Google has explicit policies about what can appear as review stars in search results. Violations lead to manual actions or suppression of rich results:
- Self-reviews are prohibited. A business cannot mark up reviews it wrote about itself. Every review must be from an independent user.
- Reviews must be about the specific product on that page. You cannot use a site-wide aggregate rating on product pages — the schema must reflect reviews of that specific product.
- The rating must be visible on the page. If Googlebot renders the page and the star rating is not visible to users, the structured data will be ignored. Hidden or invisible ratings are a violation.
- Review gating is against Google's guidelines. If your system only asks satisfied customers to leave reviews (and filters out negative ones), Google can suppress your rich results even if your schema is technically valid.
Why Your Stars Disappeared
If you previously had review stars and they stopped showing:
- Reviews below threshold. Google generally requires a minimum number of reviews before showing stars. If products lose reviews (through deletions or platform migration), stars may drop. The threshold isn't publicly stated but appears to be around 5-10 reviews.
- Policy violation detected. Google may have algorithmically detected review manipulation. Check the Search Console Enhancements report for manual actions.
- Schema moved client-side. A theme update, app install, or framework change may have moved your JSON-LD injection from server-rendered to client-side, making it invisible to Googlebot.
- AggregateRating removed from markup. App uninstalls sometimes leave Product schema without the aggregateRating block. Verify with Rich Results Test.
Testing Your Markup
Google's Rich Results Test (search.google.com/test/rich-results) is the authoritative tool. It renders the page as Googlebot would, extracts structured data, and tells you whether the page is eligible for rich results. Use it on any product page where you expect stars.
For bulk testing, Google Search Console's Enhancements → Shopping tab shows all Product pages with valid schema, warnings, and errors across your entire site. Any "missing field" errors here are suppressing stars across those pages.
StoreVitals' Product Schema Validator checks the same requirements — product name, image, price, availability, AggregateRating fields — and gives you a rich results eligibility score for any URL. Use it to quickly audit new products or diagnose why a product page isn't showing stars.