Researchtechnical seo
Back to writing

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.

Monochrome generative point study “Twin Drift,” a mathematical form rendered in black and white.

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 declarationJobMug-guide fixture
Incoming linkCarries the destination and campaign attribution/guides/ceramic-mugs?utm_source=newsletter
Final response URLShows where this request actually landedMay keep the campaign parameter
rel=canonicalDeclares the preferred document representationhttps://example.com/guides/ceramic-mugs
og:urlDeclares the social object’s identityThe same clean guide URL
RedirectMoves a request to another addressUse 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.

Illustrative metadata · same guide

One arrival. Two declared identities.

01

Visitor arrives

/guides/ceramic-mugs?utm_source=newsletter

The campaign records attribution.

02

Search preference

example.com/guides/ceramic-mugs

The clean production guide is the intended representative.

03

Social object before repair

preview.example.com/guides/ceramic-mugs?utm_source=newsletter

A stale share template names the preview host.

Corrected single-article identitycanonical = og:urlhttps://example.com/guides/ceramic-mugsThe tracked arrival may stay; both templates identify the same public guide.
This single-guide repair does not override an intentional collection-level social identity. The archive example below makes that exception explicit.
Before: the initial HTML names a preview object

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">
After: the same document has one declared identity

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 differenceContent decisionTemplate repair
og:url includes utm_source; canonical is cleanSame guide, tracked arrivalUse the clean document URL for og:url; keep attribution on the incoming link
og:url uses a preview hostSame guide, wrong publishing originRead the configured production origin for public metadata
One value uses an old path or hostThe guide moved permanentlyAlign metadata with the maintained destination and review the old route’s redirect
Both tags name another productDistinct products have been consolidated incorrectlyRestore each useful product’s identity and content
Page 2 canonical; series URL in og:urlA potentially intentional collection shareReview 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.

Illustrative mismatch: observations before and after repair
ObservationBeforeAfter
Requested addresshttps://example.com/guideSame historical alias
Redirect destinationhttps://example.com/research/guideSame final 200 document
Raw HTML canonical/research/guide on the intended HTTPS hostOne absolute canonical for the final document
Raw og:urlhttps://example.com/guidehttps://example.com/research/guide
Rendered headAn extra canonical containing ?campaign=socialOne canonical; agrees with the raw response
HTTP Link / sitemap / internal linksInspect independently; do not infer from the DOMNo competing canonical header; maintained route in the sitemap and links
Conflicting raw and rendered heads — illustrative fixture

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">
Repaired head at the final URL

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">
Inspect every declaration in the browser

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

  1. Open Graph protocol — basic metadata and og:urlOpen Graph protocolVerified Oct 26, 2026
  2. HTML Standard — canonical link typeWHATWGVerified Oct 26, 2026
  3. RFC 6596 — The Canonical Link RelationIETF / RFC EditorVerified Oct 26, 2026
  4. Google — canonical URL methodsGoogle Search CentralVerified Oct 26, 2026
  5. Yoast support — Open Graph URL not matching canonical on paginationWordPress.org / Yoast supportVerified Oct 26, 2026
  6. Google — pagination and incremental page loadingGoogle Search CentralVerified Oct 26, 2026
  7. LinkedIn — Post InspectorLinkedInVerified Oct 26, 2026
  8. Google — URL Inspection and Google-selected canonicalGoogle Search Console HelpVerified Oct 26, 2026

Read next