What is a canonical URL? • Yoast


As a website gets bigger, it’s often hard to prevent pages from becoming duplicates or near-duplicates of each other. This can cause duplicate content issues. If you have two similar pages, and they are both eligible to rank for a certain keyphrase, the search engine simply doesn’t know which of the two URLs it should send the traffic to. To solve this, you can select a preferred URL, this is what we call the canonical URL.

Same content, multiple URLs

You might, for instance, have a post or product that is attached to two categories and exists under two URLs, like so:

https://example.com/black-shoes/black-and-red-shoes/
https://example.com/red-shoes/black-and-red-shoes/

If these URLs are both for the same product, choosing one as the canonical URL tells Google and other search engines which one to show in the search results.

Canonicals also enable you to point search engines to the original version of an article. Let’s say, you’ve written a post for another party that is published on their website. If you’d like to post it on your site too, you could agree on posting it with a canonical to the original version.

How to detect a canonical URL

A canonical URL can be seen in the source of a webpage, by searching for rel="canonical". It is an element only the search engines see, your users won’t be affected by it.

a canonical in the source code

An example of a canonical in the source code of one of our posts: it refers to the original version of the article that was first published on another website.

When to redirect, when to use a canonical

Unlike with redirects, users don’t see your canonical. If you can redirect a URL without breaking your site. You should. But if redirecting makes your site illogical, setting the canonical is a viable solution.

READ ALSO  Create a website with SEO in mind: Technical pointers • Yoast

Want to learn more? Read our Ultimate guide to canonical URLs.



Source link

?
WP Twitter Auto Publish Powered By : XYZScripts.com