Prevent duplicate content with canonical URLs in Yoast SEO

  • Avoid duplicate content penalties and issues
  • Make sure the right version of your page ranks
  • Get canonical tags everywhere, automatically
Get Yoast SEO Premium Only $89 USD (ex VAT) for 1 site
or

Download the free version »

If your pages don’t use canonical URL tags, search engines can easily get confused by duplicate content on your website. That can hurt your rankings, visibility, and traffic.

That’s where Yoast SEO comes in. Yoast SEO automatically includes a canonical URL tag on all of your pages and templates. That helps Google, Facebook, Pinterest and other platforms to understand exactly how your site is structured. No more duplicate content issues.

Why do I need canonical URL tags?
Canonical elements for paginated archives
Changing the canonical in Yoast SEO

Why do I need canonical URL tags?

Canonical URL tags help search engines and social media platforms to help identify the ‘original’ version of any page on your website.

Whenever your content can be viewed on different URLs (for example, when a product is in three different categories, or when you use campaign parameters in your URLs), the canonical URL tag tells search engines which the ‘correct’ URL for that page is.

Did you know?

WordPress only sets canonical URL tags for posts and pages. It doesn’t add them to any other templates, such as your category pages, author indexes, or even your homepage! Don’t worry – we output canonical URLs on every page type!

✅ They consolidate link value

If you’ve done all the hard work required to get people linking to your pages, then you want to make sure that those links count. If you’re not using canonical URL tags, then links to different versions of your pages might mean that their value is diluted.

With a canonical URL tag in place, Google understands that the links to all of those different URLs should be counted against the original version. That means that instead of having lots of weak pages with few links, you have one strong, single page, which all of the links point to.

✅ They prevent internal competition

When search engines get confused, those different ‘versions’ of your pages might end up competing against each other – even from within your own site.

That makes it really important to tell Google which of these is the original version. Then they can combine the value of each of those versions into one single, strong page.

✅ They help you get better search engine listings

When Google displays your pages in their search results, you want to put your best foot forward. Canonical URL tags help to tell Google which URL they should show, and where they should send visitors when they click. 

Remember, the search engine results page is your shop front, and, every detail matters when it comes to convincing users to click on your listing! Sending visitors to the wrong version of a page, or showing confusing text in your snippet might confuse or frustrate your visitors.

✅ They consolidate social shares

It’s not just Google that uses canonical URL tags – social networks like Facebook, Pinterest and more also rely on understanding which the original version of the page is.

When somebody shares your page, you want to make sure they’re sharing the right version. Canonical URL tags make sure that you’re tallying up those share counts against the original version of your page, instead of splitting up your scores against lots of different URLs.

Read our ultimate guide to rel=canonical if you need more information on canonical URLs.

Extra features

✅ We let you manually change the canonical URL

In some cases, you might want to choose your own canonical URL on a page. Our plugin lets you do this on a page-by-page basis, and it’s as easy typing in the URL you want to use.

How to manually handle the canonical in Yoast SEO
Manually handling canonicals is easy in Yoast SEO

We also support cross-domain canonical URL tags, so you can reference pages on other websites. This might be useful if your content is published on multiple sites, and you want to prevent those pages from competing with each other. Setting a cross-site canonical URL can help to achieve this by consolidating links and social shares to a specific page.

✅ We provide security controls

Canonical URLs are a powerful tool, so they should be used with care. On sites with multiple editors and administrators, most of those users won’t need to worry about or set manual values. To keep things simple and secure, we let you hide the controls from specific users or groups.

✅ We manage when you shouldn’t output a canonical URL

There are some cases where setting a canonical URL tag isn’t necessary, and where it may even cause conflict. On error pages, or on pages which you don’t want to show up in Google (which you’ve set to noindex), then it’s best practice to remove the tag entirely. We take care of that automatically.

Canonical elements for paginated archives

On paginated pages like category or tag archives, date archives or author archives, Yoast SEO will add a canonical to the current paginated page. So, say you’re on example.com/category/uncategorized/page/2/, the canonical will point at exactly that URL. Yoast SEO will also addrel="next" and rel="prev" links, pointing to the previous and the next page in the paginated series. These three combined make sure that search engines understand that they’re on a paginated series and will crawl it accordingly.

A common misconception is that the canonical on a paginated page should always point to page 1 in the series. This is not the case. When you do that, you run the risk of search engines not indexing links that appear on page 2, 3 etc. of your archives. This would cause older articles to drop out of the search results entirely.

If the rel="next" and rel="prev" tags don’t work on your paginated content, read this article.

Changing the canonical in Yoast SEO

Adding canonicals in Yoast SEO (free and premium) works automatically and, generally, you do not need to change anything. If, however, you wish to make some changes, you can follow the steps in this article.

Developer documentation

We have fully documented — including a function spec and API — this feature on our Canonical URL Developer pages.

Even better SEO with Yoast SEO Premium!

  • Optimize your site for the right keywords for your users
  • Avoid dead links in your site
  • Get previews for sharing on Twitter and Facebook
  • Content quality and link suggestions as you write
More info