Anticode Open builder

Local business schema markup: what to include and how to test it

LocalBusiness structured data is a block of JSON-LD that restates facts already on your page, such as name, address, phone, hours and a link, in a form machines read without guessing. It can make you eligible for richer results but guarantees none, and it must never say anything the visible page doesn't.

Updated · By the Anticode team

What the markup is

Schema.org is a shared vocabulary that search engines agreed on for describing things: a Restaurant, an Event, a Product. Local business schema markup uses the LocalBusiness type or one of its more specific subtypes, such as Dentist, Plumber or HairSalon. You add it to the page as JSON-LD, a small JSON object inside a <script type="application/ld+json"> element. Browsers don't display it and it doesn't run; it's data for crawlers.

Google lists name and address as required for this type and recommends telephone, url, geo, openingHoursSpecification and priceRange, among others, in its local business structured data documentation. It also states plainly that it does not guarantee any feature that uses the data will appear.

A minimal example

For a barber open Tuesday to Saturday, the object would contain: "@context": "https://schema.org", "@type": "HairSalon", the name exactly as on the sign, an address object of type PostalAddress with streetAddress, addressLocality, postalCode and addressCountry, the telephone in international format such as +44 1273 000000, the url of the home page, and an openingHoursSpecification entry with dayOfWeek set to the five days and opens and closes set to 09:00 and 17:30. Add a second entry for days with different hours.

Writing it, step by step

  1. Choose the most specific type from the schema.org list. Use LocalBusiness itself only if nothing narrower fits.
  2. Copy facts from the visible page, not from memory. If the hours aren't on the page, put them there first.
  3. Format the address in parts rather than one string, and include the country code.
  4. Write hours as 24-hour times. Google's documentation explains closing after midnight (a Saturday that closes at 03:00) and seasonal hours with validFrom and validThrough.
  5. Add geo coordinates if you have a fixed location, with at least five decimal places, taken from a map pin on your door rather than the street centre.
  6. Place the block on the page it describes, usually the home page or each location's own page. One business, one block per page.
  7. Test it in Google's Rich Results Test, then fix every error and read the warnings.

What not to claim

Google's structured data policies say markup must describe content visible on the page and must not mislead. In practice:

  • No ratings you collected yourself about yourself. Google recommends review and aggregateRating for this type only on sites that review other businesses. Star ratings for your own business in your own markup won't show and invite trouble.
  • No service areas, prices or hours that aren't on the page.
  • No keyword-stuffed names. Use the trading name, as on your Google Business Profile.
  • No markup on pages blocked by robots.txt or marked noindex. Google can't use what it can't read.

Testing and checking it worked

Rich Results Test
Paste a URL or code. It shows which rich result types the page is eligible for and lists errors per property.
Schema Markup Validator
At validator.schema.org. Checks against the full schema.org vocabulary, including types Google doesn't use for rich results.
URL Inspection
In Search Console, after the page is crawled, it shows which structured data Google detected on the indexed version.

Expect little visible change for a single-location business. The value is mostly in giving search engines and AI tools an unambiguous statement of your details, which also helps keep your Google Business Profile and website consistent.

Common mistakes

  • Copying a generator's output and leaving sample values such as a placeholder phone number or an example street.
  • Two conflicting blocks, one from a theme and one added by hand, with different hours.
  • Hours in 12-hour text like "9am to 5.30pm" instead of 09:00 and 17:30.
  • Forgetting to update it when you move or change hours, so the markup contradicts the page.

Limits on Anticode sites

Pages from Anticode's design engine contain no scripts at all, and Sentinel's checks fail a page with a <script> tag, which includes a JSON-LD block. The code editor also refuses scripts. So you can't add LocalBusiness markup to an Anticode design-engine page today. What you can do is put the same facts in plain text on the page, where both people and crawlers read them, and keep them identical to your profile. If structured data matters to you, the Next.js export is ordinary code where you can add it yourself.

Questions people ask

Does local business schema markup improve rankings?

Google doesn't describe it as a ranking factor. It helps Google understand the page and can make it eligible for some search features, with no guarantee they appear.

JSON-LD, Microdata or RDFa?

All three are supported by Google. JSON-LD is the easiest to maintain because it sits in one block rather than being woven through the HTML.

Do I need it if I have a Google Business Profile?

It isn't required. The profile is what feeds Maps; markup on your site is a second, consistent statement of the same facts.

Sources

  1. Local business (LocalBusiness) structured data (Google Search Central), checked
  2. General structured data guidelines (Google Search Central), checked
  3. LocalBusiness (schema.org), checked