Skip to content
Nazmul Nikhil
Menu

Open Graph URL Not Matching Canonical (Ahrefs): Keep Shares Pointing to One URL

Ahrefs flags pages whose og:url is different from the canonical URL. Shares then point to the wrong version. Here's how to make them match.

Nazmul Nikhil

By

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

Published 1 min read
Open Graph URL Not Matching Canonical (Ahrefs): Keep Shares Pointing to One URL
Photo: Aaron Burden on Unsplash

In short

Ahrefs flags "Open Graph URL not matching canonical" when a page's og:url is different from its canonical URL. Social platforms then attribute shares to a different URL than the one you want indexed, and share counts may split across versions. Set og:url to exactly the canonical URL, including protocol, www and trailing slash.

The og:url tag tells social platforms which URL a page "really" is. Social likes, shares and comment counts are grouped under it.

Common mismatches

og:url Canonical Cause
http://example.com/page/ https://example.com/page/ Hardcoded old protocol
https://example.com/page/?utm_source=x https://example.com/page/ og:url built from the requested URL
https://example.com/page https://example.com/page/ Trailing slash differs
https://example.com/ https://example.com/page/ og:url set site-wide to the home page

How to fix it

Build both tags from the same value in your templates:

<link rel="canonical" href="https://example.com/page/">
<meta property="og:url" content="https://example.com/page/">

WordPress: Yoast and Rank Math set og:url to the canonical automatically. A mismatch usually means a second plugin or the theme also outputs Open Graph tags. Turn one off.

Shopify: check the social meta snippet in your theme (often social-meta-tags.liquid or similar) and make it use canonical_url.

Webflow: Webflow generates these tags. A mismatch usually comes from custom code adding a second og:url.

Wix: Wix generates og:url from the page URL. Check for custom meta tags added in the page's SEO settings.

Custom builds: use one function to produce the canonical URL and reuse it for og:url.

Common mistakes

  • Two sets of Open Graph tags on one page, from a plugin and a theme. Platforms may read either.

This guide isn't affiliated with or endorsed by Ahrefs.

Sources and references

TAGSAhrefs Site AuditOg:url canonicalOpen graph url mismatchOg url tag
Nazmul Nikhil

About the author

Nazmul Nikhil

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

SEO and AI search consultant in Dhaka, Bangladesh, helping small and mid-size businesses in the USA, UK, Australia and Canada.

Need help with this?

Get it fixed with Technical SEO

I find the issues that cost you traffic and fix them, starting with the pages that matter most.

Keep reading

Related articles

All Site Audit Issues posts →

Get the next guide in your inbox

One email when a new SEO or AI search guide goes live.

Ready to grow?

Get a free audit of your website, or book a 30-minute call to talk through your goals.

Nazmul Hasan

Talk to Nazmul directly

Reply within 24h

WhatsApp +880 1682835118
nazmulnikhil@gmail.com