What is LocalBusiness schema, and how do I add it?
LocalBusiness schema is a small block of code you put on your website. Visitors do not see it on the page. It gives Google your exact business name, address, phone number, hours, and service area in a standard format. You generate the code and paste it into the head section of your site.
What is schema, in plain words?
It is a short block of code hidden in your website HTML. Visitors do not see it on the page.
A customer looking at your page knows “208-555-0140” is a phone number and “Boise, ID” is a city. This code labels each detail with a standard tag like name or telephone.
Google recommends a format called JSON-LD for this code. JSON-LD stands for JavaScript Object Notation for Linked Data. It stays in one block inside a <script type="application/ld+json"> tag. It does not change how your web page looks.
What does LocalBusiness schema tell Google and AI tools?
It lists your core shop details in a standard format. Match this code to your Google Business Profile letter for letter to keep your shop details consistent.
If your website lists an office line and an after-hours dispatch line, put your main phone number in this code to show which number is primary.
You can also label your specific trade instead of using the general LocalBusiness label:
Plumberfor plumbing shops.HVACBusinessfor heating and cooling.Electricianfor electrical work.RoofingContractorfor roofers.HomeAndConstructionBusinessfor garage doors and other home trades.
Put the label that fits your trade in the @type line of your code.
What goes in it?
Every fact in this code must match the text visible to visitors on your website:
- @context: Always set this to
https://schema.org. - @type: Set this to your trade type, such as
PlumberorHVACBusiness, or useLocalBusiness. - name: Your real-world business name, matching your Google Business Profile.
- image: Full web addresses for photos of your shop or work.
- telephone: Your main local phone number, starting with
+1and your area code. - url: The full web address of your homepage, starting with
https://. - address: A
PostalAddressblock withstreetAddress,addressLocality(city),addressRegion(state code),postalCode, andaddressCountry. - geo: A
GeoCoordinatesblock with thelatitudeandlongitudeof your shop. - areaServed: The cities or counties you serve.
- openingHoursSpecification: The days of the week you work and your open and close times in 24-hour format.
- priceRange: A short symbol like
$$if you want to show a general price tier.
Write hours in the 24-hour clock. Nine in the morning is 09:00 and five in the afternoon is 17:00. For a 24-hour shop, set opens to 00:00 and closes to 23:59 for every day of the week. To mark Sunday as closed, set both opens and closes to 00:00, or leave Sunday out of the list.
Do not stuff keywords into the name field. If your legal business name is “Peak Heating”, write “Peak Heating”, not “Peak Heating AC Repair Spokane”.
How do I add it to my site?
Paste the JSON-LD code block into the <head> section of your homepage:
- Open the free tool to build your code block.
- Select your trade type and enter your business details.
- Click the copy button to copy the
<script type="application/ld+json">block. - Log in to your website editor.
- Open your homepage settings or your site-wide header code area.
- Paste the script block into the Header Code or Custom HTML box so it loads inside
<head>. - Click Publish or Save to make the change live.
If your website has an SEO plugin, look for a Local SEO or Schema tab in the left menu and fill in the form there. Use only one method so your page does not output two conflicting blocks.
Here is a finished code block for a plumber in Spokane:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Plumber",
"name": "River City Plumbing",
"image": "https://example.com/photos/truck.jpg",
"url": "https://example.com",
"telephone": "+15095550199",
"address": {
"@type": "PostalAddress",
"streetAddress": "412 E Sprague Ave",
"addressLocality": "Spokane",
"addressRegion": "WA",
"postalCode": "99202",
"addressCountry": "US"
},
"geo": {
"@type": "GeoCoordinates",
"latitude": 47.6573,
"longitude": -117.4041
},
"openingHoursSpecification": [
{
"@type": "OpeningHoursSpecification",
"dayOfWeek": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday"
],
"opens": "08:00",
"closes": "17:00"
}
]
}
</script>
Replace every example value with your real company details before you publish.
How do I check it works?
One missing comma or quote mark breaks the code. Test your live page after you publish:
- Run the free checkup to see if your site has valid
LocalBusinesscode. - Open validator.schema.org in your browser.
- Paste your homepage link into the Fetch URL tab and click Run Test.
- Check the right side of the screen and make sure your
LocalBusinessor trade item shows zero red errors. - Open Google Search Console and click URL Inspection in the left menu.
- Paste your homepage link into the top bar and press Enter.
- Click Request Indexing.
Whenever you change your phone number or hours on your Google Business Profile, update the code on your website the same day.
Questions
Does LocalBusiness schema go on every page of my website?
Put it on your homepage and your contact page. If you have more than one physical shop, put a separate block on the location page for each shop.
What if I run my business from home and hide my street address?
Include your city, state, and postal code in the address block, and leave out your street line. List the cities you cover in the areaServed property.
Is there a specific schema type for my trade?
Yes. Schema.org has specific types under LocalBusiness, including Plumber, Electrician, HVACBusiness, and RoofingContractor. Pick the specific trade type when one matches your work.
Can I put customer reviews inside my LocalBusiness schema?
Do not copy Google reviews into your `LocalBusiness` code. Google does not show star ratings in search from reviews you post about yourself on your own site.