Skip to content
Understanding

Open Graph tags for your store

· 4 min read
Short answer

Add og:title, og:image and og:url meta tags to your homepage <head>, set og:url to exactly the same URL as your canonical link, and add og:description and og:type while you are there.

Why it matters

The Open Graph protocol turns a web page into a structured object with a title, type, image and canonical URL. Messaging apps, social networks and other tools that preview links read these tags first; without them, each tool guesses from the page and the preview is often wrong or empty.

The protocol lists four required properties: og:title, og:type, og:image and og:url, where og:url is the canonical URL used as the object’s permanent ID. og:description and og:site_name are optional but give a better preview.

When og:url and the <link rel="canonical"> disagree, even by http versus https or a trailing slash, tools that read both get two different answers for the page’s identity.

We read your homepage. The check fails when og:title, og:image and og:url are all missing, needs work when one or two are missing or when og:url differs from the canonical URL, and passes otherwise.

How to fix it

  1. See which tags you have

    List every og: property in the server HTML.

    shell
    curl -sL https://your-domain.com/ | grep -i -o -E '<meta[^>]*property="og:[^"]*"[^>]*>|<link[^>]*rel="canonical"[^>]*>'

  2. Add the core tags

    Use absolute URLs. Facebook recommends also giving og:image:width and og:image:height so the image renders on the first share.

    HTML
    <link rel="canonical" href="https://your-domain.com/">
    <meta property="og:type" content="website">
    <meta property="og:site_name" content="Example Linen Co.">
    <meta property="og:title" content="Example Linen Co. | Linen bags and table linen">
    <meta property="og:description" content="Linen totes, aprons and table linen made in Portugal.">
    <meta property="og:url" content="https://your-domain.com/">
    <meta property="og:image" content="https://your-domain.com/assets/og-home.jpg">
    <meta property="og:image:width" content="1200">
    <meta property="og:image:height" content="630">

  3. Make og:url match the canonical

    Generate both from the same value in your template, so protocol, host and trailing slash never drift apart.

  4. Use your platform’s settings

    Most Shopify themes output Open Graph tags from the homepage title, description and the social sharing image set in the theme or Online Store preferences. On WordPress, SEO plugins output them from their social settings. Check the result in the HTML rather than trusting the setting.

How to verify

  • Run the free check at citeto.com/check. The social previews item lists missing tags and flags an og:url that differs from the canonical.

  • Paste the URL into Facebook’s Sharing Debugger to see the parsed tags and force a fresh scrape after changes.

Common pitfalls

  • Using name="og:title" instead of property="og:title". The protocol uses the property attribute.

  • A relative image path such as /og.jpg. Use a full URL.

  • Changing the image but keeping the same URL. Facebook caches images by URL, so the old preview keeps showing until the URL changes or you rescrape.

FAQ

Open Graph tags are part of the page’s HTML head, so any tool that reads the page can use them; vendors do not publish how much weight they give them. The reliable benefit is consistent link previews wherever your URL is shared, including inside chat apps.

Our check reads the homepage, but product pages are the URLs shoppers share most. Use the product name for og:title, the main product photo for og:image and the product’s canonical URL for og:url.

Sources

  1. [1]The Open Graph protocologp.me
  2. [2]Meta for Developers: Webmasters guide to sharingdevelopers.facebook.com
Open Graph tags for your store