Skip to content
Shareglow

Open Graph fixes · Shopify

Fix missing Open Graph tags in Shopify

In Shopify the Open Graph tags live in layout/theme.liquid, which adds the meta tags inside <head> of the Liquid theme layout. Below is the complete snippet plus the one-tag fix for each of the 10 core tags our scanner checks, so you can patch exactly what the scan flagged.

The fix

Add this to layout/theme.liquid

{%- comment -%} layout/theme.liquid, inside <head> {%- endcomment -%}
<meta property="og:title" content="Your page title">
<meta property="og:description" content="A one or two sentence summary of this page.">
<meta property="og:image" content="https://example.com/og.png">
<meta property="og:url" content="https://example.com/page">
<meta name="twitter:card" content="summary_large_image">

Heads up: The snippet is a static example: swap the sample values for per-page Liquid such as {{ page_title }}, {{ page_description | escape }} and {{ canonical_url }}. Remove any existing OG tags first, because themes and SEO plugins often print them already.

  1. Open layout/theme.liquid in your Shopify project.
  2. Paste the snippet and replace the sample title, description, image and URL with your own.
  3. Deploy, then scan the live URL: the scanner re-checks all 10 tags and lists what is still missing.

One tag at a time

Fix a single missing tag in Shopify

title

{%- comment -%} layout/theme.liquid, inside <head> {%- endcomment -%}
<title>Your page title</title>

meta description

{%- comment -%} layout/theme.liquid, inside <head> {%- endcomment -%}
<meta name="description" content="A one or two sentence summary of this page.">

og:title

{%- comment -%} layout/theme.liquid, inside <head> {%- endcomment -%}
<meta property="og:title" content="Your page title">

og:description

{%- comment -%} layout/theme.liquid, inside <head> {%- endcomment -%}
<meta property="og:description" content="A one or two sentence summary of this page.">

og:image

{%- comment -%} layout/theme.liquid, inside <head> {%- endcomment -%}
<meta property="og:image" content="https://example.com/og.png">

og:url

{%- comment -%} layout/theme.liquid, inside <head> {%- endcomment -%}
<meta property="og:url" content="https://example.com/page">

og:type

{%- comment -%} layout/theme.liquid, inside <head> {%- endcomment -%}
<meta property="og:type" content="website">

og:site_name

{%- comment -%} layout/theme.liquid, inside <head> {%- endcomment -%}
<meta property="og:site_name" content="Your site name">

twitter:card

{%- comment -%} layout/theme.liquid, inside <head> {%- endcomment -%}
<meta name="twitter:card" content="summary_large_image">

twitter:image

{%- comment -%} layout/theme.liquid, inside <head> {%- endcomment -%}
<meta name="twitter:image" content="https://example.com/og.png">

Check the Shopify fix on a live URL

FAQ

Common questions

Where do Open Graph tags go in Shopify?

In layout/theme.liquid. The snippet adds the meta tags inside <head> of the Liquid theme layout.

Which Open Graph tags does Shopify need?

At minimum og:title, og:description, og:image and og:url, plus twitter:card. The scanner checks 10 tags in total: title, meta description, og:title, og:description, og:image, og:url, og:type, og:site_name, twitter:card, twitter:image.

How do I confirm the Shopify fix worked?

Deploy, paste the live URL into the free scanner, and check that every tag above passes. The simulator then draws the card for 30 platforms.