squirrelscan
GitHub

LocalBusiness schema: required name, address or areaServed

LocalBusiness markup with no name, an incomplete PostalAddress, or neither an address nor a service area. squirrel checks all three.

What LocalBusiness schema is

LocalBusiness is the schema.org subtype of Organization for a business a customer can reach in the physical world. Beyond name and url it carries address as a PostalAddress, telephone, openingHours, geo coordinates and priceRange. Subtypes such as Restaurant, Dentist and AutoRepair inherit all of it and narrow the category.

A business with a storefront declares its address. A business that travels to customers and has no public address declares areaServed instead, naming the places it covers as text, as a Place, or as a GeoShape. Google’s LocalBusiness reference lists address and name as the required properties and does not document the service-area alternative.

What squirrel checks

The rule flattens the page’s JSON-LD, including any @graph wrapper, and takes the first node whose @type is one of the recognised LocalBusiness types. It emits one to four checks:

  • local-business-schema: reports at info status with the message No LocalBusiness schema found when no such node exists. No further checks run.
  • local-business-required: warns with the message LocalBusiness schema missing required properties and lists the missing names as items. The required set here is name alone. When it is present the check passes with LocalBusiness schema has required properties.
  • local-business-address: emitted only when an address is present and no entry in it is complete. It warns with the message Address incomplete and lists whichever of streetAddress, addressLocality and postalCode the first entry is missing. A single PostalAddress wrapped in an array is unwrapped, and nothing is emitted when any entry is complete.
  • local-business-location: emitted only when no address is present. It passes with the message Service-area business detected: areaServed declared, no public address required when areaServed or the legacy serviceArea names somewhere. Otherwise it warns with the message LocalBusiness schema has no address or service area and a value spelling out both fixes.
  • local-business-geo: emitted only when geo is absent, at info status, with the message LocalBusiness missing geo coordinates and the value Add GeoCoordinates for map placement.
  • local-business-recommended: emitted only when at least one of telephone, openingHours, image and priceRange is absent, at info status, with the message LocalBusiness could include recommended properties.

The address and location checks are mutually exclusive, so at most one of them appears. Every property test is a truthiness test rather than a presence test, so a property present but empty, 0 or false counts as missing. squirrel deliberately does not require address, which is where it differs from Google’s reference. A service-area business that declares areaServed passes here. The declaration may be plain text such as Sydney NSW, an array of values, a structured Place, GeoShape or AdministrativeArea node, or an @id reference to one elsewhere in the graph, which the rule resolves before accepting it. An address set to an empty array counts as no address, so the service-area path applies.

The whole rule is skipped, with the reason shown in the report, when the site profile says the site is not a local business.

An address written as a node reference, {"@id": "…#address"}, is read from the PostalAddress node with that @id anywhere in the page’s JSON-LD. A relative @id resolves against the page URL. A reference to a node the page does not have counts as an incomplete address.

How to fix it

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Plumber",
  "name": "Acme Plumbing",
  "url": "https://example.com/",
  "telephone": "+14155550142",
  "areaServed": [
    { "@type": "City", "name": "San Francisco" },
    { "@type": "City", "name": "Oakland" }
  ]
}
</script>

Put it in the <head> of the homepage or the location page, and use a storefront address with streetAddress, addressLocality and postalCode instead of areaServed when the business has a public address.

The common false positive is an informal address written as one string. The subfield check still runs on it and reports all three subfields as missing, because a plain string has no streetAddress to read.

Rule IDschema/local-business
CategoryStructured Data
ScopePer-page
Severitywarning
Weight6/10

Enable / disable

Disable this rule

[rules]
disable = ["schema/local-business"]

Disable all Structured Data rules

[rules]
disable = ["schema/*"]

Enable only this rule

[rules]
enable = ["schema/local-business"]

enable replaces the default ["*"], so this is the only rule selected. Leave disable out: a rule that matches any disable pattern is skipped even when enable names it. Only an enabled setting under a rule’s own [rule_options] table overrides both lists.

Structured data findings ship in every audit next to the core SEO, performance and agent experience rules. See Fix SEO issues with AI for how an agent works through a report.

References

Check your site

Run squirrel audit https://example.com and open the Structured Data section of the report. Missing address subfields are listed by name. Signed-out local audits need no account and cost nothing. Signed-in audits spend credits.

Type to search…

↑↓ navigate↵ openesc close