How do I add schema markup to my website?
Last updated 20 August 2026
Schema markup is added by pasting a JSON-LD script block into your website's HTML, usually in the head section. Write the JSON-LD describing your business, add it to your site through your platform's code injection setting or a plugin, then validate it at validator.schema.org or Google's Rich Results Test. For a local business the essential types are LocalBusiness (or a more specific subtype), Service, and FAQPage.
The code
Here's a complete, working example for a local business. Replace the values with your own — every field shown matters, and the ones people most often omit are areaServed, openingHours and the service list.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "LocalBusiness",
"name": "Acme Heating & Air",
"url": "https://acmeheating.com/",
"telephone": "+1-602-555-0142",
"email": "[email protected]",
"address": {
"@type": "PostalAddress",
"streetAddress": "1420 W Camelback Rd Suite 3",
"addressLocality": "Phoenix",
"addressRegion": "AZ",
"postalCode": "85015",
"addressCountry": "US"
},
"areaServed": ["Los Angeles", "Beverly Hills", "Santa Monica", "Pasadena"],
"openingHours": "Mo-Fr 07:00-18:00",
"priceRange": "$$",
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.8",
"reviewCount": "312"
}
}
</script>
Where it goes, by platform
| Platform | Where to paste it |
|---|---|
| WordPress | Appearance → Theme File Editor → header.php, before </head>. Safer: a header-scripts plugin, or your SEO plugin's schema settings. |
| Squarespace | Settings → Advanced → Code Injection → Header |
| Wix | Settings → Custom Code → Add Custom Code → place in Head, all pages |
| Shopify | Online Store → Themes → Edit code → theme.liquid, before </head> |
| Webflow | Project Settings → Custom Code → Head Code |
Validate it — this step is not optional
Paste your URL into validator.schema.org or Google's Rich Results Test. Both are free. A single missing comma silently invalidates the entire block, and you get no warning anywhere in your site's admin.
Common mistakes
- Markup that contradicts the visible page. If the schema says you're open until 6 and the page says 5, you've created a conflict rather than a signal.
- Inventing an
aggregateRating. Only include it if the reviews genuinely exist. Fabricating it is a policy violation and it's checkable. - Generic
LocalBusinesswhen a subtype exists.MedicalBusiness,Dentist,HVACBusiness,Plumber,DaySpaand many others are more precise, and precision is the point. - Adding it to one page only. The business markup belongs on the homepage;
FAQPagemarkup belongs on each page with real Q&A content.
Does schema alone get you cited?
No. It makes you legible — it removes ambiguity about who and what you are. Being quotable also requires content that answers real questions, and being credible requires corroboration from third-party sources. Schema is the necessary first step, not the whole job.
Want to know where your business stands?
Send us your website address and we'll send back a one-page breakdown of how your site currently reads to AI — the specific gaps, in order of what they're costing you. No charge, no sales call, nothing to sign up for.
Get the free breakdown