SEO Definitions

ID #1007

What is a Canonical URL ?

When you have a webpage, depending on how your server is set up, it could be seen at a number of slightly different web URLs.

  • http://niceseo.com
  • http://www.niceseo.com
  • and one of the following
    • http://www.niceseo.com/index.php
    • http://www.niceseo.com/index.html

Having multiple locations of where a search engine can find your webpage can lead to a penalty. Having a canonicalization URL means that you have only one location where you webpage is possibly found. But setting up your website properly you can redirect visitors and search engines who view other versions of your webpage

.htaccess example to avoid canonicalization

Here is a version that we have in our .htaccess file. Feel free to use it, just update the website domain and away you go. In your lowest folder of your website create a file called ".htaccess" (without quotes) and enter in the ammended version.

<IfModule mod_rewrite.c>
RewriteEngine on


# index.php to /
RewriteCond %{THE_REQUEST} ^GET\ /.*/index\.(php|html)\ HTTP
RewriteRule (.*)index\.(php|html)$ /$1 [R=301,L]

# force www.
rewritecond %{HTTP_HOST} ^niceseo.com/ [nc]
rewriterule ^(.*)$ http://www.niceseo.com//$1 [r=301,nc]
</IfModule>

This file will do all you need to do to make sure that your website will not be penealized by canonicalization penalties.

More info on URL Canonicalization

Tags: canonical URL, Canonicalization, SEO

Related entries: -

Last update: 2008-04-16 10:20
Author: Paul Savage
Revision: 1.1

Digg it! Share on Facebook Print this record Send FAQ to a friend Show this as PDF file
Please rate this FAQ:

Average rating: 0 (0 Votes)

completely useless 1 2 3 4 5 most valuable

You can comment this FAQ