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---5
6# Schema Markup
7
8Implement schema.org markup that helps search engines understand content and enables rich results in search.
9
10
11## Installation
12
13### OpenClaw / Moltbot / Clawbot
14
15```bash
16npx clawhub@latest install schema-markup
17```
18
19
20## When to Use
21
22- Adding structured data to new or existing pages
23- Fixing schema validation errors
24- Optimizing for specific rich results (FAQ, product, article)
25- Implementing JSON-LD in React/Next.js applications
26- Auditing existing schema markup
27
28## Initial Assessment
29
30Before implementing schema, understand:
31
321. **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?
35
36## Core Principles
37
38### 1. Accuracy First
39- Schema must accurately represent page content
40- Don't markup content that doesn't exist on the page
41- Keep updated when content changes
42
43### 2. Use JSON-LD
44- Google recommends JSON-LD format
45- Easier to implement and maintain than microdata or RDFa
46- Place in `<head>` or before `</body>`
47
48### 3. Follow Google's Guidelines
49- Only use markup Google supports for rich results
50- Avoid spam tactics
51- Review eligibility requirements for each type
52
53### 4. Validate Everything
54- Test before deploying
55- Monitor Search Console enhancement reports
56- Fix errors promptly
57
58## Common Schema Types
59
60| 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 |
72
73**For complete JSON-LD examples with required/recommended field annotations**: See `references/schema-examples.md`
74
75## Quick Reference
76
77### Organization (Company Page)
78Required: name, url
79Recommended: logo, sameAs (social profiles), contactPoint
80
81### Article/BlogPosting
82Required: headline, image, datePublished, author
83Recommended: dateModified, publisher, description
84
85### Product
86Required: name, image, offers (price + availability)
87Recommended: sku, brand, aggregateRating, review
88
89### FAQPage
90Required: mainEntity (array of Question/Answer pairs)
91
92### BreadcrumbList
93Required: itemListElement (array with position, name, item)
94
95## Multiple Schema Types
96
97Combine multiple schema types on one page using `@graph`:
98
99```json
100{
101 "@context": "https://schema.org",
102 "@graph": [
103 { "@type": "Organization", "..." : "..." },
104 { "@type": "WebSite", "..." : "..." },
105 { "@type": "BreadcrumbList", "..." : "..." }
106 ]
107}
108```
109
110Use `@id` to create referenceable entities — define once, reference elsewhere with `{ "@id": "..." }`.
111
112## Validation and Testing
113
114### Tools
115- **Google Rich Results Test**: https://search.google.com/test/rich-results
116- **Schema.org Validator**: https://validator.schema.org/
117- **Search Console**: Enhancements reports
118
119### Common Errors
120
121| 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"`) |
129
130## Implementation
131
132### Static Sites
133- Add JSON-LD directly in HTML template
134- Use includes/partials for reusable schema
135
136### Dynamic Sites (React, Next.js)
137
138```tsx
139export function JsonLd({ data }: { data: Record<string, unknown> }) {
140 return (
141 <script
142 type="application/ld+json"
143 dangerouslySetInnerHTML={{ __html: JSON.stringify(data) }}
144 />
145 );
146}
147```
148
149### CMS / WordPress
150- Plugins: Yoast, Rank Math, Schema Pro
151- Theme modifications for custom types
152- Custom fields mapped to structured data
153
154## Testing Checklist
155
156- [ ] Validates in Rich Results Test with no errors
157- [ ] No warnings for recommended properties
158- [ ] Schema content matches visible page content
159- [ ] All required properties included for each type
160- [ ] URLs are fully qualified
161- [ ] Dates are ISO 8601 format
162- [ ] Prices are numeric without currency symbols
163
164## Task-Specific Questions
165
166Before implementing, gather answers to:
167
1681. 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)
173
174## Implementation Workflow
175
1761. **Identify page types** — map your site's pages to schema types
1772. **Start with homepage** — Organization + WebSite schema
1783. **Add per-page schema** — Article for blog, Product for shop, etc.
1794. **Add BreadcrumbList** — every page with navigation breadcrumbs
1805. **Validate each page** — Rich Results Test before and after
1816. **Monitor Search Console** — check enhancement reports weekly after launch
182
183## NEVER Do
184
1851. **NEVER add schema for content that doesn't exist on the page** — this violates Google's guidelines and risks penalties
1862. **NEVER use microdata or RDFa when JSON-LD is an option** — JSON-LD is easier to maintain and Google's recommended format
1873. **NEVER hardcode schema that should be dynamic** — product prices, availability, and ratings must reflect current data
1884. **NEVER skip validation before deploying** — invalid schema is worse than no schema; it wastes crawl budget
1895. **NEVER mark up every page identically** — each page type needs its own appropriate schema types
1906. **NEVER ignore Search Console errors** — schema errors can cause rich results to disappear entirely