How to resolve duplicate Open Graph tags that cause unpredictable social media previews?

og-data-quality-issues page

The issue

A page that declares og:title or og:description twice can be shared with either value, and which one appears depends on the platform. One share shows the headline the author wrote, another shows a template’s default. The wrong one looks like a content mistake, so the search for it starts in the wrong place.

The cause is two systems writing the same tags: a theme and an SEO plugin, a server render and a client-side head manager, or a tag manager adding what the HTML already has. The Open Graph protocol doesn’t say which of two singular values wins, so each parser decides for itself.

Scope

Each page is checked on its own, across everything that ends up in its <head>, whichever template, plugin or script put it there. og:image is the exception: a page may declare several distinct images on purpose.

How to check you have it

  • By hand: view the page’s served HTML, not the template, and search the <head> for each og: property. og:title, og:description, og:type, og:url and og:site_name should each appear once.
  • With a tool: compare the preview in Facebook’s Sharing Debugger and LinkedIn’s Post Inspector. Different titles or descriptions for the same URL point to a duplicate.

Probeo doesn’t report duplicates. Where a property appears twice, it reads the first.

The fix

Make one system responsible for the page’s Open Graph tags, and turn the others off.

Find every source that writes them: the theme’s header, the SEO plugin, the framework’s head manager, the tag manager. Keep the one that knows the page best, usually the SEO plugin or the page template, and disable Open Graph output in the rest.

Done when: each singular property appears once in the served HTML, any repeated og:image tags name distinct images, and the check above comes back clean.

Do not

  • Do not remove one copy without finding what wrote it; it comes back on the next deploy.
  • Do not add Open Graph tags from a tag manager; crawlers that don’t run JavaScript never see them.
  • Do not treat several og:image tags as duplicates if they point to different images.
  • Do not turn off a plugin’s Open Graph output before something else writes the tags.

FAQ

How do I determine which system is injecting the duplicate OG tags?

Look at where each copy sits in the served HTML and what surrounds it. A theme’s tags usually come first in the <head>, and a plugin’s often sit inside a comment that names it. Tags that appear only in DevTools’ Elements panel, not in View Source, were added by JavaScript.

Can I use multiple og:image tags to specify different images for a page?

Yes. og:image can repeat, each tag naming a different image. That is different from repeating og:title, which can only have one value.

Will removing the duplicate fix cached previews on social platforms?

Not on its own. Platforms cache what they fetched, so run the URL through each platform’s debugger to make it fetch again. Posts already shared may keep the old preview.

My SSR framework injects OG tags during hydration that duplicate the static HTML. How do I prevent this?

Let one layer own the tags. Most head managers deduplicate tags that share a key, so give each tag a key, or remove the tags from the static shell and leave them to the framework. Then check the served HTML, not the component.

Does Google penalize pages with duplicate OG tags?

Google doesn’t use Open Graph tags for ranking, so there is no penalty. The cost is in share previews.

Should I use a tag manager to consolidate all OG tag injection?

No. A tag manager adds tags with JavaScript, and many crawlers that build share previews don’t run JavaScript. Put the tags in the server-rendered HTML.

Which product detects this

Probeo checks this on every page of your site as part of Site Clarity. This page explains one instance; the product tells you every page that has it.