How to fix duplicate meta description on Gatsby
Write a unique, page-specific meta description for every page on your store so Google can display a compelling, accurate snippet for each one in search results.
Steps for Gatsby
- Create a reusable `<Seo>` component at `src/components/Seo.jsx` that uses Gatsby's built-in Head API (Gatsby ≥ 4.19) — export a named `Head` function from every page file instead of using react-helmet, so metadata is rendered server-side.
- In every page file (e.g. `src/pages/index.jsx`, `src/pages/products/[handle].jsx`, `src/templates/product.jsx`, `src/templates/collection.jsx`), export a named `Head` function that calls `<Seo>` with a unique `description` prop derived from that page's own data (product description, collection summary, CMS copy, etc.).
- For programmatic pages created via `gatsby-node.js` / `createPage`, pass the page-specific description through `pageContext` so the template's `Head` export can consume it without an extra GraphQL query.
- Guard against empty or truncated descriptions: strip HTML tags, collapse whitespace, and clamp to 155 characters inside the `<Seo>` component so every rendered tag is clean and within Google's preferred length.
- Run `gatsby build && gatsby serve` and inspect the rendered `<head>` with DevTools or `curl` to confirm every route emits a distinct, non-empty `<meta name='description'>` — no two pages should share the same string.
What is duplicate meta description?
A meta description is a short summary (typically 150–160 characters) that appears beneath your page title in Google search results. When two or more pages share the exact same meta description text, Google detects the duplication and will often rewrite the snippet itself — usually pulling random text from the page — which rarely reflects your best selling points. Unique meta descriptions give each page its own tailored pitch to shoppers who are scanning search results before they click.
Google explicitly recommends unique meta descriptions for every page, and duplicate descriptions are flagged as a quality issue in its SEO guidance. When Google rewrites your snippet with arbitrary on-page text, you lose control of the first impression your store makes in search results — which directly hurts click-through rate (CTR). Lower CTR means fewer visitors even when you rank well, translating to lost revenue. On collection and category pages specifically, a generic description shared across dozens of pages also signals low content differentiation, which can lead Google to consolidate or devalue those pages in its index.
See the complete Duplicate meta description guide for every platform and the full background.
Not sure if your Gatsby store has this?
Run a free SEOLZ scan — we’ll find duplicate meta description and every other issue across your whole site.
Scan my site free