# Home page, product/service pages, and blog posts include valid JSON-LD structured data

- **Pattern:** `ab-002487` (`seo-advanced.structured-data.jsonld-present`)
- **Severity:** critical
- **Lifecycle:** active
- **Last modified:** 2026-04-18
- **Canonical URL:** https://auditbuffet.com/patterns/ab-002487
- **License:** CC-BY-4.0 — attribute to AuditBuffet Pattern Catalog (https://auditbuffet.com/patterns/ab-002487)

## Why it matters

Missing JSON-LD structured data leaves search engines without machine-readable signals to understand your content type, organization identity, or page purpose. Google's Rich Results — star ratings, FAQ dropdowns, sitelinks search boxes — are only available to pages with valid schema.org markup. Without it, your content competes on raw text signals alone, systematically losing SERP features to competitors who implement schema-org Organization and WebPage schemas. This is a direct findability penalty, not a cosmetic gap.

## Severity rationale

Critical because all Rich Results eligibility and schema.org knowledge-graph signals depend on JSON-LD being present and syntactically valid; absence forfeits the entire structured-data surface.

## Remediation

Add a `<script type="application/ld+json">` block to `app/layout.tsx` (for site-wide Organization schema) and to each page type's `page.tsx` for content-specific types. In Next.js App Router, embed it via a `<script>` tag in the returned JSX:

```tsx
// app/page.tsx — home page Organization schema
export default function HomePage() {
  const schema = {
    '@context': 'https://schema.org',
    '@type': 'Organization',
    name: 'Your Company',
    url: 'https://yoursite.com',
    logo: 'https://yoursite.com/logo.png',
  }
  return (
    <>
      <script
        type="application/ld+json"
        dangerouslySetInnerHTML={{ __html: JSON.stringify(schema) }}
      />
      {/* page content */}
    </>
  )
}
```

Repeat with `BlogPosting` on blog routes and `Product` on product pages. Validate output with the Google Rich Results Test before deploying.

## Detection

- **ID:** `jsonld-present`
- **Severity:** `critical`
- **What to look for:** Count all `<script type="application/ld+json">` tags across the home page, every product/service listing page, and every blog post or article page. For each tag found, parse the JSON content and verify it contains both a `@context` and `@type` field. If using a client-side SPA, verify schema is rendered server-side by inspecting the raw HTML source before JavaScript execution.
- **Pass criteria:** At least 3 page types (home, product/service, blog) each contain at least 1 valid JSON-LD block with `@context` set to `https://schema.org` and a non-empty `@type` field. Report: "X of Y page types have valid JSON-LD."
- **Fail criteria:** Any of the 3 page types lacks JSON-LD schema, or the JSON-LD present is syntactically invalid (JSON parse error), or `@context` or `@type` is missing.
- **Do NOT pass when:** JSON-LD blocks exist but contain only empty objects `{}` or placeholder values like `"TODO"` or `"Your Company"`.
- **Skip (N/A) when:** The project has no pages matching these categories (e.g., API-only project with no public pages, or a portfolio site with no products, services, or blog).
- **Cross-reference:** For foundational meta tags and canonical URLs that complement structured data, the SEO Fundamentals audit covers these in detail. For schema validation depth, see the `structured-data-valid` check in the Crawlability category.
- **Detail on fail:** Specify which page types lack JSON-LD. Example: `"2 of 3 page types have JSON-LD — product pages lack structured data"` or `"Home page JSON-LD is syntactically invalid (missing closing brace)"`.
- **Remediation:** JSON-LD helps search engines understand your content structure and eligibility for Rich Results. Add `<script type="application/ld+json">` tags to your page `<head>` or body. For Next.js in `app/page.tsx`:

  ```tsx
  // app/page.tsx
  import { Metadata } from 'next'

  export const metadata: Metadata = {
    other: {
      'ld+json': JSON.stringify({
        '@context': 'https://schema.org',
        '@type': 'Organization',
        name: 'Your Company',
        url: 'https://yoursite.com',
        logo: 'https://yoursite.com/logo.png',
      }),
    },
  }
  ```

  Or use a dedicated schema library like `next-seo` or manually render `<script>` tags in your `app/layout.tsx`.

## External references

- schema-org Organization
- schema-org WebPage

Taxons: findability

HTML version: https://auditbuffet.com/patterns/ab-002487
