aggregateRating in structured data matches visible on-page values
Why it matters
A JSON-LD aggregateRating block that shows 4.5 stars while the page displays 4.3 stars is an active schema-org policy violation — Google's Rich Results guidelines prohibit structured data that misrepresents visible content. Discovery of the discrepancy triggers manual review and can result in a site-wide rich-result penalty. Beyond compliance, rating mismatch is a data-integrity failure: users who click a listing based on an inflated SERP star count and see a lower on-page rating experience an immediate trust collapse. The ratingValue and reviewCount in schema-org AggregateRating must be computed from the same database query that drives the visible UI.
Severity rationale
High because mismatched structured-data ratings violate Google's explicit rich-results content policies, risking manual review penalties that suppress all rich results site-wide.
Remediation
Derive the JSON-LD aggregateRating from the same source as the rendered rating — never hardcode or cache independently. Compute both from a single database read per listing.
// In your listing data fetcher
const listing = await db.listing.findUnique({
where: { id },
select: {
name: true,
averageRating: true,
reviewCount: true,
// ...
},
});
const jsonLd = {
"@type": "LocalBusiness",
...(listing.reviewCount > 0 && {
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": listing.averageRating,
"reviewCount": listing.reviewCount,
},
}),
};
The guard listing.reviewCount > 0 prevents an empty aggregateRating block, which is separately flagged as invalid by Google's structured data validator.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Listing Data & Schema Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- schema-org · AggregateRating — AggregateRating type for rating structured data
- schema-org · ratingValue — ratingValue property must match displayed value
- schema-org · reviewCount — reviewCount property must match displayed count
Taxons
History
- 2026-04-18·v1.0.0·Initial import from directory-listing-schema·automated