Canonical URL: what it is and how to set it
A canonical URL is the single preferred address for a page that can be reached through several URLs, declared with a rel=canonical link so search engines index and rank that version instead of the duplicates.
Why canonical URLs matter
SaaS sites create duplicates without trying: tracking parameters on campaign links, trailing-slash variants, http and https, preview domains, CMS pagination and filter pages. Each duplicate splits signals and wastes crawl budget, and the version Google picks may not be the one you want people to land on.
Canonicals tell search engines which version is the real one. Google treats them as a strong hint rather than a command, so they work best when every other signal agrees: internal links, sitemaps and redirects all point to the same URL.
How we handle it
Every page we build declares a self-referencing canonical with an absolute URL on your production domain. Preview and staging domains are either blocked from indexing or canonicalized to production. Sitemaps list only canonical URLs, and internal links use the same form, including the trailing slash.
A check script compares each page’s canonical with its real path before launch. It runs in the Ship step of our process and in ongoing technical SEO and AEO work, and it matters most in website migrations.
Related service: SEO & AEO · How we work
Canonical URL in practice
Each page on this site is generated with <link rel="canonical"> pointing at its address on the main domain, even when the site is previewed under a different host. A campaign link such as /pricing/?utm_source=newsletter therefore still consolidates to /pricing/. The sitemap and the llms.txt file list the same canonical URLs.
Common mistakes
- Canonicalizing every page to the homepage. This tells search engines your pages are duplicates of one page. Use self-referencing canonicals.
- Using relative or wrong-domain URLs. Use absolute URLs on the production domain, with the right protocol and slash style.
- Conflicting signals. A canonical that disagrees with redirects, sitemaps or internal links gets ignored.
- Pointing canonicals at non-200 pages. A canonical target must be live and indexable.
- Assuming Google must follow it. A canonical is a hint, not a command. Google may pick a different URL when the other signals disagree, so make them agree.
How to add a canonical tag
Add one canonical tag to the <head> of each page, with the absolute URL of the version you want indexed. On the page itself it points to its own address (self-referencing):
<link rel="canonical" href="https://example.com/pricing/">Then make the other signals agree: the sitemap lists only canonical URLs, and internal links use the same form, protocol and trailing slash.
Canonical tag or 301 redirect?
| Canonical tag | 301 redirect | |
|---|---|---|
| Visitor still sees the page | Yes | No, they land on the new URL |
| Credit moves to the preferred URL | Yes, as a strong hint | Yes |
| Use when | Duplicates must stay reachable, such as tracking parameters | The old URL should no longer be visited |
Questions about canonical URL
What is a canonical URL?
Is a canonical tag the same as a redirect?
Does every page need a canonical tag?
Can Google ignore my canonical tag?
Should a canonical URL be absolute or relative?
Thomas OldenburgerFounder, design and build leadStill deciding? A 30-minute call answers most of it.
Related terms
301 redirect
A 301 redirect is an HTTP response that tells browsers and search engines a page has moved permanently to a new URL, so visitors land on the new address and search engines transfer the old URL’s signals to it.
Definition SEO and AEOTechnical SEO
Technical SEO is the work of making a website easy for search engines and AI crawlers to crawl, render, understand and index, covering status codes, redirects, canonicals, sitemaps, robots rules, structured data, internal links and page speed.
Definition SEO and AEOSchema markup
What is schema markup? Schema markup is structured data added to a web page, usually as JSON-LD using the schema.org vocabulary, that describes what the page is about, such as an organization, a service, a product or an article, in a form machines can read without guessing.
Definition