Canonical Tag
Updated by Chima Mmeje — November 11, 2024.
What is a canonical tag?
A canonical tag (aka “rel canonical”) is a way of telling search engines that a specific URL, known as the canonical URL, represents the master copy of a page. Using the canonical tag prevents problems caused by identical or “duplicate” content appearing on multiple URLs. Practically speaking, the canonical tag tells search engines which version of a URL you want to appear in search results, explicitly telling search engines which version of a page is the preferred one for indexing.
Code sample
Why does canonicalization matter for duplicate pages?
Duplicate content is a complicated subject, but when search engines crawl many URLs with identical (or very similar) content, it can cause a number of SEO problems related to duplicate pages. First, if search crawlers have to wade through too much duplicate content, they may miss some of your unique content. Second, large-scale duplication may dilute your ranking ability. Finally, even if your content does rank, search engines may pick the wrong URL as the “original.” Using canonicalization helps you control your duplicate content by telling search engines which version of a page is the preferred one for indexing and improve search engine performance.
Double down on duplicate content with Moz Pro
Moz Pro's Site Crawl feature finds and lists pages with missing canonical tags so you can take action fast. Take a 30-day free trial on us and see what you can achieve:
The problem with URLs
You might be thinking “Why would anyone duplicate a page?” and wrongly assume that canonicalization isn’t something you have to worry about. The problem is that we, as humans, tend to think of a page as a concept, such as your homepage. For search engines, though, every unique URL is a separate page.
For example, search crawlers might be able to reach your homepage in all of the following ways:
- http://www.example.com
- https://www.example.com
- http://example.com
- http://example.com/index.php
- http://example.com/index.php?r…
To a human, all of these URLs represent a single page. To a search crawler, though, every single one of these URLs is a unique “page.” Even in this limited example, we can see there are five copies of the homepage in play. In reality, though, this is just a small sample of the variations you might encounter.
Modern content management systems (CMS) and dynamic, code-driven websites exacerbate the problem even more. Many sites automatically add tags, allow multiple paths (and URLs) to the same content, and add URL parameters for searches, sorts, currency options, etc. You may have thousands of duplicate URLs on your site and not even realize it. Search engines may not recognize these variations as the same page, leading to issues with duplicate content. Implementing canonical tags helps in telling search engines which version of a page is the preferred one for indexing, thereby addressing these issues.
Canonical tag best practices
Duplicate content issues can be extremely tricky, but here are a few important things to consider when using the canonical tag:
Specifying a canonical URL helps in telling search engines which version of a page to index and display in search results, thus optimizing crawl budgets and potentially improving rankings in Google Search.
1. Canonical tags can be self-referential
It's ok if a canonical tag points to the current URL. In other words, if URLs X, Y, and Z are duplicates, and X is the canonical version, it's ok to put the tag pointing to X on URL X. This may sound obvious, but it's a common point of confusion.
2. Proactively canonicalize your home-page
Given that homepage duplicates are very common and that people may link to your homepage in many ways (which you can't control), it's usually a good idea to put a canonical tag on your homepage template to prevent unforeseen problems.
The moz.com homepage has a self-referential canonical tag.
3. Spot-check your dynamic canonical tags
Sometimes bad code causes a site to write a different canonical tag for every version of the URL (completely missing the entire point of the canonical tag). Make sure to spot-check your URLs, especially on e-commerce and CMS-driven sites.
4. Avoid mixed signals
Search engines may avoid a canonical tag or interpret it incorrectly if you send mixed signals. In other words, don't canonicalize page A -–> page B and then page B -–> page A. Likewise, don't canonicalize page A -–> page B and then 301 redirect page B -–> page A. It's also generally not a good idea to chain canonical tags (A-–>B, B-–>C, C–->D), if you can avoid it. Send clear signals, or you force search engines to make bad choices.
5. Be careful canonicalizing near-duplicates
When most people think of canonicalization, they think of exact duplicates. It is possible to use the canonical tag on near-duplicates (pages with very similar content), but proceed with caution. There's a lot of debate on this topic, but It's generally ok to use canonical tags for very similar pages, such as a product page that only differs by currency, location, or some small product attribute. Keep in mind that the non-canonical versions of that page may not be eligible for ranking, and if the pages are too different, search engines may ignore the tag.
6. Canonicalize cross-domain duplicates
If you control both sites, you can use the canonical tag across domains. Let's say you're a publishing company that often publishes the same article across half a dozen sites. Using the canonical tag will focus your ranking power on just one site. Keep in mind that canonicalization will prevent the non-canonical sites from ranking, so make sure this use matches your business case.
Advanced canonicalization methods
While canonical tags are a common method for specifying the preferred version of a web page, there are several advanced canonicalization methods that can also be effective:
- Using a rel=”canonical” HTTP header: This method involves sending a rel=”canonical” header in the HTTP response of a web page, which specifies the canonical URL of the page. This is particularly useful for non-HTML content like PDFs.
- Using a sitemap: A sitemap is a file that lists all the URLs on a website and can be used to specify the canonical URL of each page. This helps search engines understand the structure of your site and the preferred versions of your pages.
- Using redirects: Redirects can be used to guide users and search engines to a preferred version of a web page or URL. For example, a 301 redirect permanently moves a page to a new URL, signaling to search engines that the new URL is the canonical version.
- Using hreflang annotations: Hreflang annotations specify the language and region of a web page, helping to canonicalize pages with similar content but different languages or regions. This ensures that users see the most relevant version of your content based on their location and language preferences.
By employing these advanced methods, you can provide clear signals to search engines about the preferred versions of your pages, enhancing your site’s SEO performance.
Canonicalization and SEO strategy
Canonicalization is a vital component of a comprehensive SEO strategy. Here are some tips for incorporating canonicalization into your SEO practices:
- Use canonical tags to specify a preferred version of each page: This helps avoid duplicate content issues and improves search engine rankings by consolidating ranking signals to the canonical URL.
- Use redirects to guide users and search engines to a preferred version of a page: This improves user experience and ensures that search engines index the correct version of your content.
- Use sitemaps to specify the canonical URL of each page: This enhances search engine crawlability and helps avoid duplicate content issues by clearly indicating the preferred versions of your pages.
- Test canonicalization: Regularly test your canonical tags to ensure they are working correctly and that search engines are recognizing the canonical URLs. Tools like the MozBar and site audit software can help with this.
- Monitor search engine rankings: Keep an eye on your search engine rankings to ensure that your canonicalization efforts are having a positive impact. Adjust your strategy as needed based on your rankings and performance metrics.
By integrating these tips into your SEO strategy, you can effectively use canonicalization to improve your site’s search engine performance and avoid duplicate content issues.
Canonical tags vs. 301 redirects
One common SEO question is whether canonical tags pass link equity (PageRank, Authority, etc.) like 301 redirects. In most cases, they seem to, but this can be a dangerous question. Keep in mind that these two solutions create two very different results for search crawlers and site visitors.
If you 301 redirect Page A-->Page B, then human visitors will be taken to Page B automatically and never see Page A. If you rel-canonical Page A-->Page B, then search engines will know that Page B is canonical, but people will be able to visit both URLs. Make sure your solution matches the desired outcome.
How to audit your canonical tags for SEO
When auditing your canonical tags, there are a number of things worth checking for optimal SEO performance. Here's a checklist:
- Does the page have a canonical tag?
- Does the canonical point to the right page?
- Are the pages crawlable and indexable?
A common mistake is to point the canonical at a URL that is either blocked by robots.txt, or is set to "noindex". This can send mixed and confusing signals to search engines. A few common ways to inspect and audit your canonical tags are below.
1. View-source
In most browsers, you can right-click to view-source, or simply type it into the address bar, like this: view-source:https://moz.rankious.com/_moz/learn/seo/cano... the source code, search for canonical tag in the <head>. If present, it should look like this:
2. Use the MozBar
The MozBar is a free SEO toolbar that will easily show you the canonical tag on any given page. After installation, simply hit the Page Analysis tab, then click on "General Attributes" to view any canonical information.
3. Audit in bulk with software solutions
Most SEO site audit software allows you to audit canonical tags in bulk. Moz Pro checks for missing canonical tags, and can do so for 100s of thousand of pages at a time.
Canonicalization on specific platforms
Implementing canonicalization can vary depending on the platform you use. Here’s how it works on some popular platforms:
- Wix: Wix automatically adds a self-referential canonical tag to every page on a website, ensuring that each page is recognized as its own canonical version. Additionally, Wix allows users to customize the canonical tag for each page, providing flexibility for more complex SEO needs.
- WordPress: WordPress offers several plugins that can assist with canonicalization, such as Yoast SEO and All in One SEO Pack. These plugins make it easy to add and manage canonical tags, helping you avoid duplicate content issues and improve your site’s search engine rankings.
- Shopify: Shopify allows users to specify a canonical URL for each product page, ensuring that search engines recognize the preferred version of each page. Shopify also has a built-in canonicalization feature that can be enabled in the settings, simplifying the process for store owners.
By leveraging the tools and features available on these platforms, you can effectively implement canonicalization and enhance your site’s SEO.
Put your skills to work
The MozBar SEO toolbar shows you relevant metrics right in your browser, as you surf the web.
Additional Articles on On-Site SEO
What Are On-Page SEO Factors?Title Tag
What Are Meta Descriptions and How to Write Them
Show More