How to Test Schema Markup with Google's Rich Results Test
Google's Rich Results Test checks whether your schema markup is valid and correctly formatted. Here is how to run it and read the results.
Google's Rich Results Test is a free tool that checks whether schema markup on a web page is valid, correctly formatted, and eligible for rich result features in Google search. It reads the page - either from a live URL or from pasted code - and reports what schema it detected, whether any errors or warnings exist, and which rich result types the page may be eligible for.
Adding schema markup and never checking whether it works is one of the most common schema mistakes. Schema with formatting errors is not read by search engines. The Rich Results Test is the fastest way to confirm that schema is functioning as intended.
This guide explains how to run the test, how to read the results, what errors and warnings mean, and how to fix the most common issues.
For an overview of the schema types you might be testing, read What is Schema Markup?
What the Rich Results Test Checks
The Rich Results Test checks three things.
JSON-LD formatting. The schema code must be valid JSON. Missing commas, mismatched brackets, unclosed quotes, or invalid characters will cause the entire block to fail. The test identifies exactly where the formatting error is, which makes it possible to locate and fix the issue quickly.
Schema completeness. Each schema type has required and recommended fields. The test reports missing required fields as errors and missing recommended fields as warnings. An error means the schema is incomplete and may not be processed. A warning means the schema works but is missing information that would make it more useful.
Rich result eligibility. For schema types that can produce rich results - such as FAQPage, HowTo, and Article - the test indicates whether the page meets the requirements for that rich result type. This does not guarantee the rich result will appear in search, but it confirms the page is eligible.
How to Run the Test
The Rich Results Test is available at search.google.com/test/rich-results.
Testing a live URL:
- Go to the Rich Results Test tool.
- Select the URL tab.
- Paste the full URL of the page you want to test, including the
https://prefix. - Click Test URL.
- Wait for the tool to fetch and analyse the page. This usually takes a few seconds.
Testing code directly:
If the page is not yet published, you can paste the schema code directly into the Code tab. This is useful for checking schema before adding it to a page. Note that the code test only validates the schema block itself - it cannot check whether the schema values match the live page content.
Use the URL test for published pages whenever possible. It reads the schema exactly as search engines see it.
How to Read the Results
The results page shows a summary of what the tool found, organised by schema type.
No errors detected. The schema is valid JSON and meets the structural requirements for the schema type. The page is eligible for the relevant rich result, subject to Google's other quality signals.
Warnings. The schema is structurally valid but is missing recommended fields. Warnings do not prevent the schema from working, but adding the missing fields will improve the schema's completeness. Common warnings include a missing datePublished field on Article schema or a missing image field.
Errors. The schema has a structural problem that prevents it from being processed. This could be a JSON formatting error, a missing required field, or a value that does not match the expected format. Errors must be fixed for the schema to work.
No structured data found. The tool could not detect any schema on the page. This usually means the schema block was not saved correctly, was added to the wrong location, or the page has not been updated since the schema was added. Check that the schema is in the correct field and that the page has been saved.
How to Fix Common Errors
JSON formatting errors. The error message will indicate the line number and character position of the problem. Open the schema block, count to that position, and look for a missing comma, unclosed bracket, or mismatched quote. Correcting a single character often fixes the entire block. After fixing, paste the corrected code back into the tool's Code tab to verify the fix before updating the page.
Missing required fields. The test will name the missing field. Add the field to the schema block with the correct value. For Article schema, commonly missing fields are image and datePublished. For HowTo schema, a missing name field is a common error.
Value mismatch between schema and page. If the headline in Article schema does not match the H1 on the page, the test may flag it as a warning. Update the schema value to match the page exactly.
Schema not detected. Check that the schema block is in the post code injection footer field in Ghost, not the header. Check that the post has been saved after adding the schema. If the page is cached, clear the cache and run the test again.
Running the Test After Every Schema Addition
The Rich Results Test should be run every time schema is added or updated on a page.
Run it once when schema is first added - after the post is published and the schema is in place. If any errors appear, fix them and run the test again before treating the implementation as complete.
Run it again any time the page is significantly updated. If the article title changes, the headline in the Article schema needs to match. If the FAQ section is updated, the FAQPage schema needs to reflect the current questions and answers. Schema that no longer matches the page content is inaccurate, and the Rich Results Test will flag the discrepancies.
Other Validation Tools
Google's Rich Results Test is the primary tool for validating schema, but two others are useful in specific situations.
Google Search Console - Enhancements report. Once a site is connected to Google Search Console, the Enhancements section shows which schema types Google has detected across the site, along with any errors found during crawling. This is useful for monitoring schema health across all pages, not just one at a time. It takes time to update - changes made to schema may not appear in Search Console for days or weeks.
Schema.org Validator (validator.schema.org). This tool validates schema against the Schema.org specification rather than Google's specific requirements. It is useful for checking whether a schema block is structurally valid when the Rich Results Test does not detect the schema type you are using - some schema types are not eligible for Google rich results but are still valid and useful for other search engines.
For a broader guide to schema types and when to use them, read What is AI SEO? for context on how structured data fits into the wider picture of AI search optimisation.
Common Mistakes
Testing code in the Code tab before publishing. The Code tab validates the JSON structure but cannot check whether schema values match the actual page. Always run the URL test after publishing to confirm the schema as search engines will read it.
Treating warnings as errors. Warnings indicate missing recommended fields - the schema still works. Errors indicate structural problems that prevent the schema from being processed. Prioritise fixing errors first.
Not re-testing after making changes. Every change to the schema block requires a new test run. It is easy to introduce a formatting error while editing - re-testing after every change confirms the fix worked.
Assuming the test passing means a rich result will appear. The Rich Results Test confirms eligibility, not guaranteed display. Google decides when and whether to show rich results based on query relevance, user experience signals, and other factors. A page can have valid schema and still not show rich results for certain queries.
Ignoring Search Console enhancement errors. Schema errors that appear in Google Search Console affect multiple pages and should be addressed promptly. A systematic schema error across a site is a bigger issue than a single-page error.
Frequently Asked Questions
Is the Rich Results Test the same as Google's Structured Data Testing Tool? No. Google retired the Structured Data Testing Tool in 2023. The Rich Results Test is the current recommended tool for validating schema markup. The Schema.org Validator is an alternative for checking schema types not covered by the Rich Results Test.
How long does it take for Google to index schema markup after it is added? There is no guaranteed timeline. Google re-crawls pages at varying intervals depending on the site's crawl frequency and the page's importance. In Google Search Console, new schema typically appears in the Enhancements report within a few weeks. For time-sensitive schema - such as event dates - add it well in advance.
Can I test schema on a page that requires a login? No. The Rich Results Test fetches the page as an anonymous user. If the page is behind a login or paywall, the tool will not be able to read the schema. Use the Code tab to test the schema block directly in this case.
Will invalid schema harm my rankings? Invalid schema does not directly cause ranking drops. A page with broken schema is treated the same as a page with no schema. However, if Google's Structured Data guidelines are deliberately violated - for example, by marking up content that is not visible on the page - this can result in a manual action affecting the site's search visibility.
How do I test schema that has not been published yet? Use the Code tab in the Rich Results Test and paste the schema block directly. This validates the JSON structure and field requirements. Once the page is published, run the URL test to confirm the schema is reading correctly from the live page.
Summary
Google's Rich Results Test validates schema markup by checking JSON formatting, field completeness, and rich result eligibility.
Run the test using the page's live URL after the schema has been added and the post has been saved. The Code tab can be used to pre-validate a schema block before publishing.
Errors indicate structural problems that prevent schema from being processed - fix these first. Warnings indicate missing recommended fields - add these where possible.
Re-run the test every time schema is added or updated. Schema that contains errors is not read by search engines.
Use Google Search Console's Enhancements report for ongoing site-wide schema monitoring, and the Schema.org Validator for schema types not covered by the Rich Results Test.
For guidance on the schema types you will be testing, read How to Add Article Schema to a Blog Post and How to Add FAQ Schema to Your Pages.