Google Webmaster Central Blog - Official news on crawling and indexing sites for the Google index

Specify your canonical

Thursday, February 12, 2009 at 12:30 PM

Carpe diem on any duplicate content worries: we now support a format that allows you to publicly specify your preferred version of a URL. If your site has identical or vastly similar content that's accessible through multiple URLs, this format provides you with more control over the URL returned in search results. It also helps to make sure that properties such as link popularity are consolidated to your preferred version.

Let's take our old example of a site selling Swedish fish. Imagine that your preferred version of the URL and its content looks like this:

http://www.example.com/product.php?item=swedish-fish


However, users (and Googlebot) can access Swedish fish through multiple (not as simple) URLs. Even if the key information on these URLs is the same as your preferred version, they may show slight content variations due to things like sort parameters or category navigation:

http://www.example.com/product.php?item=swedish-fish&category=gummy-candy

Or they have completely identical content, but with different URLs due to things such as a tracking parameters or a session ID:

http://www.example.com/product.php?item=swedish-fish&trackingid=1234&sessionid=5678

Now, you can simply add this <link> tag to specify your preferred version:

<link rel="canonical" href="http://www.example.com/product.php?item=swedish-fish" />

inside the <head> section of the duplicate content URLs:

http://www.example.com/product.php?item=swedish-fish&category=gummy-candy
http://www.example.com/product.php?item=swedish-fish&trackingid=1234&sessionid=5678


and Google will understand that the duplicates all refer to the canonical URL: http://www.example.com/product.php?item=swedish-fish. Additional URL properties, like PageRank and related signals, are transferred as well.

This standard can be adopted by any search engine when crawling and indexing your site.

Of course you may have more questions. Joachim Kupke, an engineer from our Indexing Team, is here to provide us with the answers:

Is rel="canonical" a hint or a directive?
It's a hint that we honor strongly. We'll take your preference into account, in conjunction with other signals, when calculating the most relevant page to display in search results.

Can I use a relative path to specify the canonical, such as <link rel="canonical" href="product.php?item=swedish-fish" />?
Yes, relative paths are recognized as expected with the <link> tag. Also, if you include a <base> link in your document, relative paths will resolve according to the base URL.

Is it okay if the canonical is not an exact duplicate of the content?
We allow slight differences, e.g., in the sort order of a table of products. We also recognize that we may crawl the canonical and the duplicate pages at different points in time, so we may occasionally see different versions of your content. All of that is okay with us.

What if the rel="canonical" returns a 404?
We'll continue to index your content and use a heuristic to find a canonical, but we recommend that you specify existent URLs as canonicals.

What if the rel="canonical" hasn't yet been indexed?
Like all public content on the web, we strive to discover and crawl a designated canonical URL quickly. As soon as we index it, we'll immediately reconsider the rel="canonical" hint.

Can rel="canonical" be a redirect?
Yes, you can specify a URL that redirects as a canonical URL. Google will then process the redirect as usual and try to index it.

What if I have contradictory rel="canonical" designations?
Our algorithm is lenient: We can follow canonical chains, but we strongly recommend that you update links to point to a single canonical page to ensure optimal canonicalization results.

Can this link tag be used to suggest a canonical URL on a completely different domain?
**Update on 12/17/2009: The answer is yes! We now support a cross-domain rel="canonical" link element.**

Previous answer below:
No. To migrate to a completely different domain, permanent (301) redirects are more appropriate. Google currently will take canonicalization suggestions into account across subdomains (or within a domain), but not across domains. So site owners can suggest www.example.com vs. example.com vs. help.example.com, but not example.com vs. example-widgets.com.

Sounds great—can I see a live example?
Yes, wikia.com helped us as a trusted tester. For example, you'll notice that the source code on the URL http://starwars.wikia.com/wiki/Nelvana_Limited specifies its rel="canonical" as: http://starwars.wikia.com/wiki/Nelvana.

The two URLs are nearly identical to each other, except that Nelvana_Limited, the first URL, contains a brief message near its heading. It's a good example of using this feature. With rel="canonical", properties of the two URLs are consolidated in our index and search results display wikia.com's intended version.

Feel free to ask additional questions in our comments below. And if you're unable to implement a canonical designation link, no worries; we'll still do our best to select a preferred version of your duplicate content URLs, and transfer linking properties, just as we did before.

