You Must Decide! www.domain.com Or domain.com?

(This post is meant for those who has (at least) a domain name.)

So, what’s the big deal between using www.domain.com (with www) and domain.com (without www)? You probably didn’t bothered, did you? I guess you didn’t know that it will affect your website or blog’s pagerank too.

According to ekstreme.com, “to search engines, because subdomains are different entities, http://www.domain.com and http://domain.com are two different websites with the same content. This means that they both will be penalized for duplicate content and will rank lower.”

So, have I got your attention now? To www or not to www, it doesn’t really matter. What matters is that you decide between one of them and stick to it. no-www.org recommends websites to drop the www prefix because they claim that it is depreciated and that the “use of the www subdomain is redundant and time consuming to communicate“. Meanwhile, www.yes-www.org argues that it “serves as a gentle reminder that there are other services than the Web on the Internet“.

**********

Method 1: Apache mod_rewrite and 301 redirection:

(source)

To redirect domain.com to www.domain.com:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.com [nc]
RewriteRule (.*) http://www.domain.com/$1 [R=301,L]

To redirect www.domain.com to domain.com:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.domain\.com [nc]
RewriteRule (.*) http://domain.com/$1 [R=301,L]

If you open up your .htaccess file in a WordPress blog, you’ll see this:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

What I’m doing is to redirect tenthofmarch.com to www.tenthofmarch.com. So my version looks like this:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^tenthofmarch\.com [nc]
RewriteRule (.*) http://www.tenthofmarch.com/$1 [R=301,L]
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

Method 2: Using WordPress Plugin

I found 2 WordPress plugins that allow you to redirect either way without the need to tweak the .htaccess file. This is an easier and safer alternative, since you do not touch the .htaccess file. Bare in mind that any mistakes made while tweaking the .htaccess file might cause some problems while accessing your blog.

1. Enforce www. Preference.
I’ve tested this one and it works. This plugin detects the selection you made in the “Blog address (URL)” under Options –> General.

2. Objection-Redirection
Haven’t tried this (lazy) but I think it should work.

**********

Again, it doesn’t matter whether you choose to www or not to www. The important thing is to choose either one. I’ve done a quick check on some blogs that I frequently visit and notice MOST of them have not done this. It is about time you guys decide.


11 thoughts on “You Must Decide! www.domain.com Or domain.com?

  1. TenthOfMarch says:

    @BlogDirectory
    I agree that without www is easier especially during a conversation. However, I still prefer to redirect all my urls to the one with www.

  2. dave says:

    Hey bro..
    Off topic a little… but seeing you post something related, can’t help it lah…

    so..can lend me a hand a bit.. i’ve got a big big headache… i’m in the midst of thinking of registering a domain. but i’m slowly realising that this process is going to kill alot more brain cells than i first thought… hehe..

    3 weeks liao.. and i’m still not much wiser… got full time work some more. anyway… my thing is… with the new domain, hopefully i can grow some dedicated organic traffic, and i’m thinking of migrating with wordpress.. the problem is not with wordpress…. problem is with which web host or which company to take… and they got so so many options…

    take your www or no-www example, i got this web host contact that is saying if i take up hosting with him… he can basically give me a 1.domain name 2.integrate for me my domain with wordpress 3.anyone going to my domain will be automatically routed to wordpress backend. and visitors will actually see my domain instead of wordpress… ie:

    register: http://www.dave.com

    wordpress: dave.wordpress.com

    idea: go to http://www.dave.com and post entries on dave.wordpress.com
    but on http://www.dave.com you don’t see the address as dave.wordpress.com

    is this possible??? sounds like some kind domain forwarding routing trick…doesen’t sound logical to me… and what about the seo results? hope it clarifies….

    any ideas my friend?

  3. TenthOfMarch says:

    @dave
    No problem my friend. I’ve done some googling for you and found out that wordpress.com does offer to do it for you. But you’ll need to pay between USD10 to 15 a year I think.

    I’m not sure which hosting company you looked for but let me recommend you the hosting company that I am using (serverfreak.com). I just sent Sam a message on your question and he replied me saying it is possible. You can forward the domain name to your wordpress.com blog without getting a hosting package.

    I’m not sure what effect it has on SEO (I’m not SEO expert). If you don’t mind spending a little money, try getting a hosting package with them. You can import all your post from wordpress.com to your new blog if you want to.

    I’ll send you an e-mail with his contact details. You can ask him privately if you need more clarification.

  4. TenthOfMarch says:

    @Jerry Ong
    I googled for it and came up with this article. I want to highlight the point raised by theBear at comment ID #:3094845.

    “We are also aware that mysite123.com is indeed http://www.mysite123.com and the original question at the top of the thread is asking why can’t google understand this? If we can keep things in perspective the question is relating to this known fact.”

    This statement is in fact false.

    The www subdomain of the mysite123.com domain is the recomended subdomain to serve web pages from. That in no way equates to the www subdomain being the same as the domain.

    He suggests that domain.com and http://www.domain.com isn’t the same which I agree. An example being NST’s website. You can access it from http://www.nst.com.my but not from nst.com.my.

    I’ve read some place that the ability to access http://www.domain.com from domain.com depends on the server’s setup or something. Therefore, I am all for using the www prefix (eg. http://www.tenthofmarch.com) instead of tenthofmarch.com only. A few “big sites” that I go to redirects domain.com to http://www.domain.com, Google being one of them.

  5. Pingback: www atau tiada www?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>