Validate your schema markup before publishing!
Validate Schema Markup →Introduction
Implementing schema markup on your website is easier than you might think. With JSON-LD (Google's recommended format), you can add structured data to any page without touching your existing HTML content.
This step-by-step guide will walk you through the entire process, from choosing the right schema type to validating and deploying your markup. Whether you're working with WordPress, Shopify, custom HTML, or any other platform, these steps apply universally.
Step 1: Identify Your Content Type
The first step is determining what type of content you're marking up. Schema.org defines hundreds of types, but here are the most common ones:
For E-commerce Sites:
- Product – Individual product pages
- Offer – Pricing and availability details
- Review – Customer reviews and ratings
- AggregateRating – Overall product ratings
For Content Publishers:
- Article – Blog posts and news articles
- NewsArticle – News content specifically
- BlogPosting – Blog-specific content
For Local Businesses:
- LocalBusiness – General local businesses
- Restaurant – Restaurants and cafes
- Store – Retail stores
For Events & Entertainment:
- Event – Conferences, concerts, webinars
- Recipe – Cooking recipes
- Video – Video content
For Informational Pages:
- FAQ – Frequently asked questions
- HowTo – Step-by-step guides
- Organization – Company information
Pro tip: Visit Schema.org to explore the full list of schema types and find the perfect match for your content.
Step 2: Choose JSON-LD Format (Recommended)
Google recommends using JSON-LD for schema markup because it's:
- Easy to implement – Added as a separate script block, no need to modify existing HTML
- Easy to maintain – All schema code in one place, separate from content
- Easy to validate – Clear structure that validators can easily read
- CMS-friendly – Works with any content management system
- Google's preference – Explicitly recommended in Google's documentation
Basic JSON-LD Structure
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "YourSchemaType",
"property1": "value1",
"property2": "value2"
}
</script>
Where to Place JSON-LD
You can place JSON-LD schema markup in three locations:
- In the <head> section (most common) – Loads early, easy to find
- In the <body> section – Also valid, sometimes used in CMS templates
- At the end of <body> – Works fine but less common
Recommendation: Place it in the <head> section for consistency.
Step 3: Generate Your Schema Code
Now it's time to create your actual schema markup. You have three options:
Option A: Write It Manually
If you're comfortable with JSON, you can write schema markup from scratch using Schema.org documentation as reference. This gives you complete control and is great for custom implementations.
Option B: Use a Schema Generator
Schema generators are tools that create JSON-LD code for you. You fill in a form with your content details, and the tool outputs ready-to-use schema code.
Popular generators: Schema Markup Generator, TechnicalSEO.com tools, Merkle's Schema Generator
Option C: Use a WordPress Plugin
If you're using WordPress, plugins like Rank Math, Yoast SEO, and Schema Pro can automatically generate schema markup for your content.
Essential Properties to Include
Every schema type has required properties and recommended properties:
- @context – Always "https://schema.org"
- @type – The schema type (e.g., "Product", "Article")
- Required properties – Specific to each schema type (e.g., "name" for Product)
- Recommended properties – Not required but improve rich results
Step 4: Add Code to Your Website
Once you have your schema markup code, you need to add it to your website. The method depends on your platform:
For HTML Websites:
- Open your page's HTML file in a text editor
- Locate the
<head>section - Paste your JSON-LD code before the closing
</head>tag - Save and upload the file to your server
For WordPress:
- Install a plugin like "Insert Headers and Footers" or "Code Snippets"
- Paste your JSON-LD code in the header section
- Or use theme customizer → Additional CSS/Scripts
- Save and publish
For Shopify:
- Go to Online Store → Themes → Actions → Edit Code
- Open
theme.liquidfile - Add your JSON-LD code in the
<head>section - Save changes
For Other CMS Platforms:
Most modern CMS platforms (Wix, Squarespace, Webflow, etc.) allow you to add custom code to page headers. Look for settings like:
- "Custom Code"
- "Header Code Injection"
- "Advanced Settings"
- "SEO Settings"
Important Rules:
- ✅ Schema content must match visible page content
- ✅ Don't mark up content that users can't see
- ✅ Use accurate, up-to-date information
- ✅ One schema instance per content item (avoid duplicates)
- ❌ Don't use fake reviews or misleading data
- ❌ Don't mark up advertisements as content
Step 5: Validate Your Schema
This is the most critical step! Never publish schema markup without validating it first. Invalid markup can:
- Cause search engines to ignore your structured data
- Generate errors in Google Search Console
- Prevent rich snippets from appearing
- Waste all your implementation effort
Validation Tools:
1. Google Rich Results Test (Most Important)
URL: search.google.com/test/rich-results
This tool shows exactly how Google interprets your schema and whether you're eligible for rich results. It's the gold standard for validation.
2. Schema Markup Validator
Use a comprehensive schema validator to check all schema types and catch any errors Google's tool might miss.
3. Schema.org Validator
URL: validator.schema.org
Official validator that checks compliance with Schema.org standards.
What to Check:
- ✅ No critical errors
- ✅ All required properties present
- ✅ Proper data types (strings, numbers, dates, URLs)
- ✅ Valid JSON syntax (no missing commas, brackets, quotes)
- ✅ Eligible for rich results (when applicable)
Step 6: Monitor and Maintain
After publishing your schema markup, ongoing monitoring is essential:
Use Google Search Console
- Add your site to Google Search Console (if not already added)
- Navigate to "Enhancements" section
- Check structured data reports for your schema types
- Monitor for errors, warnings, and valid items
- Track rich results performance and impressions
Regular Maintenance Tasks:
- Weekly: Check Search Console for new structured data errors
- Monthly: Re-validate major pages after content updates
- Quarterly: Review and update schema as needed
- Annually: Check for new schema types and opportunities
When to Update Schema:
- Content changes (prices, dates, descriptions)
- New schema types become available
- Google changes rich results requirements
- Search Console reports errors
Common Mistakes to Avoid
1. Duplicate Schema Items
Problem: Adding the same schema type multiple times on one page.
Solution: Use one comprehensive schema instance per content item. If you have multiple products, use a separate Product schema for each, but don't duplicate schemas for the same product.
2. Wrong Field Names
Problem: Using incorrect property names (e.g., "title" instead of "name").
Solution: Always reference Schema.org documentation for exact property names. Property names are case-sensitive and must be spelled exactly as defined.
3. Missing Required Fields
Problem: Omitting required properties causes validation errors.
Solution: Check Schema.org docs for required properties. For Product schema, "name" is required. For Event, "name" and "startDate" are required.
4. Invalid Data Types
Problem: Using a string where a number, date, or URL is expected.
Solution: Follow proper formatting:
- Dates: ISO 8601 format (2026-03-15T19:00:00)
- URLs: Full absolute URLs (https://example.com)
- Numbers: No quotes around numeric values
- Currencies: Use 3-letter codes (USD, EUR, GBP)
5. Mismatched Content
Problem: Schema describes content not visible on the page.
Solution: Schema must reflect actual page content. If your page says "Price: $29.99", your schema should also say 29.99. Don't mark up content that doesn't exist.
6. Outdated Information
Problem: Schema shows old prices, dates, or availability.
Solution: Update schema whenever content changes. For dynamic content, consider automating schema generation.
7. Invisible Content Markup
Problem: Marking up content hidden from users (hidden divs, accordion content).
Solution: Only mark up content visible to users. Google may penalize sites that mark up hidden content.
8. JSON Syntax Errors
Problem: Missing commas, brackets, or quotes break the entire schema.
Solution: Use a JSON validator or code editor with syntax highlighting. Common mistakes:
- Missing comma between properties
- Trailing comma after last property
- Unescaped quotes in strings
- Missing closing brackets or braces
Quick Checklist for Success
Use this checklist every time you implement schema markup:
- ☐ Content type identified correctly
- ☐ JSON-LD format used
- ☐ All required properties included
- ☐ Recommended properties added (when available)
- ☐ Schema content matches visible page content
- ☐ Proper data types and formatting used
- ☐ No duplicate schema instances
- ☐ Validated with Google Rich Results Test
- ☐ Validated with Schema.org Validator
- ☐ No critical errors or warnings
- ☐ Added to Google Search Console for monitoring
- ☐ Documentation created for future updates
Validate your schema markup now! Test your structured data before publishing to ensure it's error-free and eligible for rich results.
Validate Schema Markup →