Update: this link-tag is currently also supported by Ask.com, Microsoft Live Search and Yahoo!.

Update: for more information, please see our Help Center articles on canonicalization and rel=canonical.

The comments you read here belong only to the person who posted them. We do, however, reserve the right to remove off-topic comments.

273 comments:

«Oldest   ‹Older   201 – 273 of 273
Ryan Allen Carrillo said...

Does the rel canonical pass pagerank as a 301 redirect would? What happens to the PR that comes to a page that is not the canonicalized page, does this get passed along to the canonical of that page?

Christina said...

We currently implement the canonical tag. The only thing it can’t do is prevent the robot from wasting its time calling the page based on all its variations. It has to load the page before it can determine that it already had indexed the desired url. Any recommendations?

Old Luxe, Jewelry &amp; Vintage Gifts said...

I added the Rel="canonical" to my website. I followed the instruction provided by Google. Thank you Google.

AutoCADHocasi.com said...

Very usefull seo information about canonical url. thanks.
http://www.seohocasi.com/kuralli-url-url-canonicalization/

Anand Mistry said...

This is really great post. I have similar kind of canonical issue for my home page.

http://xyz.com/ & http://www.xyz.com/index.php is not re-directing to http://www.xyz.com/.

So, will it harm to my ranking?

ontherocks said...

If i have a category of 18 articles, and by default i show 9 in each page; so i have 2 pages
http://www.deporvillage.com/zapatillas-running and http://www.deporvillage.com/zapatillas-running?p=2

if i sort by price, on page 1 i have
http://www.deporvillage.com/zapatillas-running?order=price&dir=asc and page 2 sort by descendant i have http://www.deporvillage.com/zapatillas-running?order=price&dir=asc

the 2 urls have bigger differences such as the order (as it mentions onthe paragraph) as in page 1 they appear the 9 most expensive ans in page 2 they appear the 9 most cheaper.

Hope i explained myself.

does it still makes sense to implement canonical?

onetwib said...

This is exactly what I need

I have URLs with both needed AND unneeded parameters in the query strings.

I'm going to implement that in order to skip these extra unneeded parameters in the query string

This made my day!

Thanks!

Lrkwz said...

