The Biggest Mistakes in Web Design - Part One - Canonical URLs

I know what you're thinking, what the heck is aAltering web pages
'canonical URL' when it's at home? Well, it's the URLThis is easy if you have access to your web page
that you want your visitors and Google to see whencode and it simply means adding a line into the top of
they come to your site. Now, if you're a bit like Iyour site between the 'head' tags. If you're lost and
was a few years ago, you're thinking that surelydon't know what I'm talking about then it's probably
visitors can only see one version of your sitebest you back off now and go get your friendly IT
anyway.geek to do it.
You're probably wrong.Simply put the following into the page: " />
For example, some websites will display their contentObviously replace 'example.com' with your web
if you type in the domain name without the 'www' inaddress.
front as well as with it intact and what this means toGoogle will now look at that and know that if it
Google is you have two websites. Oh yeah, you'veencounters the URL without the 'www', it should
got double websites going on with the same content.treat it the same as with it.
Go check out your site. Type in the domain bothExcellent, duplicate content gone and the world can
with and without the 'www' in it and see whatcarry on spinning.
happens. If your site displays the same without theServer settings
'www' as it does with it then you have a problemIf you're lucky enough to be using Apache as a web
that you need to fix.server then you're in luck and you can do a similar
The big problem here is that spectre of webthing to the above trick without having to mess with
development - "duplicate content" because Googleyour web pages. You're going to need FTP access to
sees it as two sites, you're effectively competingyour server for this and again, if this scares you, get
against yourself. It's bad enough having to optimisea geek in tow.
one site but having to optimise two - well that's justYou'll need to edit the '.htaccess' file. Yep, it's as
plain stupid.scary as it sounds, but if you're plucked up the
Now when faced with two identical web pages,courage then you just need to add the following lines:
Google will only display one of them and which oneRewriteEngine On
will depend on many factors but suffice it to say, it'sRewriteCond %{HTTP_HOST} ^example\.com$ [NC]
really not an issue if you just fix the problem in theRewriteRule ^(.*)$ $1 [R=301,L]
first place and that, luckily, is easy.Easy. If you know how.
There are two dead simple things you can do thatYou're now serving pleasing web pages to the big 'G'
will satisfy the almost omnipresent Google. Oneas well as keeping your visitors happy and you should
requires a fiddle with the server; the other can besee a nice increase in your search rankings as Google
done in the safety of your web pages. Either will donow only has one site to deal with.
the trick.