Get Inside the Head of a Crazy Search Marketing Dude… THEN GET OUT!

 

URL Canonicalization is making sure that each page is accessed in ONLY one uniform way.

Now, if you have a website, it probably has a home page. (If it doesn’t that’s just weird but I digress…) That home page can probably be accessed via the following URLs:

http://domain.com
http://www.domain.com
http://domain.com/index.php
http://www.domain.com/index.php
https://domain.com
https://www.domain.com
https://domain.com/index.php
https://www.domain.com/index.php

That’s 8 DIFFERENT URLs for ONE PAGE.

Now imagine if you had 80 links to your site, but they are split equally over those 8 variations. That essentially means you have 10 links to 8 pages according to Google, AND a duplicate content problem to boot.

So what’s a web developer to do? People will just link to whatever they want right?

Right.  BUT you can FORCE canonicalization, and it’s REALLY simple when you have an apache server (running PHP) - so all you blog junkies, listen up.

At the public root on your website, there is a file called .htaccess. This file controls the configuration of your server on the domain level. There are all kinds of tricks you can do with this file, but I am only gonna show you ONE trick that you should use EVERY TIME you set up a new website.

Check it out and do this every time

  • Open up your .htaccess file.
  • Add the following code (to the top or bottom, it doesn’t really matter)

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^chris-hooley\.com
    RewriteRule ^(.*)$ http://www.chris-hooley.com/$1 [R=permanent,L]

  • Replace chris-hooley with the name of your site, and the TLD (the .com) with the TLD of your site if different (for example, .net, .org, etc)
  • Now open up a browser and try typing in your address without the WWW.

You can’t. It’s that easy. All link popularity now hits ONE SINGLE version of your domain name.

This trick can be expanded upon to eliminate secure calls to your site and also to eliminate direct page access, but the main thing is that your domain is clean and canonicalized.

So… happy blogging people, and from now on part of your SEO site launch routine should involved a 45 second update to your .htaccess file.

w0rd!

Tags: , , , , , , , , , ,

Share and Enjoy: save to del.icio.us submit to digg furl this submit to ma.gnolia submit to RawSugar Add the BlinkList NetVous NewsVine Yahoo! MyWeb



Chris Hooley’s -ThinkBait- is powered by WordPress
This is copyrighted stuff. You can't steal it unless you are a jerk. If you like it, send traffic to it.