How to Fix Open Graph Tags in Shopify
Shopify outputs OG tags automatically from product images, collection images and page content — but the defaults often miss: products without featured images, low-resolution OG images, inconsistent branding. This guide covers Shopify-specific OG workflow. Pair with OG generator guide and social previews.
Step-by-step: How to fix Shopify Open Graph tags
- Audit current OG output. View source on 5 URLs. Check og:title, og:description, og:image, og:url, og:type. Most Shopify themes output complete OG; problems are usually content (wrong image, missing description).
- Set OG image fallback. Theme settings → Social → upload default OG image (1200x630). Used when a page has no specific image (e.g., contact, about). Branded fallback ensures consistent social previews.
- Verify per-product OG image. Each product's OG image is its featured image. Audit products: every active product should have a featured image (Image tab in product editor). Products without images use the fallback — set above.
- Override per-page where needed. For special landing pages, use theme.liquid conditionals or apps to set specific OG tags. Smart SEO has per-page OG override.
- Set per-collection OG image. Collections also have an image field — used as OG image for collection page. Ensure every active collection has an image.
- Test with Facebook Sharing Debugger. developers.facebook.com/tools/debug. Paste URL. Check rendering. 'Scrape Again' button refreshes Facebook's cache after changes.
- Test Twitter Card and LinkedIn. cards-dev.twitter.com/validator, linkedin.com/post-inspector. Different platforms cache differently. Refresh each after OG changes.
The cache is the problem, not the tags
Before changing anything, know the mechanism that produces almost every OG complaint — because otherwise you will fix the tags, see no change, and conclude the fix did not work.
These platforms fetch your page once, when a link is first shared, and keep what they found. They do not come back. So the moment a customer shares a product URL, whatever your page said at that instant becomes the preview everybody else sees — and editing the markup afterwards changes nothing, because nothing is reading your page any more.
How long does that last? Nobody outside those companies knows; none of them publishes a cache duration, and the specific figures that circulate are community guesses. The practical consequence is the same whatever the true number is: assume the cache is long, assume you cannot wait it out, and force a refresh with the platform's own debugger.
What these tags do, and what they do not
Worth being direct, because a great deal of Shopify SEO advice implies otherwise: Open Graph tags do not help you rank. Google does not use og:title or og:description as ranking signals. A store with perfect OG markup ranks exactly where the same store without it would.
That is not an argument against them. It is an argument for doing them for the right reason, and on an e-commerce store the right reason is straightforwardly commercial. Product links get shared — into WhatsApp groups, into Slack channels, into a message to somebody asking “what do you think of this one?”. That share is a warm, high-intent referral from a trusted source, and it is the cheapest traffic you will ever get.
A share showing a clean product photograph and a real description gets clicked. A share showing a cropped logo and the first line of your cookie notice does not. The benefit is entirely in that click-through, and it is worth an afternoon.
One corollary: og:description is not a keyword field. Nothing scores it. The person reading it is deciding whether to tap. Write it for them.
The Shopify-specific failure: products without a featured image
Shopify generates the OG image from the product's featured image, which works perfectly until a product has not got one — and on a store of any age, some do not. Bulk imports, discontinued lines brought back, products created in a hurry, variants that lost their image in a migration.
Those products fall back to the site-wide default if you have set one, and to nothing if you have not. Which means a customer sharing that product link is showing their friends either your logo or a blank card — on precisely the product somebody cared enough to recommend.
The audit that finds it in one minute: 1. Products → filter by "Image: is not set" 2. That list is your broken-preview list 3. Fix the images, or archive the products Then set the fallback anyway: Theme settings → Social → default image (1200x630) Because there will always be a next one.
The same applies to collections, which have their own image field and are shared more often than most stores expect — a link to a sale collection is exactly the kind of thing people forward.
Test it the only way that works
Every validator tells you about your markup. Only a preview tells you about the result, and the gap between the two is where cropped headlines, illegible text and unexpected fallbacks all live.
Before any launch or campaign: 1. Share the URL into a private Slack channel 2. Send it to yourself on WhatsApp 3. Paste it into a draft Facebook post Look at what appears. That is what your customers will see. It takes two minutes and it is the last chance to catch a bad preview before it is cached and shared by everybody.
Test a product with an image, a product without one, a collection, and the homepage. Four URLs, four platforms, ten minutes — and it will find things no theme audit does, because the crop, the truncation and the fallback only exist at the moment of rendering.
Why a store's previews break without anybody touching them
OG tags on Shopify are a rendered artefact, not a stored one — they are assembled by the theme from your product data every time the page is served. Which means they break for reasons that have nothing to do with tags.
Things that silently break your previews:
- A theme update that changes the OG block
- An SEO app installed, then uninstalled — leaving
its injected liquid behind, or removing yours
- Two apps both emitting og:image, and the platform
picking whichever it sees first
- A product image replaced with one that crops badly
- A bulk import that cleared featured images
- A CDN or hotlink rule that blocks the platform
fetchers from loading the image at all
That last one deserves particular attention because it produces the most confusing symptom: the tags are perfect, the image URL is correct, you can open it in your own browser — and the preview shows nothing. The platform fetcher was refused, and nothing on your side reports that. The debugger will usually say it could not fetch the image; your access log will tell you why.
Duplicate tags are the other one worth checking for, and they are endemic on stores that have installed and removed SEO apps over the years, because uninstalling an app does not always remove the liquid it injected. Two og:image tags is not twice as good; it is a coin toss.
Where to spend the effort
You do not need bespoke OG tags on every URL, and a store-wide project is a poor use of a week. The pages that actually get shared are a small and predictable set.
Worth doing properly:
- The homepage
- Your best-selling products (check analytics —
it is not always the ones you expect)
- Any collection you promote or run ads to
- Landing pages built for a campaign
Worth a sensible fallback and nothing more:
- Everything else
Then make the fallback good, because it is what covers every page you did not think about — and a decent branded default image means no share of your store is ever genuinely broken, even when a product slips through without a photograph.
That is the honest scope of this work: an afternoon, a fallback, a handful of important pages done by hand, and a two-minute test before anything gets promoted. It is not a project, and any app selling it as one is selling you a subscription.
og:url, and the detail nobody thinks about
One field is worth a paragraph of its own because it is quietly the one most often wrong on Shopify, and its failure is invisible.
Platforms use og:url to decide whether two shares refer to the same link — it is what consolidates engagement across everybody who shares a page. Shopify products are reachable at several URLs by design: the bare /products/slug, and the collection-scoped variants like /collections/sale/products/slug.
If your og:url reflects whatever variant the sharer happened to copy — complete with the ?ref= or campaign parameters they picked up on the way — then every variant is counted as a different link, and the shares are scattered across a dozen phantom URLs.
It should be the canonical: the bare product URL, every time, regardless of how the visitor arrived. Most themes get this right. Check yours by viewing source on a product reached through a collection, because on the direct URL it is trivially correct — which is exactly why the bug survives.
Frequently Asked Questions
What's the best Shopify OG image size?
1200x630 pixels universally. Shopify CDN handles this — even if you upload 2400x1260, Shopify serves resized 1200x630. File size under 1MB. PNG or JPG (not WebP — limited preview platform support).
Why doesn't my Shopify product OG image show on Facebook?
Common causes: product has no featured image (no OG image generated, fallback or none); image too small (under 200x200); image not publicly accessible (rare on Shopify — usually accessible). Facebook caches 30 days — force refresh in Debugger.
Can I set different OG images for Facebook vs Twitter?
Usually no need — same 1200x630 image works for both. Twitter inherits og:image as fallback. Shopify themes output identical og:image and twitter:image by default. Override only for specific use cases.
How do I add custom OG tags per Shopify page?
Theme.liquid conditionals: {% if template contains 'page.landing' %}<meta property='og:image' content='custom-url.jpg'>{% endif %}. Or use an app — Smart SEO has per-page OG override via product/page metafields.
Why are WhatsApp previews missing for Shopify products?
WhatsApp is the fussiest of the platforms about previews, and it publishes no specification: the figures that circulate (tags within the first few KB of HTML, a size cap on the image, a strict aspect ratio) are community observation rather than documented behaviour. Treat them as heuristics: keep the OG tags high in the head, keep the image modest in file size, and use 1200x630. Then test with a real message, because that is the only thing that answers the question. Heavy Shopify head sections (analytics, multiple apps) push OG tags beyond 4KB. Solution: reduce head bloat (defer non-essential scripts, lazy-load some app code), or rely on alternative messaging platforms.
Do Open Graph tags help my Shopify store rank?
No. Google does not use og:title or og:description as ranking signals, and a store with immaculate OG markup ranks exactly where the same store without it would. What these tags control is how your link appears when somebody shares it — on Facebook, LinkedIn, WhatsApp, Slack, Discord and most messaging apps. On an e-commerce store that is a real commercial benefit, because a shared product link with a proper image and a human description gets clicked and one showing a cropped logo does not. It is a sharing benefit, not a ranking one, and it is worth being clear which you are buying.
I fixed the tags and the preview did not change. Why?
The platform cached it. Facebook, LinkedIn, WhatsApp and the rest fetch your page once, when a link is first shared, and then keep what they found — they do not come back to check. Editing the tags afterwards changes nothing about a preview that is already stored, because the platform is no longer looking at your page. Run the URL through the platform's own debugger to force a re-fetch. This single step explains the large majority of 'my OG tags do not work' reports, and none of the platforms publishes how long the cache lasts.