How to Add LocalBusiness Schema to Your Website
A working example, where the code actually goes, and how to check Google can read it — no agency required.
What LocalBusiness schema actually is
LocalBusiness schema is a small block of JSON you add to your page's <head> that states your business name, address, phone number, and hours in a format machines can parse without guessing. It uses the vocabulary from schema.org and is written as JSON-LD, which is the format Google recommends over the older microdata and RDFa approaches.
One honest note before you spend 15 minutes on this: schema markup is not a Google ranking factor. It makes your listing eligible for rich results (star ratings, business details shown directly in the search listing) and gives Google Maps, the Local Pack, and AI answer engines a clean source to read your business data from. It won't move your position. It can make the position you already have get clicked more, and it stops you from being invisible to anything that parses your page programmatically.
A working example
Here's valid LocalBusiness schema for a fictional plumbing company. Swap in your own details:
Notice "@type": "Plumber" instead of the generic LocalBusiness. Schema.org has dozens of LocalBusiness subtypes — Restaurant, Dentist, Electrician, BeautySalon, and more — and using the specific one gives Google (and AI crawlers) a more precise signal than the generic type. Fall back to plain LocalBusiness only if nothing more specific fits.
Which fields actually matter
Required for it to be useful at all: name and either address or telephone. Without at least one of those, you don't have a usable business identity.
Worth adding if you have it: openingHours, priceRange, image, and geo coordinates. These are what unlock the fuller rich-result treatment and give Maps/Local Pack more to work with.
Don't add: aggregateRating or review unless you have real, verifiable reviews collected the way Google's guidelines require. Fabricated or self-serving review markup gets rich results revoked and can trigger a manual action.
Where to paste it, by platform
WordPress
If you're running Yoast SEO or Rank Math, use the plugin's custom schema or "advanced" tab — some setups let you drop raw JSON-LD directly, otherwise a plugin like "Insert Headers and Footers" will place the script tag in your site's <head> globally.
Squarespace
Settings → Advanced → Code Injection → paste the whole <script> block into the Header field.
Wix
Settings → Custom Code → Add Custom Code → paste it in, set it to load on all pages, in the <head>.
Plain HTML
Paste it directly between your existing <head> and </head> tags, on every page it applies to (usually the homepage and any location-specific pages).
How to check it actually worked
- Run the page through Google's Rich Results Test — it will tell you if the markup is valid and which rich result types it's eligible for.
- Check validator.schema.org for a stricter schema.org-spec validation pass.
- Give it 3–7 days, then check Google Search Console's "Enhancements" section for any errors Google's crawler actually encountered.
Common mistakes
- Multiple conflicting NAP details. If your schema says one phone number and your footer says another, that inconsistency is itself a bad signal — for Google and for AI crawlers trying to confirm your identity.
- Using generic
LocalBusinesswhen a specific subtype exists. "Restaurant" beats "LocalBusiness" for a restaurant every time. - Broken JSON syntax. A missing comma or quote makes the whole block get silently ignored by Google — no error shown to visitors, no benefit gained either. Always validate.
- Only putting it on the homepage. If you have multiple locations, each location page needs its own LocalBusiness block with that location's own NAP details.
Do this without typing any JSON
Local Schema Helper auto-detects your business name, phone, and address from the page and generates validated JSON-LD in one click.
Add to Chrome — Free