How to show star rating in Google Search results?

In this how-to guide, I show you how you can add a star rating for your website pages to display in Google Search results which increases your website trust and boots visitors.

12/11/2024

Recommended Gear

16 OFF
Keychron V1 QMK Custom Mechanical Keyboard
MechanicalWirelessRGB

Keychron V1 QMK Custom Mechanical Keyboard

A versatile 75% layout wireless mechanical keyboard. Perfect for programming with Mac/Windows compatibility and exceptional build quality.

$94$79
Shop Now

What You'll Need

  • Access to your website's HTML
  • Basic understanding of HTML
  • A website with reviews or ratings

Step 1: Choose Your Rating Type

There are several types of schemas you can use:

  • Product reviews
  • Aggregate ratings
  • Local business reviews
  • Recipe ratings

For this tutorial, we'll focus on aggregate ratings, which work for most websites.

Step 2: Add Schema Markup

Add this code to the <head> section of your webpage:

<script type="application/ld+json">
{
  "@context": "https://schema.org/",
  "@type": "Product",
  "name": "Your Product or Service Name",
  "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "4.5",
    "ratingCount": "100",
    "reviewCount": "89",
    "bestRating": "5",
    "worstRating": "1"
  }
}
</script>

Step 3: Customize the Values

Replace these fields with your actual data:

  • "name": Your product or service name
  • "ratingValue": Average rating (between 1-5)
  • "ratingCount": Total number of ratings
  • "reviewCount": Total number of written reviews

Step 4: Test Your Implementation

  1. Visit Google's Rich Results Test tool (https://search.google.com/test/rich-results)
  2. Enter your URL or paste your code
  3. Check for any errors or warnings
  4. Fix any issues that appear

Step 5: Additional Tips

  • Keep your ratings honest and up-to-date
  • Only use schema markup for pages that actually have reviews
  • Make sure the ratings are visible on your webpage
  • Consider using different schema types for different pages

Common Mistakes to Avoid

  1. Don't use fake ratings
  2. Don't add ratings to pages without visible reviews
  3. Don't forget to update the schema when ratings change
  4. Don't use incorrect schema types

That's it! Remember that it might take a few weeks for Google to start showing your star ratings in search results. Keep monitoring your implementation using Google Search Console.

Imran Khan

About the Author

Imran Khan · Senior Product Engineer

Experienced software engineer passionate about web & mobile development. I transform complex problems into elegant, user-friendly solutions and share my knowledge through practical tutorials.