Missing og:url in Next.js
og:url tells social platforms which canonical address a share belongs to, so likes and shares of the same page via different tracking links consolidate onto one URL. Without it, a page shared with ?utm_source=… can be treated as a separate object, splitting its social signals.
Symptoms
How VibeCheck catches it
In your widget · Problems
Missing og:url
To your coding agent · MCP
agent › get_detected_issues
→ { detector: "seo", issue: "Missing og:url", threshold: "no <meta property="og:url">" }
The same string in your widget and in your agent’s context — no screenshot, no copy-paste.
Root causes
The fix for Next.js
Set openGraph.url; keep it identical to alternates.canonical.
export const metadata: Metadata = {
openGraph: { url: 'https://acme.com/pricing' },
alternates: { canonical: 'https://acme.com/pricing' },
}Steps
- Determine the clean canonical URL for the page
- Emit it as
<meta property="og:url"> - Keep it in sync with your canonical link
FAQ
- Should
og:urlmatch my canonical link? - Yes. Keep
og:urlidentical to<link rel="canonical">so social and search agree on the one true URL for the page. - Should
og:urlinclude tracking parameters? - No. Strip
utm_*and other params so shares consolidate onto the clean URL. - What happens if
og:urlpoints at the wrong page? - Platforms credit the share — and its engagement — to whatever
og:urlsays, and echo that URL in the card. A stale or wrong value sends clicks to the wrong page, so build it from the current route, not a hardcoded string. - Do I need
og:urlif I already set a canonical link? - They serve different consumers:
<link rel="canonical">is for search engines,og:urlis for social platforms. Set both, and keep them identical.