Skip to Main Content


Duplicate Home Pages – Canonicalization

By: Matthew Bennett - Customer Street
Comments ( 0)
Apr
24

Site Construction – The Problem

When building a site there are certain SEO fundamentals that web designers often miss. This is understandable as search engines aren’t their specialist area; although many web designers now have a basic knowledge of SEO and know how to build a site that is search engine friendly.

One of the key SEO mistakes which designers miss is the creation of several home pages due to site navigation. The problem occurs due to the way search engines view sites, or more appropriately the way search engines view URLs. You see, although there is only one index (home) page on a server when that page is delivered to the end user it can appear in the address bar in a variety of different ways:

http://www.yourdomain.com
http://www.yourdomain.com/index.htm
http://yourdomain.com
http://yourdomain.com/index.htm

Each one of these URLs will pull the same file (index.htm) from the server. This is obvious to us, but to the search engines a different URL means a different page and it treats all four as independent pages from each other. This causes various problems with PageRank, duplicate content and spidering.

The Solution

There are various ways which we can solve this problem and all are very easy to setup. What we need to do is tell the server to always produce the correct URL no matter what is requested. We do this by using 301 redirects, htaccess and mod_rewrite.

You don’t need to be a programmer to do this, simply add the code below to your .htaccess file.

To redirect non www URLs to include the www use:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^ yourdomain.com [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301]

To redirect yourdomain.com/index.htm to yourdomain.com/ use:

RewriteEngine on
RewriteRule ^/index\.(php|html)$ http://www.yourdomain.com/ [R=301, L]
RewriteRule ^(.*)/index\.(php|html)$ http://www.yourdomain.com/$1/ [R=301, L]

Any internal site links and any external inbound links will now seamlessly redirect to one URL. This solves the problem but the lesson is… make sure the site is built correctly from the start!

If you liked that, then try ...

SEO things not to do in 2008
So 2007 is over, SEO in 2007 changed dramatically.

Capitalisation of Words
This article is now defunked as Google has changed its algorithm.

  • Digg
  • Technorati
  • del.icio.us
  • BlinkList
  • Reddit
  • StumbleUpon
  • Furl
  • YahooMyWeb
1 Star2 Stars3 Stars4 Stars5 Stars
5
after 3 Votes

Leave a comment

Back to Top