Technical SEO
OG URL and canonical: when the share names a different page
The address a visitor opens, the document search should represent and the object a share identifies serve different jobs.

For an ordinary article or product, generate og:url and rel=canonical from the same clean, absolute document URL. When they disagree, check the content before copying either value: making both tags name the wrong product only makes the mistake consistent. In the example below, the share template leaks a preview hostname into a production guide.
An intentional collection-level share identity needs a different decision. Inspect what each address represents before making a site-wide replacement. The Open Graph protocol defines og:url as the object’s permanent identity, while the HTML Standard defines canonical as the preferred URL for the current document.
Method & limits
Protocol and Google guidance checked October 26, 2026. The mug-guide URL family is invented for the fixture; no production audit is reported.
The arrival URL, document, and share object have different jobs
A newsletter can link to a tracked address without creating a new article. The incoming request records how the visitor arrived; the head identifies the article. Keep those purposes separate in the page template.
Google describes redirects, canonical annotations, and sitemap inclusion as canonicalization methods. To find the URL Google selected, read indexed URL Inspection. The social metadata warning only compares declarations.
| Address or declaration | Job | Mug-guide fixture |
|---|---|---|
| Incoming link | Carries the destination and campaign attribution | /guides/ceramic-mugs?utm_source=newsletter |
| Final response URL | Shows where this request actually landed | May keep the campaign parameter |
| rel=canonical | Declares the preferred document representation | https://example.com/guides/ceramic-mugs |
| og:url | Declares the social object’s identity | The same clean guide URL |
| Redirect | Moves a request to another address | Use for an obsolete host or replaced route when appropriate |
Illustrative fixture. A parameter that changes the document, product or language requires its own content decision.
One guide, two conflicting identities
In this authored fixture, a visitor opens https://example.com/guides/ceramic-mugs?utm_source=newsletter. The production server returns the complete guide with a 200 response. The search template knows the clean production address, but the share template still reads a preview-host setting.
Changing the newsletter link would leave the stale host in every later share until the publishing origin and route source in that template are corrected. Confirm that the declared destination serves the same guide.
One arrival. Two declared identities.
Visitor arrives
/guides/ceramic-mugs?utm_source=newsletterThe campaign records attribution.
Search preference
example.com/guides/ceramic-mugsThe clean production guide is the intended representative.
Social object before repair
preview.example.com/guides/ceramic-mugs?utm_source=newsletterA stale share template names the preview host.
Illustrative head excerpt from the production response. The preview address is the defect.
<link rel="canonical"
href="https://example.com/guides/ceramic-mugs">
<meta property="og:url"
content="https://preview.example.com/guides/ceramic-mugs?utm_source=newsletter">Illustrative corrected metadata. The incoming newsletter URL may still retain its tracking parameter.
<link rel="canonical"
href="https://example.com/guides/ceramic-mugs">
<meta property="og:url"
content="https://example.com/guides/ceramic-mugs">
<meta property="og:type" content="article">
<meta property="og:title" content="Choosing a ceramic mug">
<meta property="og:image"
content="https://example.com/images/ceramic-mugs.jpg">The cause of the mismatch determines the repair
Use the actual final response to select the case. Do not lowercase paths, delete every query parameter or force every page to the homepage merely to satisfy a comparison. A URL scheme and host policy can be shared across the site; page identity still belongs to the document.
The canonical relation is intended for duplicate content or a representative containing that content. Two different products with different prices and capacities do not become duplicates because they share a template. RFC 6596 describes that relationship.
| Observed difference | Content decision | Template repair |
|---|---|---|
| og:url includes utm_source; canonical is clean | Same guide, tracked arrival | Use the clean document URL for og:url; keep attribution on the incoming link |
| og:url uses a preview host | Same guide, wrong publishing origin | Read the configured production origin for public metadata |
| One value uses an old path or host | The guide moved permanently | Align metadata with the maintained destination and review the old route’s redirect |
| Both tags name another product | Distinct products have been consolidated incorrectly | Restore each useful product’s identity and content |
| Page 2 canonical; series URL in og:url | A potentially intentional collection share | Review the intended social object before changing either value |
Matching strings are the result of a correct identity decision, not a substitute for it.
Campaign attribution doesn’t require a new object
In the mug-guide fixture, ?utm_source=newsletter changes attribution only. The guide’s title, body and product recommendations stay the same. The request can retain that parameter while canonical and og:url use the clean guide address. Neither metadata declaration edits the browser’s address bar.
Generate the two metadata values from the maintained document record, using the public origin and route. A request-derived host can leak a preview hostname into production metadata; a raw request URL can put every campaign token into the object identity. Fix that source once rather than adding a second tag later with JavaScript.
If a query changes language, product configuration or a useful filtered collection, assess that representation first. Removing a parameter is a publishing decision when the parameter changes what readers receive. The canonical identity study follows the same principle across a person’s documents and profiles.
A paginated archive can share the series while indexing each page
Consider /journal/page/2/. Its search canonical can stay /journal/page/2/ because it lists different articles from /journal/. A publisher might use /journal/ as the social object when a share promotes the collection. Yoast’s support response describes that intentional behavior for paginated archives.
Keep the share title, description and destination consistent with that collection-level choice. If the intended share is specifically “Journal, page 2,” use its page-specific identity instead. A collection-level choice should not silently replace the identity of each individual article.
Page 2 still needs its own search canonical under Google’s pagination guidance. Matching it to page 1 just to agree with a collection share would erase the item distinction shown in the pagination example.
Every declaration counts in the browser
At /guide, a redirect leads to /research/guide. The server’s canonical names the new URL, its og:url still names /guide, and a client component adds another canonical containing a campaign query. These illustrative fixtures distinguish the response from the browser state.
Run the console expression after the application finishes setting metadata. Save its arrays beside the HTTP response and Link header; counting every declaration catches duplicate tags even when their targets agree.
| Observation | Before | After |
|---|---|---|
| Requested address | https://example.com/guide | Same historical alias |
| Redirect destination | https://example.com/research/guide | Same final 200 document |
| Raw HTML canonical | /research/guide on the intended HTTPS host | One absolute canonical for the final document |
| Raw og:url | https://example.com/guide | https://example.com/research/guide |
| Rendered head | An extra canonical containing ?campaign=social | One canonical; agrees with the raw response |
| HTTP Link / sitemap / internal links | Inspect independently; do not infer from the DOM | No competing canonical header; maintained route in the sitemap and links |
These observations belong to different artifacts. The browser-added canonical is an additional tag, not evidence that the server response changed.
<!-- Raw head at the final 200 response -->
<link rel="canonical" href="https://example.com/research/guide">
<meta property="og:url" content="https://example.com/guide">
<!-- Additional tag inserted into the rendered head -->
<link rel="canonical"
href="https://example.com/research/guide?campaign=social">The server and browser use the same maintained route. The old /guide URL redirects to this document.
<link rel="canonical" href="https://example.com/research/guide">
<meta property="og:url" content="https://example.com/research/guide">Run after the application finishes setting metadata. Compare these arrays with the raw response and its HTTP Link header.
({
finalUrl: location.href,
canonical: [...document.head.querySelectorAll('link[rel~="canonical"]')]
.map(node => node.getAttribute("href")),
openGraph: [...document.head.querySelectorAll('meta[property="og:url"]')]
.map(node => node.getAttribute("content"))
});The served head and the refreshed share are two observations
Start with the hub’s capture checklist: requested address, redirect hops, final response, HTTP headers, initial HTML and rendered head. Compare the exact canonical and og:url values beside the content each URL serves.
For the repaired fixture, the production response should contain one canonical link and one og:url naming the clean guide. Inspect the HTTP Link header too: a correct HTML pair can coexist with a contradictory server declaration. Use the multiple canonical tags diagnosis when those layers disagree.
Repeat the capture on the clean guide and its newsletter variant. Confirm that public visitors can open the declared URL and image. Then inspect the URL with the relevant platform’s sharing tool, such as LinkedIn Post Inspector. Correct the live raw response before requesting a fresh platform capture; a changed browser DOM alone does not establish what that platform received.
The current response can be repaired while an older preview remains visible. Inspect the card after the platform refreshes it. I would accept the repair when the document identity is right in the served head and the share presents the intended page.
Sources
- Open Graph protocol — basic metadata and og:urlOpen Graph protocolVerified Oct 26, 2026
- HTML Standard — canonical link typeWHATWGVerified Oct 26, 2026
- RFC 6596 — The Canonical Link RelationIETF / RFC EditorVerified Oct 26, 2026
- Google — canonical URL methodsGoogle Search CentralVerified Oct 26, 2026
- Yoast support — Open Graph URL not matching canonical on paginationWordPress.org / Yoast supportVerified Oct 26, 2026
- Google — pagination and incremental page loadingGoogle Search CentralVerified Oct 26, 2026
- LinkedIn — Post InspectorLinkedInVerified Oct 26, 2026
- Google — URL Inspection and Google-selected canonicalGoogle Search Console HelpVerified Oct 26, 2026