How to add LocalBusiness schema to your website
LocalBusiness schema is a small block of code that tells search engines your business name, address, phone number and opening hours in a format they can read directly. To add it, paste a JSON-LD block into your site (or turn on the feature in your SEO plugin or website builder), then test it with Google's free Rich Results Test.
If your site has no LocalBusiness schema, nothing looks wrong to visitors. Search engines simply have to guess your business details from the text on your pages. Adding the markup removes the guessing. It is usually one small block of code, or one setting in a plugin.
What the problem is
Schema markup is extra information added to a page's code, using a shared vocabulary from schema.org. The LocalBusiness type describes a business with a physical location or a service area: its name, address, phone number, opening hours, website, logo and so on. Google prefers the format called JSON-LD, which sits in one block in the page and does not change how the page looks.
Visitors never see it. The only way to know it is missing is to check, because the site looks identical with or without it.
Why it matters
LocalBusiness schema is not a ranking switch, and it does not guarantee anything special in search results. What it does is make your details unambiguous. Google says structured data helps it understand a page, and consistent, machine-readable details help avoid mix-ups such as a wrong phone number or an old address being picked up from a stray page.
It is a supporting signal. Your Google Business Profile, reviews and local pages do most of the work in local search. Schema is a cheap, one-time job that backs them up, and it also helps other tools and services that read your site.
How to check if your site has it
Three free ways, from quickest to most detailed:
- Open your homepage, right-click and choose View page source, then search (Ctrl+F or Cmd+F) for
application/ld+json. If you find it, search nearby forLocalBusinessor a more specific type such asDentistorRestaurant. - Paste your page address into Google's Rich Results Test. It lists the structured data it finds.
- Paste the address or the code into the Schema Markup Validator at validator.schema.org, which checks against the full schema.org vocabulary.
Check your homepage and your contact page. Markup is often on one and missing from the other. Also look for the opposite problem: some themes output half-filled markup with empty fields, which is worth tidying.
SiteMonday's week 16 structured data service looks for this as part of its written report and ranked fix list, if you would rather have it checked for you.
How to fix it in general
The fix has three parts: gather your details, write the markup, and put it on the right pages.
1. Gather your details. Copy them exactly as they appear on your Google Business Profile: business name, street address, phone number, opening hours, website address and logo. Mismatches between your site and your profile are a common source of confusion. If your hours are wrong in one place, see wrong opening hours on Google.
2. Write the markup. A basic example looks like this:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "LocalBusiness",
"name": "Example Bakery",
"url": "https://www.example.com/",
"telephone": "+1-555-010-0123",
"image": "https://www.example.com/logo.png",
"address": {
"@type": "PostalAddress",
"streetAddress": "1 Main Street",
"addressLocality": "Springfield",
"addressRegion": "IL",
"postalCode": "62701",
"addressCountry": "US"
},
"openingHoursSpecification": [{
"@type": "OpeningHoursSpecification",
"dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"],
"opens": "09:00",
"closes": "17:00"
}]
}
</script>
Replace the example values with your own. Where possible, use a more specific type than LocalBusiness, such as Dentist, Restaurant or Plumber, because schema.org has many subtypes. Optional extras include geo (coordinates), priceRange and sameAs (links to your social profiles).
3. Put it on the right pages. The homepage and the contact page are the usual places. If you have several locations, give each its own page with its own markup, not one page listing everything. That also pairs well with dedicated local landing pages.
Common platforms
Where things live depends on your version and theme, so treat these as directions, not exact menu paths.
- WordPress: Most well-known SEO plugins, such as Yoast SEO, Rank Math and All in One SEO, have a local business or organization section in their settings. Otherwise you can paste the code block into the page using a custom HTML block or a header and footer code plugin. See the WordPress guide.
- Shopify: Themes usually include some Organization markup but rarely LocalBusiness. The code is normally added in the theme's code editor (look for
theme.liquidor a section file; duplicate your theme as a backup first, because a mistake in theme code can break the site). See the Shopify guide. - Wix, Squarespace and Webflow: Each has a place for custom code in site or page settings (often called Custom Code, Code Injection or similar, and sometimes limited to paid plans). Paste the script block there.
- Google Tag Manager: You can inject the block with a Custom HTML tag, though Google generally prefers markup that is in the page itself.
If a plugin already outputs markup, do not add a second copy by hand. Two conflicting blocks cause more trouble than none.
How to confirm the fix worked
- Run the page through the Rich Results Test again. Your business type should appear with no errors.
- Open the details and read every value. Check the phone number, address and hours against your Google Business Profile.
- Fix errors first (red). Warnings (orange) are about optional fields and can wait.
- In Google Search Console, the Enhancements or Unparsable structured data reports may show issues after Google next crawls the page. This can take days or weeks, so do not worry if nothing appears at once.
How to stop it coming back
- Treat the markup as part of your business details. Whenever you change your hours, phone number or address, update your Google Business Profile and the markup in the same sitting.
- After a theme change, redesign or plugin switch, re-test. Markup often disappears quietly when the theme that was producing it is replaced.
- Keep one source. Decide whether a plugin or hand-pasted code owns the markup, and remove the other.
- Re-test once or twice a year, or after any big site change, and keep a copy of your code block in a safe place so it is easy to paste back.
SiteMonday finds and explains this kind of problem. Making the change is up to you or your developer.
Step by step for your platform
- Missing LocalBusiness schema markup on WordPress
- Missing LocalBusiness schema markup on Shopify
- Missing LocalBusiness schema markup on Wix
- Missing LocalBusiness schema markup on Squarespace
- Missing LocalBusiness schema markup on Webflow
- Missing LocalBusiness schema markup on Google Tag Manager
- Missing LocalBusiness schema markup on Next.js
Questions
Do I need a developer to add LocalBusiness schema?
Not always. Many SEO plugins and website builders have a form where you type your details, and otherwise you can paste a ready-made JSON-LD block into a custom code area. A developer helps mainly if your theme has no place to add code.
Will LocalBusiness schema make me rank higher?
Not by itself. It helps search engines understand your details correctly, but it is a supporting signal, and your Google Business Profile, reviews and content matter more.
Which pages should have LocalBusiness schema?
Usually the homepage and the contact page. If you have several locations, give each its own page with its own markup.
Should I use LocalBusiness or a more specific type?
Use a more specific type if one fits, such as Dentist, Restaurant or Plumber. LocalBusiness is the general type and is fine when nothing more specific applies.
Does the markup need to match my Google Business Profile?
Yes, as closely as possible. Matching names, addresses, phone numbers and hours avoids mixed signals about your business.
Why does the test show warnings after I added it?
Warnings usually flag optional fields you left out, like price range or coordinates. They do not stop the markup working, so fix errors first and add optional fields only if they are accurate.