How to fix missing og description on Gatsby

Add an og:description meta tag to every page so that social media platforms display a compelling, accurate preview when your pages are shared.

Steps for Gatsby

  1. Create (or open) a reusable SEO component at `src/components/Seo.jsx`. This component will use Gatsby's built-in Head API (Gatsby 4.19+) to inject tags into `<head>` — no extra library needed.
  2. Accept a `description` prop (plus `title`, `image`, `pathname`) in the component and render an `og:description` `<meta>` tag alongside the standard `description` tag so both are always in sync.
  3. In every page file (e.g. `src/pages/index.jsx`, `src/pages/products/{Product.handle}.jsx`, template files in `src/templates/`) export a named `Head` function that renders `<Seo>` with the page-specific description pulled from your GraphQL page query or CMS data.
  4. For dynamic pages (product, collection, blog templates), wire the `description` prop to the real content field from your GraphQL query — e.g. `data.product.seo.description || data.product.description` — so every URL gets a unique, non-empty value.
  5. Run `gatsby develop` and inspect the HTML source (`view-source:http://localhost:8000/`) or the Elements panel to confirm both `<meta name='description'>` and `<meta property='og:description'>` are present with the correct value on every route.
  6. Optionally add a fallback `siteMetadata.description` in `gatsby-config.js` and fetch it with a `useStaticQuery` hook inside the Seo component so pages that forget to pass a `description` prop never ship an empty tag.
Official Gatsby documentation ↗

What is missing og description?

The og:description tag is a small piece of HTML code placed in the `<head>` of your page that tells social networks — Facebook, Pinterest, LinkedIn, X (Twitter), WhatsApp, and others — what text to show beneath your page title when someone shares your link. It is part of the Open Graph protocol, a standard created so websites can control exactly how their content appears in social previews. Without it, social platforms will either grab random text from your page or show nothing at all, resulting in ugly, unhelpful link previews. It is separate from (but related to) your regular HTML meta description.

When a customer or influencer shares your product or collection page on social media, the preview card is often the first impression a potential buyer sees — before they even visit your store. A missing og:description means the platform guesses what to show, often pulling in irrelevant text like navigation labels, price fragments, or nothing at all, which dramatically reduces click-through rates. Rich, controlled social previews directly drive referral traffic and conversions, especially for product launches, promotions, and influencer marketing. There is also an indirect SEO benefit: higher engagement signals from social traffic can reinforce the authority of your pages in search rankings.

See the complete Missing og 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 missing og description and every other issue across your whole site.

Scan my site free

Fix missing og description on another platform