Skip to content
AIRankSurge

How do you add LocalBusiness schema to your website?

By AIRankSurge ResearchUpdated 8 min read

LocalBusiness schema is structured data, usually written in JSON-LD, that tells search engines and AI assistants your business name, address, phone, hours, service areas and official profiles in a machine-readable format. Add it to your homepage or contact page, make it match your visible details exactly, and test it with Google’s Rich Results Test.

Key takeaways
  • Use the most specific type available, such as Plumber, Dentist or LegalService.
  • Every value must match what visitors see on the page.
  • sameAs links to official profiles strengthen your identity.

The properties that matter

  • @type — the most specific subtype of LocalBusiness that fits.
  • name, url, logo, image
  • telephone, email
  • address — a PostalAddress with street, city, region, postal code, country.
  • areaServed — the places you serve.
  • openingHoursSpecification
  • priceRange
  • sameAs — your Google Business Profile, Facebook, LinkedIn and other official profiles.

Example

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Plumber",
  "name": "Lone Star Drain Co",
  "url": "https://example.com/",
  "telephone": "+1-512-555-0142",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "1200 E 6th St",
    "addressLocality": "Austin",
    "addressRegion": "TX",
    "postalCode": "78702",
    "addressCountry": "US"
  },
  "areaServed": ["Austin", "Round Rock", "Cedar Park"],
  "openingHours": "Mo-Su 00:00-23:59",
  "priceRange": "$$",
  "sameAs": ["https://www.facebook.com/example"]
}
</script>

Generate yours with the free schema generator.

Adding it to your site

  • WordPress: the AIRankSurge Connector adds it automatically from your audit; SEO plugins also offer local schema settings.
  • Shopify, Wix, Squarespace, Webflow: paste the script into the site-wide header code area.
  • Custom sites: place it in the <head> of your homepage.

Testing

Run the page through Google’s Rich Results Test and the Schema Markup Validator, then fix any errors. Re-test whenever you change your address, phone or hours.

Sources

Related reading

See how your site scores on everything in this guide.

A free scan reads your pages the way search engines and AI assistants do. No card, no sign-up to see your score.

Scan my website free