Schema Markup
Implement schema.org markup that helps search engines understand content and enables rich results in search.
Installation
OpenClaw / Moltbot / Clawbot
npx clawhub@latest install schema-markup
When to Use
- Adding structured data to new or existing pages
- Fixing schema validation errors
- Optimizing for specific rich results (FAQ, product, article)
- Implementing JSON-LD in React/Next.js applications
- Auditing existing schema markup
Initial Assessment
Before implementing schema, understand:
- Page Type — What kind of page? What's the primary content? What rich results are possible?
- Current State — Any existing schema? Errors? Which rich results already appearing?
- Goals — Which rich results are you targeting? What's the business value?
Core Principles
1. Accuracy First
- Schema must accurately represent page content
- Don't markup content that doesn't exist on the page
- Keep updated when content changes
2. Use JSON-LD
- Google recommends JSON-LD format
- Easier to implement and maintain than microdata or RDFa
- Place in
<head> or before </body>
3. Follow Google's Guidelines
- Only use markup Google supports for rich results
- Avoid spam tactics
- Review eligibility requirements for each type
4. Validate Everything
- Test before deploying
- Monitor Search Console enhancement reports
- Fix errors promptly
Common Schema Types
| Type |
Use For |
Required Properties |
| Organization |
Company homepage/about |
name, url |
| WebSite |
Homepage (search box) |
name, url |
| Article |
Blog posts, news |
headline, image, datePublished, author |
| Product |
Product pages |
name, image, offers |
| SoftwareApplication |
SaaS/app pages |
name, offers |
| FAQPage |
FAQ content |
mainEntity (Q&A array) |
| HowTo |
Tutorials |
name, step |
| BreadcrumbList |
Any page with breadcrumbs |
itemListElement |
| LocalBusiness |
Local business pages |
name, address |
| Event |
Events, webinars |
name, startDate, location |
For complete JSON-LD examples with required/recommended field annotations: See references/schema-examples.md
Quick Reference
Organization (Company Page)
Required: name, url
Recommended: logo, sameAs (social profiles), contactPoint
Article/BlogPosting
Required: headline, image, datePublished, author
Recommended: dateModified, publisher, description
Product
Required: name, image, offers (price + availability)
Recommended: sku, brand, aggregateRating, review
FAQPage
Required: mainEntity (array of Question/Answer pairs)
BreadcrumbList
Required: itemListElement (array with position, name, item)
Multiple Schema Types
Combine multiple schema types on one page using @graph:
{
"@context": "https://schema.org",
"@graph": [
{ "@type": "Organization", "..." : "..." },
{ "@type": "WebSite", "..." : "..." },
{ "@type": "BreadcrumbList", "..." : "..." }
]
}
Use @id to create referenceable entities — define once, reference elsewhere with { "@id": "..." }.
Validation and Testing
Tools
Common Errors
| Error |
Cause |
Fix |
| Missing required field |
Required property not included |
Add the missing property |
| Invalid URL |
Relative URL or malformed |
Use fully qualified URLs (https://...) |
| Invalid date format |
Not ISO 8601 |
Use YYYY-MM-DDTHH:MM:SS+00:00 |
| Invalid enum value |
Wrong enumeration value |
Use exact schema.org URLs (e.g., https://schema.org/InStock) |
| Content mismatch |
Schema doesn't match visible content |
Ensure schema reflects actual page content |
| Invalid price |
Currency symbol or commas included |
Use numeric value only ("149.99") |
Implementation
Static Sites
- Add JSON-LD directly in HTML template
- Use includes/partials for reusable schema
Dynamic Sites (React, Next.js)
export function JsonLd({ data }: { data: Record<string, unknown> }) {
return (
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(data) }}
/>
);
}
CMS / WordPress
- Plugins: Yoast, Rank Math, Schema Pro
- Theme modifications for custom types
- Custom fields mapped to structured data
Testing Checklist
Task-Specific Questions
Before implementing, gather answers to:
- What type of page is this? (product, article, FAQ, local business)
- What rich results are you targeting? (FAQ dropdown, product stars, breadcrumbs)
- What data is available to populate the schema? (prices, ratings, dates)
- Is there existing schema on the page? (check with Rich Results Test first)
- What's your tech stack? (static HTML, React/Next.js, CMS/WordPress)
Implementation Workflow
- Identify page types — map your site's pages to schema types
- Start with homepage — Organization + WebSite schema
- Add per-page schema — Article for blog, Product for shop, etc.
- Add BreadcrumbList — every page with navigation breadcrumbs
- Validate each page — Rich Results Test before and after
- Monitor Search Console — check enhancement reports weekly after launch
NEVER Do
- NEVER add schema for content that doesn't exist on the page — this violates Google's guidelines and risks penalties
- NEVER use microdata or RDFa when JSON-LD is an option — JSON-LD is easier to maintain and Google's recommended format
- NEVER hardcode schema that should be dynamic — product prices, availability, and ratings must reflect current data
- NEVER skip validation before deploying — invalid schema is worse than no schema; it wastes crawl budget
- NEVER mark up every page identically — each page type needs its own appropriate schema types
- NEVER ignore Search Console errors — schema errors can cause rich results to disappear entirely
1---2name: schema-markup3description: Add, fix, or optimize schema markup and structured data. Use when the user mentions schema markup, structured data, JSON-LD, rich snippets, schema.org, FAQ schema, product schema, review schema, or breadcrumb schema.4---56# Schema Markup78Implement schema.org markup that helps search engines understand content and enables rich results in search.91011## Installation1213### OpenClaw / Moltbot / Clawbot1415```bash16npx clawhub@latest install schema-markup17```181920## When to Use2122- Adding structured data to new or existing pages23- Fixing schema validation errors24- Optimizing for specific rich results (FAQ, product, article)25- Implementing JSON-LD in React/Next.js applications26- Auditing existing schema markup2728## Initial Assessment2930Before implementing schema, understand:31321. **Page Type** — What kind of page? What's the primary content? What rich results are possible?332. **Current State** — Any existing schema? Errors? Which rich results already appearing?343. **Goals** — Which rich results are you targeting? What's the business value?3536## Core Principles3738### 1. Accuracy First39- Schema must accurately represent page content40- Don't markup content that doesn't exist on the page41- Keep updated when content changes4243### 2. Use JSON-LD44- Google recommends JSON-LD format45- Easier to implement and maintain than microdata or RDFa46- Place in `<head>` or before `</body>`4748### 3. Follow Google's Guidelines49- Only use markup Google supports for rich results50- Avoid spam tactics51- Review eligibility requirements for each type5253### 4. Validate Everything54- Test before deploying55- Monitor Search Console enhancement reports56- Fix errors promptly5758## Common Schema Types5960| Type | Use For | Required Properties |61|------|---------|-------------------|62| Organization | Company homepage/about | name, url |63| WebSite | Homepage (search box) | name, url |64| Article | Blog posts, news | headline, image, datePublished, author |65| Product | Product pages | name, image, offers |66| SoftwareApplication | SaaS/app pages | name, offers |67| FAQPage | FAQ content | mainEntity (Q&A array) |68| HowTo | Tutorials | name, step |69| BreadcrumbList | Any page with breadcrumbs | itemListElement |70| LocalBusiness | Local business pages | name, address |71| Event | Events, webinars | name, startDate, location |7273**For complete JSON-LD examples with required/recommended field annotations**: See `references/schema-examples.md`7475## Quick Reference7677### Organization (Company Page)78Required: name, url79Recommended: logo, sameAs (social profiles), contactPoint8081### Article/BlogPosting82Required: headline, image, datePublished, author83Recommended: dateModified, publisher, description8485### Product86Required: name, image, offers (price + availability)87Recommended: sku, brand, aggregateRating, review8889### FAQPage90Required: mainEntity (array of Question/Answer pairs)9192### BreadcrumbList93Required: itemListElement (array with position, name, item)9495## Multiple Schema Types9697Combine multiple schema types on one page using `@graph`:9899```json100{101 "@context": "https://schema.org",102 "@graph": [103 { "@type": "Organization", "..." : "..." },104 { "@type": "WebSite", "..." : "..." },105 { "@type": "BreadcrumbList", "..." : "..." }106 ]107}108```109110Use `@id` to create referenceable entities — define once, reference elsewhere with `{ "@id": "..." }`.111112## Validation and Testing113114### Tools115- **Google Rich Results Test**: https://search.google.com/test/rich-results116- **Schema.org Validator**: https://validator.schema.org/117- **Search Console**: Enhancements reports118119### Common Errors120121| Error | Cause | Fix |122|-------|-------|-----|123| Missing required field | Required property not included | Add the missing property |124| Invalid URL | Relative URL or malformed | Use fully qualified URLs (`https://...`) |125| Invalid date format | Not ISO 8601 | Use `YYYY-MM-DDTHH:MM:SS+00:00` |126| Invalid enum value | Wrong enumeration value | Use exact schema.org URLs (e.g., `https://schema.org/InStock`) |127| Content mismatch | Schema doesn't match visible content | Ensure schema reflects actual page content |128| Invalid price | Currency symbol or commas included | Use numeric value only (`"149.99"`) |129130## Implementation131132### Static Sites133- Add JSON-LD directly in HTML template134- Use includes/partials for reusable schema135136### Dynamic Sites (React, Next.js)137138```tsx139export function JsonLd({ data }: { data: Record<string, unknown> }) {140 return (141 <script142 type="application/ld+json"143 dangerouslySetInnerHTML={{ __html: JSON.stringify(data) }}144 />145 );146}147```148149### CMS / WordPress150- Plugins: Yoast, Rank Math, Schema Pro151- Theme modifications for custom types152- Custom fields mapped to structured data153154## Testing Checklist155156- [ ] Validates in Rich Results Test with no errors157- [ ] No warnings for recommended properties158- [ ] Schema content matches visible page content159- [ ] All required properties included for each type160- [ ] URLs are fully qualified161- [ ] Dates are ISO 8601 format162- [ ] Prices are numeric without currency symbols163164## Task-Specific Questions165166Before implementing, gather answers to:1671681. What type of page is this? (product, article, FAQ, local business)1692. What rich results are you targeting? (FAQ dropdown, product stars, breadcrumbs)1703. What data is available to populate the schema? (prices, ratings, dates)1714. Is there existing schema on the page? (check with Rich Results Test first)1725. What's your tech stack? (static HTML, React/Next.js, CMS/WordPress)173174## Implementation Workflow1751761. **Identify page types** — map your site's pages to schema types1772. **Start with homepage** — Organization + WebSite schema1783. **Add per-page schema** — Article for blog, Product for shop, etc.1794. **Add BreadcrumbList** — every page with navigation breadcrumbs1805. **Validate each page** — Rich Results Test before and after1816. **Monitor Search Console** — check enhancement reports weekly after launch182183## NEVER Do1841851. **NEVER add schema for content that doesn't exist on the page** — this violates Google's guidelines and risks penalties1862. **NEVER use microdata or RDFa when JSON-LD is an option** — JSON-LD is easier to maintain and Google's recommended format1873. **NEVER hardcode schema that should be dynamic** — product prices, availability, and ratings must reflect current data1884. **NEVER skip validation before deploying** — invalid schema is worse than no schema; it wastes crawl budget1895. **NEVER mark up every page identically** — each page type needs its own appropriate schema types1906. **NEVER ignore Search Console errors** — schema errors can cause rich results to disappear entirely