Canonical Tag.
A canonical tag is a piece of code on a page that tells search engines which of several URLs with the same content is the primary version that should appear in search results.
A canonical tag is a line in a page’s header that tells search engines which URL is the primary version of a piece of content. This is necessary because the same content is often accessible via multiple URLs: with or without “www,” with filter or tracking parameters in the URL, or as a print version. According to Google, specifying a canonical URL ensures that the desired version appears in search results, that link signals from the variants are consolidated, and that less crawling time is wasted on duplicates.
How the Canonical Tag Works
Each two-page spread includes a reference to the main URL. Technically, this is a `link` element with the value `rel="canonical"` in the page header. Google describes three methods with varying levels of strength: redirects are the strongest signal, the canonical tag is a strong signal, and the entry in the sitemap is a weak signal. For files such as PDFs, Google states that the same information can be sent as an HTTP header.
Important: The canonical tag is a suggestion, not a directive. According to its own documentation, Google selects the version it considers best and may ignore your specification. Additionally, signals from the website’s structure are taken into account—for example, Google prefers HTTPS over HTTP.
What Your Business Should Keep in Mind
Enter the full address. Google recommends using absolute URLs with https:// and the domain name instead of relative paths. Although relative paths are supported, Google notes that they can cause problems—for example, if a test environment is accidentally crawled.
Specify only one primary URL per page. According to Google, you should not specify a URL in the sitemap that differs from the one in the canonical tag. According to Google, the robots.txt file is also not a way to specify the primary version.
After a relaunch or system change, check where the tags are pointing. In projects, we often see that after a move, canonical tags still point to the old domain or the test environment. Then every page points to an address that no longer exists. You can find more about common pitfalls in “5 Common Mistakes in a Website Relaunch.”
Frequently Asked Questions About the Canonical Tag
What happens if I don't set a canonical tag? According to Google, the search engine will then choose which version it considers the best. That might be fine, but it might not be the URL you're linking to and promoting.
Is a canonical tag the same as a redirect? No. With a redirect, visitors and Google are taken directly to the new URL. With a canonical tag, both pages remain accessible. If you want to get rid of duplicate pages entirely, Google recommends using a permanent redirect.
How can I see which URL Google has chosen? The URL Inspection tool in Google Search Console shows the canonical URL selected by Google for indexed pages. To learn how to use this tool, see " How to Use Google Search Console Correctly."
If you want to properly handle duplicate URLs, site migrations, or language versions on your website, check out our SEO support services.
Is your website accessible at multiple addresses? We set up primary addresses and redirects so that Google displays the correct page.
SEO Support →