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.
Related issues
Sources and references
The Open Graph protocol, ogp.me
Google Search Central, How to specify a canonical URL

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.



