Google and the Canonical Link Rel
Google has introduced a link tag rel value of canonical which is used for defining the value of the page that Google should use. Why? Lets say you have an eCommerce site and one of the product URLs is:
http://yoursite.com/product.php?p=david+walsh+blog+book
Imagine now that you can make a slight customization to the product that changes the URL to:
http://yoursite.com/product.php?p=david+walsh+blog+book&color=red
Uh oh -- Google sees duplicate content! The code shows essentially the same page so Google thinks you're pulling gangsta stuff. Now you can tell Google what URL to use for the current page to avoid duplicate content penalization.
The XHTML
<link rel="canonical" href="http://yoursite.com/product.php?p=david+walsh+blog+book" />
Don't let your website get penalized by Google; use this link/rel tag combination for your highly variable pages.
I was inspired when I first saw Addy Osmani's original ShineTime blog post. The hover sheen effect is simple but awesome. When I started my blog redesign, I really wanted to use a sheen effect with my logo. Using two HTML elements and...
CSS animations are right up there with sliced bread. CSS animations are efficient because they can be hardware accelerated, they require no JavaScript overhead, and they are composed of very little CSS code. Quite often we add CSS transforms to elements via CSS during...
I published a post a year ago detailing how you can copy to the clipboard using JavaScript. The post was very popular and why would it be? Copying content from a webpage without needing to use the default browser functions is awesome. One trend I've...
Since we've already figured out how to create TinyURL URLs remotely using PHP, we may as well create a small AJAX-enabled tiny URL creator. Using MooTools to do so is almost too easy.
The XHTML (Form)
We need an input box where the user will enter...
Note that the All-in-one SEO WP plugin does this for you. Good to know should you bloggers be worried.
I think the article could have given a bit more info on canonical urls…
@Adriaan: Thank you for your comment. I could have but my fear is spending a ton of time on an explanation when 99% of people would prefer a brief explanation with a sample problem and solution like I provided. I appreciate your honesty!
OK, I had to go to Google to find out where in the document this LINK goes… But this is good info, thanks for the the tip. Google implies that some other search engines look at this too.
time to google for more about canonical ;)
Cool information!
Liked the posts about firefox extensions too, really useful for beginners on that world.
ps: you forgot to close the link tag.
Add this code to the section of the page.
< head >
< title > Davidd Walsh Blog Book< /title >
< link rel=”canonical” href=”http://yoursite.com/product.php?p=david+walsh+blog+book” />
< /head >
@Fabio, No missing < /a > tag as its a < link .. >
Good I want to implement it first and have post this tips. Thanks
great post is there any problem if i use rel tag for all of my links
David,
Thanks for the tip about rel canonical.
Peter
You can find more info here: http://support.google.com/webmasters/bin/answer.py?hl=en&answer=139394
Thanks for the article.