The Google Rich Results Test is a diagnostic tool used to verify if a web page supports rich results. Rich results are search listings that go beyond standard blue links by including carousels, images, or other non-textual elements. Using this tool allows you to confirm if your structured data is eligible to trigger these special features on Google Search.
What is the Google Rich Results Test?
Google provides this official tool to let webmasters and SEOs test their structured data (schema markup). It specifically validates if the code on a page can generate rich results on Google surfaces (Google Search Console).
While other tools might validate general schema, this tool focuses on the specific formats and requirements Google uses to display enhanced SERP features.
Why the Google Rich Results Test matters
- Higher CTR: Highlighted listings tend to get more clicks than standard text results, giving you an edge over competitors.
- Visual Preview: You can see a mockup of how your content (like recipes or courses) might appear in several layouts across desktop and mobile.
- Error Identification: It distinguishes between critical errors (red), which prevent rich results, and warnings (orange), which are suggestions for improvement.
- Mobile-First Testing: Since Google primarily uses mobile-first indexing, the tool defaults to a smartphone user agent to simulate how Google sees your site.
- Validation of Fixes: You can edit code snippets directly within the tool to test if a fix works before deploying it to your live site.
How to use the Google Rich Results Test
The tool offers two primary methods for testing data.
Test by URL
Submit the full URL of a live page. This is best for checking pages already indexed or published. Google-InspectionTool must be able to access the page; it cannot test pages behind firewalls or password protection unless you expose a tunnel from your local machine.
Test by Code Snippet
Paste an arbitrary block of code or an entire page's source code. This is useful for testing structured data during development. You can modify the code in the editor and rerun the test as many times as needed to clear errors.
Choosing a User Agent
You can choose to test your page using either a smartphone or a desktop computer user agent. The default user agent is smartphone (Google Search Console Help), reflecting how the majority of searches occur.
Understanding the Results
The tool analyzes crawling status, detected items, and syntax.
Crawling and Accessibility
The tool reports if Google is permitted to crawl the page. If a robots.txt rule or noindex directive blocks Google, the tool cannot complete the test. It also flags issues like DNS server errors, invalid SSL certificates, or when a site's hostload is exceeded.
Detected Items
This section lists every rich result type found, such as Breadcrumbs, Job Postings, or FAQ. If the structured data is valid, the item will be marked green. If it is "unparseable," the tool will list the specific issue.
Common Syntax Errors
If the tool cannot determine the rich result type, it may be due to a top-level syntax error.
| Error Type | Description |
|---|---|
| Invalid JSON document | The JSON has a top-level syntax error. |
| Incorrect value type | Using a string where a number or array is required. |
| Parsing error: Missing ':' | Missing the colon between a field and its value. |
| Duplicate unique property | Providing two definitions for a unique property, like @context. |
| Missing ',' or '}' | Typical formatting errors that halt the parser. |
Best practices
- Prioritize JSON-LD: The tool supports JSON-LD, RDFa, and Microdata, but JSON-LD is often easier to manage and edit within the tool.
- Unblock Important Resources: Ensure CSS, scripts, and images are not blocked by robots.txt. If Google cannot load these, it may fail to understand the page layout or mobile-friendliness.
- Fix Warnings for Better Rich Results: While warnings (orange) do not disqualify you from rich results, providing optional fields like "offers" or "performer" for events makes the listing more complete.
- Remove Comments: Avoid using comments within JSON-LD blocks. While the test tool might ignore them, the JSON-LD standard does not support them and they may cause errors on your live site.
- Share Results with Your Team: Use the "Share" button to send the test results to developers or clients. No special permissions are required to view the shared link.
Common mistakes
- Mistake: Testing a page that is behind a login or firewall. Fix: The Google-InspectionTool needs anonymous access. Use the "Code Snippet" option if your page is not public.
- Mistake: Confusing a valid test with a guarantee of appearance. Fix: Google warns that reaching "green" status does not guarantee a rich result will show; Google chooses the best result based on user history and location.
- Mistake: Using local IP addresses for DNS. Fix: Ensure your DNS does not resolve to a private IP range (like 10.0.0.1), as the tool will fail with a "Private IP provided" error.
- Mistake: Forgetting that links expire. Fix: Test history and shared links are saved for approximately 90 days (Google Search Console Help). Bookmark useful results or save the code elsewhere for long-term storage.
Google Rich Results Test vs Schema Markup Validator
| Feature | Rich Results Test | Schema Markup Validator |
|---|---|---|
| Primary Goal | Check eligibility for Google search features. | General validation of all schema.org markup. |
| Validation Scope | Only Google-supported rich result types. | Any schema.org type (even non-Google ones). |
| Visuals | Provides mobile/desktop SERP previews. | No visual SERP previews. |
| Warnings | Specific to Google Search requirements. | Generic schema violations only. |
Rule of Thumb: Start with the Rich Results Test to ensure your page qualifies for Google's specific features. Use the Schema Markup Validator for broader, non-Google-specific schema testing.
FAQ
Does a successful test mean my site WILL show rich results? No. A successful test only confirms eligibility. Google chooses whether to show rich results based on many variables, including search history and location.
Which user agent should I use? In most cases, keep it on "Smartphone." Google uses mobile-first indexing, and this agent represents how Google's primary crawler sees your site.
What formats does the tool support? It supports JSON-LD (recommended), RDFa, and Microdata.
Can I test local code before it is published? Yes. Use the "Code" instead of "URL" option. You can paste the code directly into the tool to validate it during the development phase.
What should I do if my rich result appears with "warnings"? A warning (orange icon) means your code is valid but missing optional information. While the rich result can still show, adding the missing data (like a "price" for a product) usually makes the result more helpful to users.
How long are my test results saved? Search Console saves your code and test state. You can bookmark the page to save the history, which remains accessible for about 90 days (Google Search Console Help).