Schema markup (JSON-LD) that is missing, broken or incomplete
Add a JSON-LD block to your home page that describes your business: Organization, or the most specific LocalBusiness type if customers visit you. Include at least name, url, logo and sameAs links to your official profiles, plus a full address for a local business. Then test the live page in Google's Rich Results Test and the Schema Markup Validator and fix every error they report.
Why it matters
Structured data states facts about a page in the schema.org vocabulary, so search engines do not have to work them out from the design. Google supports three formats, JSON-LD, microdata and RDFa, says all three are equally fine when the markup is valid, and recommends JSON-LD: a <script type="application/ld+json"> element that sits apart from the visible text, in the <head> or the <body>, which Google calls the easiest for site owners to implement and maintain at scale.
On the home page, Organization markup gives Google your business's name, website, logo, contact details and official profiles elsewhere. Google says it uses this to understand your organization and tell it apart from others, and that some of it can influence the logo shown in results and your knowledge panel. A business customers visit is a LocalBusiness, which schema.org defines as a kind of Organization, and Google asks for the most specific type, such as Dentist or Plumber. Google also says it does not guarantee that any feature will appear.
Broken markup earns nothing. A block that is not valid JSON cannot be read at all. Google says items missing a required property are not eligible for rich results. Its documentation asks for some values in set forms, such as dates in ISO 8601, and SERPCompass treats a value in another form as lost. And JSON-LD is case-sensitive, so Organisation or adress is not a schema.org term at all. SERPCompass reports these four problems as warnings.
SERPCompass reads the structured data on every page it crawls, in all three formats. The properties we call required are the ones Google requires, such as name and address for a LocalBusiness. The recommended ones are our own pick from Google's documentation: name, url and logo for an Organization, and telephone, opening hours and geo coordinates for a LocalBusiness. A site with no markup, a home page with markup but no Organization or LocalBusiness, and missing recommended properties are notices: worth fixing, rarely urgent.
For other types, a finding's details name the type and the property, such as Product and offers; Google's page for that type, linked from its search gallery, lists what it requires. Google documents what it does with structured data in Search; we do not promise any particular effect in AI answers.
The audit findings this guide fixes: No structured data on the site; Home page has no Organization or LocalBusiness schema; Structured data that cannot be parsed; Structured data missing required properties; Structured data missing recommended properties; Structured data with invalid property values; Misspelled schema.org types or properties.
Find every page with this problem
Run the free scan on your domain. It reads the structured data on every page it crawls, in JSON-LD, microdata or RDFa, checks whether the home page describes your business, and shows your most urgent findings with the number of pages each affects; the Gap Report and a SERPCompass workspace list the affected pages with the details: the parse error, the missing property, the invalid value or the misspelled name. To check one page by hand, test its live URL in Google's Rich Results Test and in the Schema Markup Validator, or view the page source and search for application/ld+json.
How to fix it on your platform
WordPress (no SEO plugin)
- View your home page's source and search for
application/ld+json. If your theme or a plugin already prints an Organization block, change it there instead of adding a second one that may disagree with it. - Work in a child theme, so the next update of your theme does not remove your code.
- In the child theme's
functions.php, hook a function to thewp_headaction, which prints into the page's<head>, and make it return early unlessis_front_page()is true. - In that function, build your markup as a PHP array and print it inside a
<script type="application/ld+json">element withwp_json_encode(). The WordPress example further down shows the whole function. - Test the live home page in the Rich Results Test and fix any error it reports.
Sources: Child themes (WordPress theme handbook); wp_head (WordPress developer reference); is_front_page() (WordPress developer reference); wp_json_encode() (WordPress developer reference); home_url() (WordPress developer reference); Test your structured data (Google Search Central).
WordPress with Yoast SEO
- In the WordPress menu, click Yoast SEO, then Settings, and open Site representation.
- Choose Organization. Yoast says to choose it for a local business too.
- Enter your organization's name and upload its logo. Yoast's developer documentation says it leaves the Organization out of its markup when the name, URL or logo is missing.
- Add your official profiles: click Add another profile and enter each profile's URL. Yoast adds them to the Organization as
sameAs. - Click Save changes.
- For a business customers visit, Yoast's Local SEO plugin, which Yoast includes with Yoast SEO Premium, uses your primary location's details to output structured data for your business: set them under Yoast SEO, then Local SEO.
- Do not add a hand-written Organization block as well: Yoast already prints its Organization on every public page.
Sources: Yoast SEO settings: Site representation (Yoast); Schema piece: Organization (Yoast developer portal); Configuration guide for Local SEO (Yoast).
WordPress with Rank Math
- Go to Rank Math SEO, then Dashboard, turn on the Local SEO module and click its Settings button.
- On the Local SEO tab (Rank Math SEO, then Titles & Meta, then Local SEO), choose Organization.
- Fill in Person/Organization Name, Logo (Rank Math recommends a square image of at least 112 by 112 pixels), URL, Email, Address and Phone Number.
- For a business customers visit, choose the most specific Business Type and fill in Opening Hours.
- Click Save Changes.
- Open the Social Meta tab under Titles & Meta and enter your official profile URLs in Additional Profiles, one per line: Rank Math adds them to the Organization as
sameAs. Save again. - Test the live home page: in the Rich Results Test, enter its URL and click Test URL.
Sources: How to add Organization schema using Rank Math (Rank Math); Using Rank Math's Local SEO module (Rank Math); Titles and Meta options and settings (Rank Math); Test your structured data (Google Search Central).
Shopify
- Make a backup first: in your Shopify admin, go to Online Store, click the … button beside your theme and click Duplicate.
- View your home page's source and search for
application/ld+json. If your theme already prints an Organization block, edit that one instead of adding a second. - Go to Online Store, click the … button beside your theme and click Edit code.
- Open
theme.liquidin thelayoutfolder. It is the theme's default layout, which the store's templates render inside, so wrap your markup in{% if request.page_type == 'index' %}and{% endif %}to print it on the home page only. - Paste the wrapped
<script type="application/ld+json">block just before</head>and click Save. The Shopify example further down shows the whole block. - Test the live home page in the Rich Results Test. Shopify removes your code changes from the updated copy when a theme update cannot keep them, so test again after every theme update.
Sources: Duplicating themes (Shopify Help Center); Editing theme code (Shopify Help Center); Layouts (Shopify developer documentation); The request object (Shopify Liquid reference); Test your structured data (Google Search Central).
Wix
- Open your site in the editor and click Pages & Menu on the left.
- Click the More Actions icon next to your home page and click SEO basics.
- Click the Advanced SEO tab, click Structured Data Markup, then click +Add New Markup.
- Paste your JSON-LD under Write your markup in JSON-LD format. Wix accepts JSON-LD only, under 7,000 characters, and up to five markups per page.
- Click Apply, then Publish at the top right of the editor.
- Test the live home page in the Rich Results Test.
Sources: Adding structured data markup to your site's pages (Wix Help Center); Adding SEO title tags and meta descriptions to your pages (Wix Help Center); Test your structured data (Google Search Central).
Squarespace
- Keep your business details complete: open the Settings panel, click Selling, then Business Information, fill in the phone number, email, physical location and business hours, and click Save. Squarespace writes Organization, Local business and Website structured data itself, which you cannot edit or remove, and does not document which settings feed it.
- Test the live home page in the Rich Results Test and the Schema Markup Validator to see what Squarespace's markup holds, and note what it leaves out, such as your logo or your profiles elsewhere.
- To add what is missing, on a plan with code injection (Core, Plus, Advanced and some legacy plans): in the Pages panel, hover over the home page, click the gear icon, choose Advanced, paste your
<script type="application/ld+json">block into Page Header Code Injection and click Save. Give it the same name and URL as Squarespace's markup, so both describe one business. - Test the live home page again.
Sources: How does Squarespace optimize my site for search results? (Squarespace Help Center); Business Information settings (Squarespace Help Center); Customize parts of your site with code injection (Squarespace Help Center); Test your structured data (Google Search Central).
Webflow
- In the Designer, open the Pages panel and click the settings icon next to your home page.
- Scroll to the Schema markup section and paste your JSON-LD into the Schema markup field. The field needs a paid Site plan or a paid Workspace. Webflow AI can generate the markup instead: check every fact it writes against your page.
- Keep the markup in one place: if the page's custom code already holds the same JSON-LD, remove it there, so the page does not carry two copies.
- Save the page settings and publish the site: the markup appears in the head of the published page.
- Test the live home page in the Rich Results Test.
Sources: Add schema markup in Webflow to improve SEO and AEO (Webflow Help Center); Test your structured data (Google Search Central).
Plain HTML
- Write the markup for your business (the examples below are a starting point) and put it inside a
<script type="application/ld+json">element in the home page's<head>. Google reads it in the<body>too. - Keep the data inside the element: a data block cannot load from a
srcfile. - Spell every type and property exactly as schema.org does, starting with
"@context": "https://schema.org": JSON-LD is case-sensitive. - Write values in the forms Google asks for: full URLs, the telephone with country and area codes,
addressCountryas a two-letter country code such asIN, and dates in ISO 8601 such as2019-03-15. - Upload the page, then test its live URL in the Rich Results Test and the Schema Markup Validator.
Sources: Introduction to structured data markup in Google Search (Google Search Central); Data blocks in the script element (HTML Standard, WHATWG); Syntax tokens and keywords (JSON-LD 1.1, W3C); Organization structured data (Google Search Central); Local business structured data (Google Search Central); Test your structured data (Google Search Central).
Examples
-
Good
<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Organization", "name": "Corner Plumbing", "url": "https://www.example.com/", "logo": "https://www.example.com/images/logo.png", "sameAs": [ "https://www.example.net/cornerplumbing", "https://www.example.org/company/corner-plumbing" ] } </script>The four properties SERPCompass looks for on a home page.
sameAslists your official profiles elsewhere, such as LinkedIn or Instagram, one full URL each. Google asks for a logo of at least 112 by 112 pixels at a URL it can crawl. -
Good
<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Plumber", "name": "Corner Plumbing", "url": "https://www.example.com/", "logo": "https://www.example.com/images/logo.png", "telephone": "+91-422-000-0000", "address": { "@type": "PostalAddress", "streetAddress": "12 Example Road, RS Puram", "addressLocality": "Coimbatore", "addressRegion": "Tamil Nadu", "postalCode": "641002", "addressCountry": "IN" }, "geo": { "@type": "GeoCoordinates", "latitude": 11.00813, "longitude": 76.95021 }, "openingHoursSpecification": [ { "@type": "OpeningHoursSpecification", "dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], "opens": "08:00", "closes": "20:00" } ], "sameAs": ["https://www.example.net/cornerplumbing"] } </script>A business customers visit: the most specific type (
Plumberis a LocalBusiness), Google's requirednameandaddress, the telephone with country and area codes, coordinates to five decimal places and the opening hours. Every fact here must also appear on the page. -
Good
// In your child theme's functions.php add_action( 'wp_head', function () { if ( ! is_front_page() ) { return; } $data = array( '@context' => 'https://schema.org', '@type' => 'Organization', 'name' => 'Corner Plumbing', 'url' => home_url( '/' ), 'logo' => 'https://www.example.com/images/logo.png', 'sameAs' => array( 'https://www.example.net/cornerplumbing' ), ); echo '<script type="application/ld+json">' . wp_json_encode( $data ) . '</script>' . "\n"; } );WordPress with no SEO plugin: prints the block in the home page's
<head>only.wp_json_encode()writes valid JSON, so a stray quote or comma in a value cannot break it. -
Good
{% if request.page_type == 'index' %} <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Organization", "name": "Corner Plumbing", "url": "https://www.example.com/", "logo": "https://www.example.com/images/logo.png", "sameAs": ["https://www.example.net/cornerplumbing"] } </script> {% endif %}Shopify: pasted just before
</head>inlayout/theme.liquid; theifkeeps it to the home page. -
Bad
<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Organization", "name": "Corner Plumbing", "url": "https://www.example.com/", } </script>The comma after the last property makes this invalid JSON, so nothing in the block can be read. Curly quotes pasted from a word processor do the same.
-
Bad
{ "@context": "https://schema.org", "@type": "Organisation", "Name": "Corner Plumbing", "adress": "12 Example Road, Coimbatore" }Valid JSON, but
Organisation,Nameandadressare not schema.org terms. The vocabulary spells themOrganization,nameandaddress, and the case matters. -
Bad
{ "@context": "https://schema.org", "@type": "Organization", "name": "Corner Plumbing", "foundingDate": "15th March 2019", "telephone": "0422 000 0000" }foundingDatemust be an ISO 8601 date (2019-03-15), and Google asks for the telephone with country and area codes (+91-422-000-0000). -
Bad
{ "@context": "https://schema.org", "@type": "Plumber", "name": "Corner Plumbing", "aggregateRating": { "@type": "AggregateRating", "ratingValue": "4.9", "reviewCount": "212" } }A rating of your own business in your own markup: Google says such pages are not eligible for review stars. The
addressGoogle requires for a LocalBusiness is missing too.
Common mistakes
- Marking up facts the page does not show, such as an address or opening hours that appear nowhere on it. Google's guidelines say not to mark up content readers cannot see.
- Leaving a generator's sample values in place:
example.com, a placeholder phone number or a stock logo URL. - Two Organization blocks that disagree, typically one from the theme, one from an SEO plugin and one pasted by hand. Keep one source, or make every copy say the same thing.
- Editing the JSON in a word processor, which turns straight quotes into curly ones and makes the block invalid. Use a plain text or code editor.
- A trailing comma after the last property, or a missing comma between two: either makes the whole block unreadable.
- British spellings and wrong capitals:
Organisation,localBusiness,Address. schema.org spells themOrganization,LocalBusinessandaddress. - Using plain
LocalBusinesswhen a more specific type fits, such asDentist,RestaurantorPlumber: Google asks for the most specific one. - Adding ratings of your own business, which Google does not show as stars.
- A logo smaller than 112 by 112 pixels, or one at a URL that robots.txt blocks: Google asks for at least that size at a URL it can crawl and index.
- Testing only pasted code. Test the live URL as well: it shows what the published page really carries, and Google recommends the URL test for markup added by scripts.
- Changing the phone number or opening hours on the page and forgetting the markup.
Questions and answers
Should I use Organization or LocalBusiness?
Use LocalBusiness, in its most specific type such as Dentist, Plumber or Restaurant, when customers visit you at a physical address; schema.org defines it as a particular physical business or branch of an organization, and it is itself a kind of Organization. Use Organization when there are no premises customers visit; Google suggests OnlineStore for an online shop. Pick one type for your business rather than marking it up twice.
Does schema markup need to be on every page?
No. Google asks for Organization markup on the home page or on one page that describes the organization, such as an about page, and says it does not need to be on every page. SERPCompass looks for it on the home page. Some SEO plugins, such as Yoast SEO, print it on every page as part of their own markup; if yours does, keep every copy identical.
What is the difference between the Rich Results Test and the Schema Markup Validator?
Google's Rich Results Test shows which Google rich results your markup can produce, with the errors that stop them, and fetches the page the way Google's testing crawler does. The Schema Markup Validator checks any schema.org markup against the vocabulary itself, without Google's feature rules. Use both: the first for what Google can show, the second for misspelled terms and types Google has no rich result for.
Why does Google not show my logo after I added the markup?
Google does not guarantee it will use the markup. Check that the logo is at least 112 by 112 pixels, in a format Google Images supports, at a URL robots.txt does not block; that the home page is not blocked or marked noindex; and that Google has crawled the page since your change, which the URL Inspection tool in Search Console shows. Google says crawling and indexing can take several days.
Can I add star ratings to my own business markup?
Not for stars in Google. Google says that when a business controls the reviews about itself, its pages with LocalBusiness or other Organization markup are not eligible for review stars. Leave aggregateRating and review out of your own business markup unless your site collects reviews of other businesses.
More guides
- Open Graph and Twitter/X card tags that are missing
- robots.txt that blocks search or AI crawlers, is missing or has errors
- All guides
- Free tools: checks for robots.txt and llms.txt that need no account.
Sources
- Introduction to structured data markup in Google Search (Google Search Central)
- General structured data guidelines (Google Search Central)
- Organization structured data (Google Search Central)
- Local business structured data (Google Search Central)
- Test your structured data (Google Search Central)
- Review snippet structured data (Google Search Central)
- Structured data markup that Google Search supports (Google Search Central)
- Generate structured data with JavaScript (Google Search Central)
- Rich Results Test (Google)
- Use the Rich Results Test (Search Console Help)
- Schema Markup Validator (schema.org)
- Schema.org Markup Validator documentation (schema.org)
- Organization (schema.org)
- LocalBusiness (schema.org)
- sameAs (schema.org)
- Syntax tokens and keywords (JSON-LD 1.1, W3C)
- Data blocks in the script element (HTML Standard, WHATWG)
- wp_head (WordPress developer reference)
- is_front_page() (WordPress developer reference)
- wp_json_encode() (WordPress developer reference)
- home_url() (WordPress developer reference)
- Child themes (WordPress theme handbook)
- Yoast SEO settings: Site representation (Yoast)
- Schema piece: Organization (Yoast developer portal)
- Configuration guide for Local SEO (Yoast)
- How to add Organization schema using Rank Math (Rank Math)
- Using Rank Math's Local SEO module (Rank Math)
- Titles and Meta options and settings (Rank Math)
- Duplicating themes (Shopify Help Center)
- Editing theme code (Shopify Help Center)
- Layouts (Shopify developer documentation)
- The request object (Shopify Liquid reference)
- Adding structured data markup to your site's pages (Wix Help Center)
- Adding SEO title tags and meta descriptions to your pages (Wix Help Center)
- How does Squarespace optimize my site for search results? (Squarespace Help Center)
- Business Information settings (Squarespace Help Center)
- Customize parts of your site with code injection (Squarespace Help Center)
- Add schema markup in Webflow to improve SEO and AEO (Webflow Help Center)
Start with a free scan of your site.
Two to five minutes, no account. You get your three most urgent findings, and the exact count of everything else.