SEO & web
If you are searching for canonical url, or for www or non-www, you are typically in one place: Google is showing the wrong variant, or you have three addresses for the same page and call it 'it works'. With www. Without. With a slash. Without. With UTM from the last campaign. HTTP that still answers. The relaunch post is cutover and the 301 map when you change site. The redirects post is chains that rot after Monday. The JSON-LD post is markup that mirrors HTML. This one is the choice: which URL is the page. Until you can point at one, you do not have a canonical. You have a hope you put in a plugin.
A canonical is not a tag you paste in `<head>` and forget. It is the URL you want in the index, in the sitemap, in internal links, in hreflang and in the 301 the other variants send. Google treats `rel=canonical` as a hint, not a command. If the hint points one place, the sitemap another, and internal navigation a third, you have asked to be guessed. The guess is rarely what you meant Monday morning.
TL;DR
The main takeaways
- You have a canonical when you can point at one URL as the version Google should show — and that you yourselves link to.
- www and bare, trailing slash, HTTP and UTM copies are duplicates until you redirect them. A tag alone is a hope.
- `rel=canonical` is a hint. It must agree with 301s, sitemap, internal links and hreflang. Disagreement is three votes.
- A self-referencing canonical on the right URL beats a plugin that points at another host you forgot.
- The redirects post is chains. Relaunch is cutover. JSON-LD is the script. This is choosing the address before you ask Google to choose for you.
- You have chosen when you can say which URL is the page — not when you have three tags pointing three places.
Why this matters at all
A site that answers on several URLs for the same page does not have 'flexibility'. It has a split. Google sees candidates. Users bookmark the variant they landed on. The campaign links to UTM. The sitemap points at a third. Internal navigation at a fourth. You do not have one signal. You have a vote you have not counted. The page you thought you had under control is four documents in the index — or one you did not choose.
Teams do it because the first variant 'worked'. WWW was set in DNS. Trailing slash came with the CMS. The preview host came along in a canonical plugin. A campaign URL became the one sales copied. Nobody chose. Everybody added. Three months later Search Console has rows on both www and apex, both slash and not, and a pile of parameters you never wrote as pages. You fix the one. You do not touch the habit.
The damage is concrete. Ranking split between two hosts. An indexed HTTP variant you thought was off. A canonical tag that points at staging because the plugin took `window.location`. A pagination page that canonicalises to page 1 and hides page 2. A locale URL that points at the other locale as 'the real one'. You notice when the wrong version is the one Google shows, or when you cannot explain why the page you updated is not the one that ranks.
We write this because 'we have set canonical' has become a check you tick when the plugin is on. An honest setup is boring: one host, one protocol, one slash rule, self-referencing tags that match the URL you show, 301s on the rest, a sitemap that only knows the right one. Without that choice you have a tag. You do not have a version.
What a canonical URL actually is — and what a plugin is not
A canonical URL is the address you name as the preferred version of a document. It is absolute. It is the one you want in the SERP. It is the one internal links should use. It is the one the sitemap should list. The other URLs — www, apex, slash, parameters, HTTP — are copies you owe a send-there. The difference is not whether the tag exists. The difference is whether everything you own points at the same place.
It is not the same as 'we have Yoast / Rank Math / a Next.js field'. The plugin writes a tag. It does not choose unless you have told it which host is true. A plugin that takes the current request URL and calls it canonical will canonicalise staging, preview and parameters because they are 'current'. You have automated the guess. You have not chosen.
It is also not the same as a redirect. The redirects post is the hop: one 301, one target, no chain. Canonical is the signal on the URL that is allowed to stay. The two must agree. A 301 from A to B, where B canonicalises back to A, is a loop you have asked Google to judge. A canonical without a redirect on the open variants is a hint on top of duplicates you still serve.
And it is not 'parameters are fine, they are just tracking'. UTM, fbclid, sort= and session-id are new URLs if you let them answer 200 with their own canonical — or worse, with a self-referencing canonical on the parameter variant. Tracking belongs in measurement, not in the index. Either you strip them in the canonical (and preferably in a hop), or you have asked to index the campaign as a page.
What typically goes wrong when someone says canonical is set
The first failure is www and apex as equals. Both answer 200. Both have self-referencing tags. The sitemap has one, internal navigation the other. You have two homepages. Choose. 301 the other in one hop. HSTS and the host the certificate actually covers are part of the choice — not an add-on you take next quarter. The redirects post is the chain. This is refusing to let both be 'fine'.
The second failure is trailing slash as a religion without a rule. The CMS links with a slash. The app links without. Canonical points at one. Sitemap at the other. The user lands where the campaign sent them. Pick a convention and make it the only one that answers 200. The other is a hop. A 'both work' kindness is a split you call UX.
The third failure is HTTP that still answers, or a canonical that points at http:// because an old field in the CMS was never updated. HTTPS in the browser is not HTTPS in the tag. Read the source. If the tag says http, you have asked the index for the insecure variant. The relaunch post is cutover. This is refusing to let an old field drive the URL you show as the real one.
The fourth failure is a cross-host canonical: production pointing at staging, a preview alias, a CDN origin, or the reverse. It happens when the plugin takes the host from the request, or when you copied HTML from one environment to another. Google can follow a canonical to another host. If that host is noindex, passworded or dead, you have pointed the index into a hole. Write the host. Hard-code it. Do not let it be 'wherever we happen to be running'.
One chosen URL vs. three tags you call coverage
The honest choice
One host, one protocol, one slash rule. Tag, sitemap and links point at the same place. The rest is one hop.
- A self-referencing canonical on the URL you actually want in the SERP
- 301 from www/apex, HTTP, slash variants and bare tracking parameters — one hop, not a chain
- Sitemap and internal links use the canonical form, not the one you happened to copy
- Is boring to maintain, and that is the whole point — Google should not have to guess
The hoped-for tag
Plugin on, three hosts, UTM as pages, and a sitemap that knows a fourth variant.
- Self-referencing tags on every variant 'so they are all covered'
- Canonical to staging or to the request host the preview had
- Sitemap with both slash and not, both www and apex
- Is a hope you call SEO. The version Google shows is the one you did not update
<!-- Right: absolute, self-referencing, same host as the page -->
<link rel="canonical" href="https://www.example.com/en/insights/canonical-url-one-version" />
<!-- Wrong: relative, request host, or a variant you do not redirect -->
<link rel="canonical" href="/en/insights/canonical-url-one-version" />
<link rel="canonical" href="https://preview.example.com/en/insights/canonical-url-one-version" />
<link rel="canonical" href="https://www.example.com/en/insights/canonical-url-one-version?utm_source=mail" />How to decide which URL is the page — before you write the tag
Without this order you get another plugin you call a choice.
- 01
Choose host, protocol and slash — in writing, in one place
www or apex. HTTPS. With or without trailing slash. Write it as the URL you want in the index. Certificate, DNS and HSTS must follow that choice, not the other way around. If you cannot say the sentence in one line, you do not have a canonical problem. You have a 'both work' problem.
- 02
Make the other variants one hop, not pages
301 from the other host, from HTTP, from the other slash form. One hop. The redirects post is chains and 302s that linger. This is refusing to let the variant answer 200 with its own tag. A canonical on top of an open duplicate is a hint you hope beats the document you still publish.
- 03
Set a self-referencing canonical from configuration, not from the request
Site URL + canonical path. Not `window.location`. Not the preview host. Not UTM. WordPress, Next.js, Webflow — the same job: one field you own. If the tag can change because someone hit another host, it will change.
- 04
Make sitemap, internal links and hreflang agree with the tag
The sitemap lists only the canonical form. Internal navigation links only there. Hreflang pairs point at the canonical locale URLs, not at a www mix. Disagreement is three votes. Google should not count them up for you. The relaunch post is parity at cutover. This is the habit after cutover.
- 05
Give parameters a job, not a document
Tracking is stripped in a hop or in the canonical — and you never link to them internally. Facets and sorts you want indexed are pages you have chosen. Facets you do not want are noindex or a hop. Pagination is not 'canonical to page 1' as an automatic if page 2 is a different document. Choose per type, not per plugin default.
“You have chosen when you can point at one URL — and everything else is a hop there.”
www, locale, parameters and pagination — the same word, four jobs
www versus apex is the job that most often becomes 'both work'. It is the job that most often splits the index. Choose the host the certificate and the brand actually use. 301 the other. A CNAME and an HSTS preload is how the choice holds. A tag on both is how you ask Google to keep two. The redirects post is the hop. This is refusing to have two homes.
Locale is the job you forget when DA and EN both 'just work' on the same slug. A canonical must be self-referencing on the locale the page is. Hreflang points at the sibling. Canonical does not point at the other locale as 'the real one' unless you actually have one language version and a redirect. A DA document that canonicalises to EN is a deletion you have asked for. The JSON-LD post is the type in the script. This is the address of the document.
Parameters are the job the campaign loves and the index hates. UTM in an internal link is a new URL you gave sales. Facets you let index without wanting them are thin duplicates. A session-id in the path is a document per visit. Strip, hop, or make the parameter a real page you have written. A self-referencing canonical on `?utm_source=` is publishing the campaign as content.
Pagination and print-friendly copies are the job the CMS solves with a default you did not read. Page 2 is a different document if the content is different. Canonical to page 1 on page 2 is hiding page 2. A `/print` that canonicalises to the article can be right — if you also do not put it in the sitemap. Relaunch is the cutover map. This is reading the default and making it a choice.
What you should typically do in the situation you are in
The left is what you typically say. The right is the next step we typically recommend.
Situation
Both www and non-www answer 200, and both have self-referencing tags
Next step
Choose one host. 301 the other in one hop. Fix sitemap and internal links. The tag alone still splits
Situation
The canonical plugin writes whichever URL the request has — including on preview
Next step
Hard-code the site URL. Preview and staging must not be able to write themselves into the tag
Situation
The sitemap lists slash variants, internal nav lists the others
Next step
Pick a slash rule. Make the other a 301. The sitemap knows only the one you chose
Situation
Campaign URLs with UTM sit in the index as their own pages
Next step
Strip in a hop or in the canonical. Stop pasting UTM onto internal links
Situation
The DA page canonicalises to EN, 'so we do not have duplicates'
Next step
Those are two documents. Self-referencing per locale. Hreflang to the sibling. Canonical is not a translation
Checklist before you call it one version
If you are missing several of these, the sentence is canonical is set — the setup is a tag you are hoping for.
- You can point at one absolute URL as the page, and it matches what you show in the browser without parameters
- The other host, HTTP and the other slash form are one 301 hop — not 200 with their own tag
- Sitemap, internal links and hreflang use the canonical form, not a mix
- The tag comes from configuration you own, not from the request host or a preview alias
- Tracking parameters are not documents. Pagination is not automatically 'page 1'
- The redirects post is chains. Relaunch is cutover. JSON-LD is the script. This is the address
Questions we get again and again
Should we choose www or non-www?
Yes — you should choose. Which of the two is a brand and certificate choice, not an SEO miracle. What splits is letting both answer 200. 301 the other in one hop, fix sitemap and internal links, set HSTS. A canonical tag on both with self-reference is two pages. The redirects post is the hop. This is refusing to have two homes.
Is rel=canonical enough if we cannot redirect the variants?
It is a hint on top of documents you still publish. Google can ignore it when the signals fight. Redirect the variant you can. Canonical on the one that may stay. Sitemap only the right one. If you let three URLs answer 200 and hope for the tag, you have asked to be guessed. The guess is rarely the campaign variant you meant.
Is this the same as redirects that do not rot, or relaunching without losing SEO?
No. The redirects post is chains, 301 versus 302 and hops that rot. Relaunch is cutover, parity and the map you move. JSON-LD is the script that must mirror HTML. This is choosing the address before you ask Google to choose. You can have clean hops and still two hosts in the index. You can have a clean relaunch and paste UTM onto internal links the next day. They are four jobs. One does not replace the others.
May pagination canonicalise to page 1?
Only if page 2 is not a document you want found. If page 2 has different content, a canonical to page 1 is a deletion you have asked for. Either the pagination is a series you want in the index (self-referencing per page), or you have chosen that page 1 is the whole document and page 2 should not stand alone. The plugin default is not that choice.
What about canonical in a WordPress plugin versus in Next.js?
The job is the same: an absolute URL from a site value you own, self-referencing, agreeing with redirects and sitemap. The plugin or `metadata.alternates.canonical` is the pen. If the pen writes the request host, it writes wrongly on preview and on parameters. Hard-code production's origin. Do not let the CMS's 'current URL' be SEO.
If you have three URLs for the same page and call it canonical
Let us separate one version from a tag you are hoping for.
A choice in host and redirects beats a plugin that mirrors the URL someone hit.
