• RSS
  • Print this article!
  • Digg
  • del.icio.us
  • DZone
  • Facebook
  • Mixx
  • Google Bookmarks
  • Design Float
  • Reddit
  • StumbleUpon
  • Technorati
  • Live
  • TwitThis
Home > Front End Development, HTML > Improve SEO with Canonical Attribute

Improve SEO with Canonical Attribute

June 9th, 2009

Although Google doesn’t directly penalize you for duplicate content, having more than one version can often split up the reputation of that content between URLs. Using the canonical attribute you can specify your preferred URL.

URL Parameters

www.websites.com/index.php?category=sample is not the same as www.website.com/index.php in Google’s eyes. The extra parameters could be something simple as sorting a table or how to organize the info on the page. It is still the same content just displayed differently. Unfortunately someone might share the URL with the parameters. This can hurt that reputation for that page. It will split amongst two different URLs.

Canonical Fix

If we wanted http://www.websites.com/index.php to be our preferred URL we simply add this to index.php:

1
2
3
<head>
    <link rel="canonical" href="http://www.websites.com/index.php" />
</head>

This way if there is any additional parameters added to the URL Google knows to use your preferred URL instead.

www. and non-www.

Unfortunately this doesn’t solve the problem if your website uses both www.websites.com v.s. websites.com. What you have to do here is pick which one you want to use. Then just 301 redirect the other one to the one you would like.

Related Links

To see Googles take on this visit Google’s Blog

  • RSS
  • Print this article!
  • Digg
  • del.icio.us
  • DZone
  • Facebook
  • Mixx
  • Google Bookmarks
  • Design Float
  • Reddit
  • StumbleUpon
  • Technorati
  • Live
  • TwitThis
Author: Shawn Categories: Front End Development, HTML Tags: , ,
Comments are closed.