Skip to main content

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.

Technical SEOFreePDFWW-020 · v1.0
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

Download free PDF

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

RoleResponsibility
Technical SEO specialistWrites the markup and validates it.
DeveloperAdds the markup to the correct template and deploys it.
ReviewerChecks 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.

  1. Copy the business name, address, phone number, website URL and opening hours from the Google Business Profile into the work ticket.
  2. Choose the most specific type from the schema.org LocalBusiness list, such as Plumber, Dentist or AccountingService. Use LocalBusiness only if no specific type fits.
  3. 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.

  1. 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>
    
  2. For a business that serves customers at their location and hides its address on Google, keep the address to addressLocality, postalCode and addressCountry so the markup does not reveal what the profile hides.

  3. Add sameAs with the URLs of the business's official social profiles, if they exist.

    [!WARNING] Do not add aggregateRating or review markup 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.

  1. Paste the code into the Rich Results Test using the Code option and fix every error.
  2. Paste it into the Schema Markup Validator and fix any errors or warnings about unknown properties.
  3. Compare every value with the Google Business Profile, character for character.

Deploy and confirm

Make sure the live page carries valid markup.

  1. Add the script block to the chosen page's template so it appears in the page's HTML, and deploy.
  2. Run the live URL through the Rich Results Test and confirm the markup is detected with no errors.
  3. 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

SymptomLikely causeFix
Rich Results Test finds nothingMarkup added by script after load and not rendered, or wrong pageAdd the markup to the server-rendered HTML of the tested page.
"Invalid value type" errorWrong format, such as hours written as textUse openingHoursSpecification with 24-hour times.
Details differ from the profileCopied from an old page or brochureCopy from the Google Business Profile and redeploy.
Duplicate LocalBusiness items detectedA plugin and the template both output markupDisable 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 SEO

    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.

    WW-006
  • Create and verify a Google Business Profile

    Check for an existing listing, create a policy-compliant Google Business Profile owned by the business, complete verification, and finish the core profile details.

    WW-010