How to fix missing schema webpage on Gatsby

Add WebPage schema markup to every page so search engines and AI answer engines can precisely understand and describe your content.

Steps for Gatsby

  1. Create (or open) a reusable SEO component at `src/components/Seo.jsx`. This component will use Gatsby's *Head API* (exported `Head` function, available in Gatsby v4.19+) to inject JSON-LD `<script>` tags — no third-party helmet library needed.
  2. Inside `Seo.jsx`, compose two JSON-LD objects: a `WebPage` schema (using props like `title`, `description`, `url`, and `breadcrumb`) and an `Organization` schema (using your site's name, logo URL, and canonical URL). Merge them into a JSON-LD `<script type='application/ld+json'>` tag.
  3. Pull global site metadata (name, siteUrl, logo, social links) from `gatsby-config.js` via a `useSiteMetadata` custom hook that calls Gatsby's `useStaticQuery` + `graphql` — this keeps values DRY and sourced from one place.
  4. In every page file (e.g. `src/pages/index.jsx`, `src/pages/products/[handle].jsx`, collection pages, blog posts, etc.) export a named `Head` function that renders `<Seo />` with the page-specific props. Gatsby automatically hoists whatever the `Head` export returns into `<head>`.
  5. For dynamic/template pages created via `gatsby-node.js` (`createPage`), pass `title`, `description`, `url`, and optional `breadcrumb` through the page's `pageContext` so the template's `Head` export can forward them to `<Seo />`.
  6. Run `gatsby build && gatsby serve`, open DevTools → View Page Source, and confirm `<script type='application/ld+json'>` blocks containing `@type: WebPage` and `@type: Organization` appear in the static HTML of every page. Validate with Google's Rich Results Test or schema.org validator.
Official Gatsby documentation ↗

What is missing schema webpage?

Schema markup is a small block of invisible, structured code you add to a web page that tells search engines and AI systems exactly what the page is — its title, description, URL, and type. The `WebPage` schema type is the foundational label that says "this is a web page, here is its name, here is what it's about." Without it, search engines and AI tools have to guess this information by reading your page like a human would, which is less reliable. Think of it like a name tag for your page that any machine can instantly read.

Adding `WebPage` schema directly supports Answer Engine Optimization (AEO) — the emerging discipline of making your content eligible to be quoted or cited by AI assistants like Google's AI Overviews, ChatGPT, and Bing Copilot. AI systems rely heavily on structured data to identify authoritative, trustworthy sources to pull answers from; a missing `WebPage` schema means your pages are less likely to be chosen. It also strengthens your baseline for rich results eligibility and helps Google correctly index and understand every page on your site, which supports rankings and organic traffic. For ecommerce stores in particular, this can mean more product pages, category pages, and content pages surfacing in both traditional search results and AI-generated answers.

See the complete Missing schema webpage guide for every platform and the full background.

Not sure if your Gatsby store has this?

Run a free SEOLZ scan — we’ll find missing schema webpage and every other issue across your whole site.

Scan my site free

Fix missing schema webpage on another platform