Of all the rich results a product page can earn, the star rating is the one people most want, and the one most often faked. The temptation is understandable: the markup takes minutes, and a rating looks like free credibility. It is also the fastest structured data mistake to make, because a rating is a factual claim about reviews, and a claim with no reviews behind it is invented content.
This guide adds a rating the honest way, using the free Schema Markup Generator on Ovatly, which runs in your browser. It covers the rule the rating has to satisfy, the safeguard the tool builds in, the exact step where you should stop if your page has no reviews, and how to check the result once it is live.
Contents
- Quick answer
- The rule: a rating is a claim about real reviews
- How the generator enforces it
- How to add a rating, step by step
- Worked example: one product, with and without reviews
- Limitations: what the tool cannot check for you
- Common mistakes
- FAQs
- Conclusion
- References
Quick answer
Add a rating only when your page genuinely has reviews, and copy both numbers from those reviews. In the Schema Markup Generator, choose the Product type and fill in the page's real information. The Product form includes a rating only when you supply both a rating value and a review count; if your page has no reviews, leave both fields empty and ship a Product block without one. Paste the block inside the page's <head> or just before the closing </body> tag, keep one block per type per page, and test the live URL with Google's Rich Results Test or the Schema.org validator. The markup makes the page eligible for a rich result; it does not guarantee stars.
The rule: a rating is a claim about real reviews
Structured data must describe content that is visible on the page. The generator's notes state the consequence plainly: marking up hidden or invented content, including fake ratings and review counts, breaches search engine guidelines. A rating value says "the people who reviewed this product scored it this much on average". A review count says "this many reviews stand behind that average". If either number is invented, rounded up from somewhere else, or borrowed from reviews of a different product, the markup is claiming something the page cannot show.
That is why the tool asks for two numbers rather than one. A value without a count hides how thin the evidence is; a count without a value is meaningless. Together they are the smallest honest summary of a set of reviews, and both have to come from the reviews your own page actually has.
How the generator enforces it
The Product form only includes a rating when you supply both a rating value and a review count. Leave either field empty and the generated JSON-LD contains no rating at all. There is no default value and no placeholder waiting to slip through; the absence is deliberate, and it mirrors the rule above.
Two other safeguards matter here. The generator validates that the output is well-formed JSON and escapes closing script tags inside your text, so the block you paste cannot break the page. And when you copy the block, the tool shows a note about which recommended properties are still empty. Treat that note as information, not as a score: it is guidance based on schema.org's required and recommended properties for the type, and it is not a promise that Google will show a rich result. An empty rating on a page with no reviews is the correct output, not a gap to fill.
How to add a rating, step by step
- Open the Schema Markup Generator and choose the Product type.
- Fill in the fields with the page's real information: the product name and other details exactly as the page presents them.
- Decide the rating honestly. If the page has real reviews, enter the rating value and the review count from those reviews. If it has none, leave both fields empty and continue without a rating.
- Copy the generated script block into the page, inside the
<head>or just before the closing</body>tag, and check the guidance note for missing recommended properties. - After publishing, test the live URL with Google's Rich Results Test or the Schema.org validator.
Worked example: one product, with and without reviews
The numbers below are placeholders that show the shape of the block. Substitute your own page's real figures, and only in the first version.
Say a product page for a kettle visibly shows its customer reviews, and those reviews average 4.5 from 27 reviewers. Entered into the Product form, with both rating fields filled, the output contains a rating section like this:
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Example Kettle",
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.5",
"reviewCount": "27"
}
}
Now take the same product on a new page that has no reviews yet. Leave the rating value and review count empty, and the generator returns the Product block with no rating section at all. That shorter block is not a worse result. It is the difference between a claim the page can back up and one it cannot, and the tool makes the honest version the default.
Limitations: what the tool cannot check for you
The generator verifies that the JSON is valid and complete against its field guidance. It cannot verify that your reviews are genuine, that the average is calculated correctly, or that the count matches the reviews on the page. That judgement stays with you, and it is the part the guidelines actually care about.
Schema also confers eligibility, not display. Google decides whether to show a rich result based on quality, relevance and its current feature set, so a correct rating block can still appear as a plain result. And ratings move: when new reviews change the average or the count, the markup has to be updated to match, or it quietly becomes the kind of mismatch this guide exists to avoid. Finally, the tool validates the block in isolation; only the live tests see your real page, including any markup your theme already adds.
Common mistakes
- Inventing a review count. A plausible number typed to make the rating appear is a fake review count, the exact breach the tool's notes name.
- Marking up reviews from somewhere else. Ratings gathered on a marketplace or another website are not this page's reviews; presenting them as if they were misdescribes the page.
- Rounding the average up. 4.3 marked up as 4.5 is a small lie with the same status as a large one.
- Adding a rating to a page with no visible reviews. If a visitor cannot see the reviews, the markup is describing content that is not there.
- Chasing the guidance note. Filling every recommended property with content the page does not have turns a completeness hint into a fabrication checklist.
FAQs
When does the Product form include a rating? Only when you supply both a rating value and a review count. Leave either field empty and the generated block contains no rating at all. Both numbers must come from real reviews, because structured data has to describe content that is visible on the page.
Can I add a rating if my page has no reviews? No. Marking up hidden or invented content, including fake ratings and review counts, breaches search engine guidelines. If the page has no reviews, the honest block is a Product block without a rating.
Does adding rating schema guarantee stars in the search results? No. Schema makes a page eligible for rich results; Google decides whether to show them based on quality, relevance and its current feature set.
Where do I paste the JSON-LD block?
Inside the <head> of the page, or just before the closing </body> tag. Both placements are accepted; keep one block per type per page.
How do I test the markup after adding it? Use Google's Rich Results Test or the Schema.org validator on the live URL. This tool verifies the JSON is valid and complete against its field guidance, but only the live tests see your real page.
Conclusion
Rating schema done honestly is a short job: real reviews on the page, both numbers copied from them into the Schema Markup Generator, one block pasted in, and a live test to confirm what search engines will see. Done any other way, it is invented content with a technical accent. If you are still choosing how to write your structured data in the first place, the companion guide on JSON-LD vs Microdata compares the two formats, and the SEO Tools guides collect the rest of this cluster.
References
- Schema.org, the Product type and the AggregateRating type: https://schema.org/Product and https://schema.org/AggregateRating
- Google Search Central, on structured data and how it is used: https://developers.google.com/search/docs/appearance/structured-data/intro-structured-data