Free download
Add and validate LocalBusiness structured data
Write LocalBusiness structured data in JSON-LD that matches the Google Business Profile, add it to the website, and validate it with Google's testing tools.
We reply within one working day. No pitch, no pressure.
- Time
- 60 minutes
- Difficulty
- Intermediate
- Audience
- Developers and technical SEO specialists who can edit the website's templates
Tools: Rich Results Test · Schema Markup Validator · Google Search Console
Free download. No account needed. Resources licence. Branded PDF in the Wright Websites design system. Covered by the resources licence.
01 / Procedure
How to follow it
Purpose
Structured data tells search engines exactly what a business is, where it is and when it is open, in a format they can read without guessing. This procedure adds LocalBusiness markup that matches the business's Google Business Profile and website exactly, so the details are consistent everywhere. It is finished when the Rich Results Test and Schema Markup Validator report no errors on the live page and Search Console shows no new structured data issues.
Scope
In scope
- Choosing the most specific LocalBusiness type
- Writing JSON-LD with the business's name, address, contact details, hours and area served
- Adding the markup to the website and validating it
Out of scope
- Product, event, article or FAQ markup
- Multi-location businesses with more than one address (repeat this procedure per location page)
- Review stars in search results (see the warning in the procedure)
Roles and responsibilities
| Role | Responsibility |
|---|---|
| Technical SEO specialist | Writes the markup and validates it. |
| Developer | Adds the markup to the correct template and deploys it. |
| Reviewer | Checks the details match the Google Business Profile exactly. |
Prerequisites
- A verified Google Business Profile (WW-010) with the final name, address, phone number and hours.
- Access to edit the website's templates or a structured data field in the content management system.
- The URLs of the logo and a representative photo of the business.
Procedure
Gather the business details
Use the Google Business Profile as the single source of truth.
- Copy the business name, address, phone number, website URL and opening hours from the Google Business Profile into the work ticket.
- Choose the most specific type from the schema.org LocalBusiness list, such as
Plumber,DentistorAccountingService. UseLocalBusinessonly if no specific type fits. - Decide which page carries the markup: usually the home page for a single-location business, or the contact page if the address appears there.
Write the JSON-LD
Write the markup as a separate script block, not mixed into the page's HTML.
-
Start from this structure and replace every value:
<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Plumber", "name": "Example Plumbing Ltd", "url": "https://www.example.co.uk/", "logo": "https://www.example.co.uk/logo.png", "image": "https://www.example.co.uk/team.jpg", "telephone": "+44 1234 567890", "address": { "@type": "PostalAddress", "streetAddress": "1 High Street", "addressLocality": "Exampletown", "postalCode": "EX1 2MP", "addressCountry": "GB" }, "openingHoursSpecification": [{ "@type": "OpeningHoursSpecification", "dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"], "opens": "08:00", "closes": "17:30" }], "areaServed": ["Exampletown", "Nearbyville"] } </script> -
For a business that serves customers at their location and hides its address on Google, keep the address to
addressLocality,postalCodeandaddressCountryso the markup does not reveal what the profile hides. -
Add
sameAswith the URLs of the business's official social profiles, if they exist.[!WARNING] Do not add
aggregateRatingorreviewmarkup built from the business's own testimonials. Google treats these as self-serving reviews, does not show stars for them and may ignore the markup.
Validate before publishing
Catch errors before they reach the live site.
- Paste the code into the Rich Results Test using the Code option and fix every error.
- Paste it into the Schema Markup Validator and fix any errors or warnings about unknown properties.
- Compare every value with the Google Business Profile, character for character.
Deploy and confirm
Make sure the live page carries valid markup.
- Add the script block to the chosen page's template so it appears in the page's HTML, and deploy.
- Run the live URL through the Rich Results Test and confirm the markup is detected with no errors.
- In Search Console, run the URL through URL Inspection, click Test live URL, and request indexing.
Quality checks
- The type is the most specific accurate schema.org LocalBusiness type.
- Name, address, phone and hours match the Google Business Profile exactly.
- No self-serving review or rating markup is present.
- Both validators report no errors on the live URL.
- The markup appears in the page source and is not blocked by robots.txt.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Rich Results Test finds nothing | Markup added by script after load and not rendered, or wrong page | Add the markup to the server-rendered HTML of the tested page. |
| "Invalid value type" error | Wrong format, such as hours written as text | Use openingHoursSpecification with 24-hour times. |
| Details differ from the profile | Copied from an old page or brochure | Copy from the Google Business Profile and redeploy. |
| Duplicate LocalBusiness items detected | A plugin and the template both output markup | Disable one source so only one block remains. |
Records
- Save the final JSON-LD and the validation results with the work ticket.
- Note in the client record that the markup must be updated whenever the profile's details change.
References
Related procedures
- Audit and optimise a page's on-page SEOWW-006
Check one page's indexability, title, headings, content, links, images and structured data against its target keyword, then make and verify the highest-impact fixes.
- Create and verify a Google Business ProfileWW-010
Check for an existing listing, create a policy-compliant Google Business Profile owned by the business, complete verification, and finish the core profile details.