Skip to content
SEO-Wars

Schema and trust

Structured data (JSON-LD): describe your page to machines

JSON-LD structured data tells search engines and AI what your page is: an organization, product, article and more. Valid JSON-LD with a known type earns full points.

Category
Schema and trust
Points available
5 pts
Effort
Medium effort

Why it matters

Structured data makes you eligible for rich results: product stars and prices, breadcrumbs, articles, events and more. These stand out and get more clicks.

It also gives search engines and AI assistants clear facts about your business (name, logo, social profiles), which helps them recognise you as an entity.

How we measure it

We parse every <script type="application/ld+json"> block. A block is valid if it is valid JSON. We collect every @type, including nested ones and @graph items.

Full points need at least one valid block with a recognised schema.org type (such as Organization, LocalBusiness, WebSite, WebPage, Product, Offer, Article, BlogPosting, BreadcrumbList, FAQPage, Event, Recipe or SoftwareApplication). Any invalid block costs one point.

ResultPoints
Valid, with a recognised type5
Recognised type, but another block is invalid4
Valid, but no recognised type3
Only invalid blocks1
No JSON-LD0

How to fix it

  1. Add Organization (or LocalBusiness) and WebSite on the home page.
  2. Add the type that matches each page: Product with Offer on product pages, Article on posts, BreadcrumbList where you show breadcrumbs.
  3. Generate JSON with a JSON encoder (wp_json_encode, JSON.stringify) instead of string templates, to avoid syntax errors.
  4. Validate with Google's Rich Results Test and validator.schema.org.

Copy-paste fixes

HTML
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@type": "Organization",
      "@id": "https://www.example.com/#org",
      "name": "Northpeak",
      "url": "https://www.example.com/",
      "logo": "https://www.example.com/logo.png",
      "sameAs": ["https://www.linkedin.com/company/northpeak", "https://www.instagram.com/northpeak"]
    },
    {
      "@type": "WebSite",
      "name": "Northpeak",
      "url": "https://www.example.com/",
      "publisher": { "@id": "https://www.example.com/#org" }
    }
  ]
}
</script>
WordPressfunctions.php
// Only if no SEO plugin (Yoast, Rank Math) already outputs schema.
add_action( 'wp_head', function () {
    if ( ! is_front_page() ) {
        return;
    }
    $data = array(
        '@context' => 'https://schema.org',
        '@type'    => 'Organization',
        'name'     => get_bloginfo( 'name' ),
        'url'      => home_url( '/' ),
        'logo'     => get_site_icon_url( 512 ),
    );
    echo '<script type="application/ld+json">' . wp_json_encode( $data ) . '</script>' . "\n";
} );
Shopifysections/main-product.liquid
<script type="application/ld+json">
  {{ product | structured_data }}
</script>
Next.jsapp/page.tsx
const jsonLd = {
  "@context": "https://schema.org",
  "@type": "Organization",
  name: "Northpeak",
  url: "https://www.example.com/",
  logo: "https://www.example.com/logo.png",
};

export default function Home() {
  return (
    <>
      <script
        type="application/ld+json"
        dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd).replace(/</g, "\\u003c") }}
      />
      {/* page content */}
    </>
  );
}

Common mistakes

  • Trailing commas or unescaped quotes that make the block invalid JSON.
  • Marking up content that is not visible on the page (fake reviews or FAQs).
  • Two plugins outputting conflicting Organization data.

Test your site now

Put your site against a competitor and see how many of these points you earn, and which fixes pay off first.

Start a duel
← All checksUpdated December 1, 2026
JSON-LD: why it matters and how to fix it · SEO-Wars