Skip to content

Standardising My Domain

Whilst browsing the web, I came across an article on URL Canonicalisation by Matt Cutts which talks about the fact you should standardise on one "main" domain name for your site and ensure any others redirects to it using a 301 permanent redirect.

Now this is all pretty common-sense stuff for all the reasons talked about in the article. Despite this however, I realised I'd completely overlooked it on this site (and others) and was therefore not exactly helping myself in regards to search engine rankings. I resolved to sort this out as soon as I got home. However there was one final problem... which domain should be the main one?

My choices:

  • markembling.info
  • www.markembling.info

Looking around a bit more, there seems to be very little consensus on which is best and there are really no concrete reasons for picking one over the other besides aesthetics and personal preference. So I turned to the twittersphere, and asked the following:

What is everyone's preferred domain form? "www.example.com" or just "example.com"...?

Opinions

The result was interesting:

A pretty large majority said that the form without the www was best, and the www version should be the one which has the permanent redirect. Nobody voted in favour of using the www variant, although there was a vote of no particular preference. The 'other' was this from @tombuildsstuff:

depends on the tld

and the clarification:

well if it's a .com - make it www, if it's .co.uk, make it without

I thought this was an interesting perspective, and I can see the logic in this. In this particular case, my domain is a .info so it would probably fall under the same category as a .com, and certainly in the past I have tended to favour the use of www at least when writing the domain down.

Outcome

In the end, I decided to go for using the version without the www. I rather like the cleanness of it, and lets be honest - do we actually need the www? It's also a pattern which Stack Overflow (and friends) follow. If it's good enough for those guys, its good enough for me too!

Since my server is Apache-based, I just popped these three lines into my configuration file and restarted Apache. Every time the site is accessed using www.markembling.info, it should automatically issue a 301 redirect over to the non-www version.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.
RewriteRule ^(.*)$ http://markembling.info$1 [R=permanent,L]

Job done.