Watch Out – Canonical URL Bloopers

I’ve been pretty careful to ensure all of my websites land on a www.domainnameDOTcom or without the www. with just domainnameDOTcom. Not too long ago there were plenty of warnings explaining the importance of having your domain direct to just ONE version, not both.

For some reason I decided to do some random checking on my domains and lo and behold – I found *four* domains with problems. Two were recently moved to a different host, maybe something got lost in the transfer? One domain I have no explaination for – there was no .htaccess code specifying the version to use. Anytime I build a site – the .htaccess codes are one of the first things I take care of before the site goes live and is at the top of the ‘New Sites To Do List’ and then checked off with a double look to ensure everything is good to go.

The fourth domain was interesting. It was my directory site The directory itself was fine, only allowing for the non-www version, but the article blog was sticking for both versions. So I checked another domain with a blog subfolder – sure e’nuff, both www and non-www were sticking. I had to go into the blog folder’s .htaccess file and paste the code for the non-www version.

Why not take 15 minutes today to run through each of your websites. Check for www and non-www on all subfolders too (like blogs). Make sure everything is only directing to one version.

I did some checking in Yahoo for my affiliate sites that had the bloopers, and yup – a few scraper sites have pointed links to the opposite version than what I was using. For example if all the inbound links I worked on were pointing to the non-www version of my domain, the scraper site pointed to the www version.

Not. Nice.

ETA: Comments turned off 07-10-06 due to comment spam attacks problems


I've been trying to find my way online for more years than I care to admit.

5 thoughts to “Watch Out – Canonical URL Bloopers”

  1. Thank you for this warning. I checked and six of my sites are having problems in the sub folders. Mainly for blogs (all wordpress). I added the code to .htaccess in those folders like you said and its fine now. Only one site I can see was targetted by sites linking to the wrong version so I was lucky.

  2. Beware, there’s some software out there that won’t allow you to fix this problam. Or at least, in combination.

    I have a directory script in a subfolder that uses virtual directories. In the main folder is a blog. With my current blogging software, it won’t do the WWW redirect without breaking its other rewrite rules that create the virtual directories. I THINK when I had WordPress, this wasn’t true, but I’m not sure. I think late one night, I’ll have to install WordPress over what I already have (backing up my current setup) and see if it works. If so, I may have to go back to it.

    At this point, I’m not sure whether it’s the blog’s rewrite rules that are funky or the directory.

    Next time, I’ll test my setups better before I commit to a particular script.

  3. Dani wp seems to handle it fine. No errors showing up in the stats, plus I’ve been pulling the blog feed with carp (showing on the directory). Everything’s running smooth.

    I also double checked with Google, Yahoo and MSN and the pages they’ve spidered – no errrors with those pages:

    Thanks for that head’s up, something to definitely watch for with other blog software.

Comments are closed.