A canonical URL is a way of telling search engines which page is the original or “preferred” version to index. This is a crucial step to prevent duplicate content from being indexed, which is more common than you might think.
For example, if you have a product on your website that can be found at two different URLs, a canonical URL tells a search engine which one to use. This way, you don’t confuse search engines, and you don’t hurt your SEO.
When to use canonical URLs?
Canonical URLs are an essential tool for SEOs. Here are some of the most common times you should use them.
Pagination
When a website separates a list of products or blog posts into multiple pages, it creates a lot of different URLs. You don’t want a search engine to think that each of these pages is unique. To fix this, you can set a canonical URL that points to a single page that has all of the content.
Filtering
Online stores often use filters that create a different URL for each filter that is applied. For example, a page might have a URL like shirts?color=red&size=medium. Each of these URLs can be indexed as a separate page, which can cause duplicate content issues. To fix this, you can use a canonical URL that points to the original category page, without any filters.
Very similar pages
Some websites have pages that are very similar, but with a small difference, like a product that comes in a different color. You should decide if these pages should be indexed separately or if they should have a canonical URL that points to one of the pages. The answer depends on what a user might search for.
Products or Post in multiple categories
If a product or a blog post is listed in multiple categories, it can have multiple URLs. To fix this, you can use a canonical URL that points to the most relevant category.
Guest posts
If you have written a guest post that is published on your own site and on another website, you can use a canonical URL that points to your page. This tells search engines that your page is the original, and it helps you get the SEO value.
By default: self-referencing canonical
A self-referencing canonical is a canonical that points to the page itself. It is a good practice to add a self-referencing canonical to every page that doesn’t have a canonical pointing somewhere else. This can help prevent a search engine from accidentally indexing a different version of the page.
Should I add a self-referencing canonical?
Yes, you should. Even if a page doesn’t have any parameters, other websites might link to your page with their own parameters. A self-referencing canonical will ensure that the original URL is always used.
Common issues with canonical URLs
Canonical URLs are a powerful tool, but they can be a problem if you don’t use them correctly. Here are some common issues to avoid:
Pointing to a non-indexable page
The goal of a canonical URL is to tell search engines which page to index. If you point a canonical URL to a page that has a “noindex” tag, the page will not be indexed. You should always check to make sure the page you are using as a canonical URL is indexable.
Redirected canonical
As your website grows, you might redirect pages to different URLs. If a redirected page is set as a canonical URL, it can cause problems for search engines. You should always use the final, non-redirected URL as a canonical URL.
Duplicate canonical
This happens when a page has a canonical URL that points to a different page, but that page also has a canonical URL that points somewhere else. This is confusing for search engines. To fix this, you should always use the final canonical URL.
Using relative URLs
You should always use an absolute URL for canonicals. An absolute URL includes the protocol (https://), the full domain name, and the path.
Capitalization
Canonical URLs are case sensitive. To avoid confusion, it is best to use lowercase URLs everywhere.
Sitemaps and canonical URLs
You should not include pages with canonical URLs that point to different pages in your sitemap. This is because they will not be indexed anyway. Including them sends mixed messages to search engines and can waste your crawl budget.
What is the difference between a canonical URL and a redirect?
A redirect and a canonical URL are similar in that they both tell a search engine to index a different page. However, with a redirect, a user is automatically taken to the new page. With a canonical, the user stays on the original page, but a search engine is told to index a different one.
When to use a redirect?
You should use a redirect if you don’t want a page to be available. This can be because you’ve changed the URL, or because you’ve merged two pages into one.
When to use a canonical URL?
You should use a canonical URL when you want a page to be available to users, but you want a search engine to index a different one. A good example is a paginated page. You want users to be able to navigate through the pages, but you don’t want each page to be indexed separately.
Canonical URLs for non-HTML content
If you want to add a canonical URL to a file that is not HTML, like a PDF, you can use an HTTP header. This is a technical process that might require a developer.
What is a canonical URL?
Why are canonical URLs important for SEO?
Canonical URLs are important for SEO because they help prevent duplicate content from being indexed. This ensures that your pages get the full SEO value they deserve.
What is a self-referencing canonical?
A self-referencing canonical is a canonical that points to the page itself. It is a good practice to add a self-referencing canonical to every page that doesn't have a canonical pointing somewhere else.
What are some common mistakes to avoid with canonicals?
You should avoid pointing a canonical to a page that is not indexable or to a redirected page. You should also ensure that you are using absolute, lowercase URLs.