The tag is one line long and it never shows up in the browser. So when it is wrong, the site looks perfect while the search engine quietly indexes something else. That is how it survives launch day so often.
Why a page has more than one address.
More easily than most people expect. The same page is usually reachable with and without www, with and without a trailing slash, over http and https, with tracking parameters on the end, and again on whatever preview host the site was built on. To a search engine those are different URLs showing the same content, and it has to pick one.
If you do not pick, it picks for you, and it does not always pick the one you are advertising.
The mistake I find most often.
A canonical tag still pointing at the preview URL after launch. The site was built on a staging host, every page canonicalized to that host, the domain went live, and nobody changed it. The browser shows the real domain, the page looks perfect, and the head is quietly telling Google that the real version of this page lives somewhere else.
This is the single most common thing I find wrong on a site someone launched themselves. Google does not see the site the way you see it. It reads the HTML, and the canonical is near the top of it.
What correct looks like.
- Every page has a canonical tag, and it points at itself on the production domain.
- One host is the real one, and the other redirects to it permanently. The canonical, the sitemap and robots.txt all agree on which.
- Preview and staging hosts are noindexed with a header, so a preview copy cannot compete with the real site at all.
- Tracking parameters do not create new canonicals.
- The canonical is server rendered. Injected with JavaScript, a crawler that skips JavaScript never sees it.
How I handle it.
On a 5Four build every page generates its canonical from one place, and I set the production host once, in the build. Preview builds point their canonicals at the preview host on purpose, so a review copy is never mistaken for the real thing. It is section 5 of the 5Four Launch Checklist, and a blocker: a domain does not get pointed at a site until it passes.
Related: Canonical URL in the glossary, sitemap.xml, the Site System.