Shoul I specify a profile as stated in http://www.w3.org/TR/1999/REC-html401-19991224/types.html#type-links ?
Which profile (http://www.w3.org/TR/1999/REC-html401-19991224/struct/global.html#profiles) should I use for "canonical"?

Marie said...

@ekristen - UTM tracking parameters should not be used for internal tracking as I just learned this at the SMX-East NYC Conference. UTM is for external tracking only. From my understanding, adding the code for internal tracking affects your Google Analytics data. Not sure if it affects Google Webmaster as well.

ReviewDave said...

Hey,

What about inner links? example, I have a page and it links to another page on my website and I use a href=http://www.example.com" rel="canonical"

what does this do?

Valentinn said...

Hi, by mistake I punt the canonical in all urls of a website, google didn´t indexe it anymore, now I ook away the canonical, will google index de urls again?

Phil said...

Do you need Canons if the URL of the actual page is simple and the content is not duplicated for example www.domianame.com/name

salman said...

i face similar duplicate meta description error problem.


original:
http://www.systemoflife.com/articles/refutation/191-istegatha-narration-o-slaves-of-allah-help-me-and-its-reality

duplicate:
http://www.systemoflife.com/articles/refutation/191-istegatha-narration-o-slaves-of-allah-help-me-and-its-reality?tmpl=component&print=1&page=

addition in duplicate article at the end is: ?tmpl=component&print=1&page=

how do i resolve this issue
thanks in advance

PFMarconi said...

Question from a novice.

My original entry page saved as HOME htm but later changed to INDEX htm. Google displays the old version first.

Please tell me if I'm wrong with this single line -
link rel="canonical" href="http://www.cumbria-dog-training.com/"

Pankaj Chauhan - SEO Expert said...

I have a great confusion with the canonical tag. What if canonical and non-canonical tag is same??

John said...

As far as w3c validation goes

Should the example



be without the "/> like " > ?



?

UsedVans said...

I have a URL structure that is as follows:

www.vanlocator.co.uk/van/ford/transit/
this shows a results listing, there are tens of pages of results for this particular make/model and we add:
www.vanlocator.co.uk/van/ford/transit/pageno=2
etc after it. Do I need to put a canonical tag in the susequent pages?

PixelShots said...

i have to ask regarding a problem setting the preferred domain in webmaster tools.

i have a blogspot blog of which i have added sitemaps of both http and www. versions are added in the webmasters for verfying the links and all.

what i have noticed is eventhough i have builded backlinks for the http version lot motre backlinks are pointing to the www version of my site.

It caused like that for many of the directories and blog promotion sites links back to www version in default.

how can i point out the www version links to my http links by setting http links as preferred domain. can't see any option in webmasters as it's shown as "Restricted to root level domains only" under the preferred domain settings.

will adding link rel="canonical" href="http aaa.blogspot.com" under header tag set http as preferred domain?

and after all, is adding both http and www version sites and sitemaps of same site in webmasters bad for the site, considering the ranking and all.

Web said...

The canonical tag has saved me so much time when dealing with duplicate content. Getting the proper 301 redirects for clients with different platforms was a pain in the neck. The canonical tag is the perfect solution to the headaches 301 can cause.

Blue Beacon said...

Can i use the following code
"canonical" href="http://bluebeacongroup.com"
"canonical" href="http://http:www.bluebeaconinfosys.com/"

אפרת נקש said...

I have an asp site
I have one homepage: default.asp

currently you can access this homepage (and every other page in my website) by http://www.domain.com/ and also http://domain.com/

Do I need to add:
link rel="canonical" href="http://www.domain.com/" so all SEO stats will be accumulated to the same page, regardless of specifying www or not?

Thanks,

Efrat

Agraj said...

Exactly i was searching for this, it may be help full for seo guy like me.

אפרת נקש said...

Is the canonical link tag required only on homepage, or also in other pages?

smadar-e said...

Hi
I have articles in my website, each one has also "print" version:
http://www.mysite.com/index.php?categoryId=41184&itemId=78428
http://www.minisrael.com/index.php?categoryId=41184&itemId=78428&print.
In order to avoid duplicate content which option is the best:
a. "no index, no follow"
b."canonical"
Thanks
Smadar-e

PeeJaan said...

it i a new feature. its very helpful to our seo strategy. canonical tag is so important for it.

Tissa said...

Hi guys!

Can anyone explain me how could I use this atribute in this case:
On our site (mass-media) we have thousands of separate news pages (every page has her own URL). But all of the texts from these news pages are also situated on the one bi-i-ig page, where people can read all news without clicking anywhere. How can I tell to Google's bot that canonical pages are news pages, and this big one - is a double?

Thanks in advance!

hayat said...

Nice information provided here which is very useful to everyone...I am not a huge fan of this side, there do seem to be a lot these days...thanks for posting...

Man and Van said...

this great for duplicate content now everybody should follow codes of practice

Igi Fischer said...

I actually have a question regarding the code itself. Must the code end with " />" or can it also be ">"? - I am using and according to W3C " />" does not work for this doc type. What to do?

LakiPolitisMediaDesign said...

Excellent piece of information to have. So I can now change my url rewrite pattern in IIS 7.5 and make sure that even google finds the original query, it still looks like the rewrite. This is a win!!

Hopefully I can stop having my search results look like:
http://lakipolitis.com/services.aspx?service=webdesign

and have the rewrites kick in like:
http://lakipolitis.com/webdesign.

Thank you, Google!!

Roshan Jadhav said...

I think this is very useful information, thanks for sharing

Mavin Infotech said...

Hi guys!

I have a site which has two urls. One url is with s and other is without s. ie www.example.com and www.examples.com. How can i use canonical for the entire html site.

info said...

What would be the way to use canonical to handle this situation?:
One page sells regular item(s)at regular price. A separate 'clearance page' sells the same item, but at a reduced price because of being open box, second quality or return. Product descriptions will be the same on both pages and only the shopping cart knows the difference.

Didu said...

That's great! I've been having problems with duplicate content, struggling, but this solves my problem. Thanks

lennon2 said...

We link from the homepage of our news website to anchor positions of the most recent entries by id on our offsite blog's main index: [a href="http://newsblog.ourblogs.com/#631270"]Headline[/a]

Is there a way to show Google what the canonical permalink of each entry is rather than its id? The permalink is on each entry's headline link just below this anchor in the code.

Mohammad Abu said...

What should the directory owners do coz most of them have the same titles and contents almost the same.

Chahi tariq said...

Nice thing to implement

John's Secret Identity™ said...

Due to limitations in the old software our site uses (changes are coming but meanwhile...) for certain pages it cannot generate a canonical link in the head. It is possible for javascript to insert a canonical link client-side. Will that work?

Ex: http://www.virginiaquilter.com/online-store/scstore/c-Tools.html

John Mueller said...

@John's Secret Identity™: No, using JavaScript to add a rel=canonical won't work, since it isn't visible to crawlers.

Nola said...

I think this is an inappropriate use of canoncial. On this page, the canonical goes to page 1 of the story, but it's not duplicate content at all. Why wouldn't that site want their page 2 to index? Sort of ridiculous.

ali said...

anyone can tell me how can i find best keyword for my blog i mean whats the best software tll me about adwerd keyword tool this is really working



this is my blog http://my-best-entertainment.blogspot.com/

nakal said...

I still confused when using canonical link in my wordpress blog. I have some url search page and want use canonical link in the search page url. everybody can explain it ... ?

WISDOMJOBS said...

my website is open for example: www.domain.com/products.html and www.domain.com/products.php. is there any prb with search engines.

bitpusher1010 said...

Is it proper to use the Canonical tag in urls that are identical, except in the language (ie.e French, Spanish) that they were written in?

Andrew713_graphicxtras said...

google still seems to be picking up multiple pages with the same canonical link i.e http://www.graphicxtras.com/Products/psbrush_more3.htm redirects to an error page even though there is a http://www.graphicxtras.com/products/psbrush_more3.htm with the canonical link of "http://www.graphicxtras.com/products/psbrush_more3.htm" .. /Products is not correct.. it is /products and that is the canonical link for that file - but seems to be ignored

Techtic Solutions said...

try www.google.com and www.google.com/index.html

It does not redirect, so should call canonical links to be a myth, because google itself is not following it.

nicoxen said...

Do blogs have a use for the canonical tag? What if each blog post is unique, with a unique content?

Ravirajsinh Jadeja said...

google sites don't allow to edit canonical html tag. please help for google sites.

magic bullet said...

We are planning on 301'ing the pages onto the new, combined page.

Andrew713_graphicxtras said...

still getting endless reports of meta duplications etc even though all the pages have canonical.

i.e. http://www.graphicxtras.com/Products/ae1.htm and http://www.graphicxtras.com/products/ae1.htm and google is still listing a duplicate title etc even though the canonical states that the page is
http://www.graphicxtras.com/products/ae1.htm

I've have never used /Products in any of my file structures and yet /Products seems to be popping up everywhere.

Likewise, many of the pages also now (because of the Panda algorithm' changes) have "noindex" and yet google is still endlessly listing them (but not the actual key pages) - also SVG, PDF, SWF etc pages that no longer exist fill the google index.

been struggling with this for too long - to the detriment of actually creating anything new products for the site

Other search engines seem to reflect the site structure more accurately - but as 99% people visit the site from google, that hardly helps

surfsurfsurf said...

We have placed a canonical system over our www.northdevonwetsuits.co.uk Ecommerce site but are still getting 'duplicate meta descriptions' warnings on webmaster tools - will these ever disappear or does this mean that Google doesn't recognize the tags that we have used?

Dexter said...

Like :)

and if I want to make a FR site of EN site on same domain www.wallhd.com

do I need to use canonical?

Stb said...

Hello,
If we insert a < link> tag inside a < style> tag... does it works yet?

For example:

< style type="text/css" afrres="true">
< link href="www.yahoo.es" rel="canonical" />
< /style>

Thank you in advance!

arctoswatch said...

This is extremly useful especially for online shops that have a ton of duplicate links and links titles.

Powoow said...

Hi there,
I got a question. Let's say unique URL should be for page A and I have a duplicate content on Page B.
What happens if I included by mistake the canonical tag in both page A and Page B with a canonical pointing to URL A ?
I mean, is it an issue to have a canonical tag inside the source code of the correct page pointing to itself ?
Thanks in advance.

Powoow said...

Hi there,

I got a question. Let's say unique URL and correct page should be URL A for Page A. I have duplicate content on page B.

Is it an issue if I wrongly implemented within source code of Page A, a canonical tag pointing to itself (page A)? Same canonical tag has been implemented within source code of page B.

Thanks in advance

onlinebooks said...

I have a registration page, where referral name is in the url.

Can I use canonical url for this

Dibo said...

hello,
can i use it withe the same page?

pankaj sharma said...

Hi to all i am just a newbaby at this can to tell me how to add content on the home page of a blogspot my blogspot is pankajsharmaseo.blogspot.com

w3origin said...

I am totally confused about rel=canonical. I just want to clear some point regarding this.
1. If a page has used this tag then that page will be indexed by Google or not ?
2. If that page is indexed by Google then it will be shown in cache version or still it will show 404
I need proper answers regarding my queries. Thanks

Arraial d'Ajuda said...

Now this is great info! This jsut takes care of the problem i had right now, thanks !!

Arraial d'Ajuda said...

Thanks guys, you just solved our problem! We were going mad about those Canonical URL's. Finally someone who made it pure and simple.

Tenddeapact-Solutions said...

This is the best explanation of using the canonical link element I have seen.

Sure makes thing easy for eCommerce sites.

Shadow said...

I am new to this so I just need some clarification.Yesterday I downloaded microsoft SEO tool,did a crawl of my website and it told me I have got several canonical errors,would putting this code in the head section solve this ?

This is the recommended action it suggests to do :

Pick a canonical URL format for your site and then ensure that all the links in your site follow that format. (For example, always use lowercase letters.) If an external link that points to your site does not use the canonical URL format, use permanent HTTP redirection to redirect site visitors and search engines to a canonical equivalent of that URL.

I don't understand,could someone help.

Cooking class said...

Great article Maile, thanks.
The CMS we use can sometimes spit out different versions of web pages and URLs so this should help our duplicate content problem.

smartphonesoftwareinc said...

Nice informative article. I have re-written some urls of my website and now want to redirect the old urls to the new one. I am trying to use it on http://smartphonesoftwareinc.com/restaurant-manager.html and re-directing that to http://smartphonesoftwareinc.com/restaurant-manager.html but the redirect is not sucessful. please suggest.

Fortune Cookie said...

This is great info for inserting the canonical code. One question I also have is how will this affect page rank. We recently eliminated underscores from our URLs for examples http://www.fortunecookiecreations.com/custom_fortune_cookies.html became http://www.fortunecookiecreations.com/custom-fortune-cookies.html
Is this something we should implement? We also have other base URLs that we are thinking of using this on.

AstroGremlin said...

WooRank is telling me "The language you have specified in your website is different than the language detected by Google™. Use the META Language Tag to specify the natural language of your website." I have a WordPress site. Can anyone tell me how to specify language, preferably with a plug-in?

Васил Тошков said...

I prefer to use "Content-Location" HTTP header for that purpose, because it is a W3 standard since the beginning of the Internet. Are you considering to support it?

Unknown said...

Thanks for the info. I have a question for you. I have a website build in php. For the implementation of clean urls, I used htaccess to redirect pages like www.thinkmovie.in/album.php?folder=xxxx to www/thinkmovie.in/XXXXXX. But In the intial stages of the site, google indexed some of the non clean urls. So can I add the link canonical in the preferred version page also.


One more question is that what if I cannot do the above in head tag and only in the body tag of the page

Fahim kamran mirza said...

thanks for the help but i am having a problem like i want to re direct http://www.read-quranonline.com/recitation-1 to http://www.read-quranonline.com/recitation-1.html pages as they are the same and Google is indexing them as different url and due to that i think my site is penalized due to that plz let me specify tat i have a large site and what i found that it has don the same thing to most of my pages like can any body suggest me some thing and using htaccess file very important or any other way and if the person is from Google it would be great

Terese Mörtvik said...

About duplicate content.

I have blog A and B.

Blog A is a personal blog with varied content + design content.

Blog B is a professional blog with other varied content + design content.

Can I point to blog B as the canonical for blog A's design content?

Will Google understand that the canonical only applies to dublicate content? And still index the non-duplicate content for each site?

Google Webmaster Central said...

Hi everyone,

Since over a year has passed since we published this post, we're closing the comments to help us focus on the work ahead. If you still have a question or comment you'd like to discuss, free to visit and/or post your topic in our Webmaster Central Help Forum.

Thanks and take care,
The Webmaster Central Team

«Oldest ‹Older   201 – 273 of 273   Newer› Newest»