Sub-Domains and the www Prefix

An interesting topic of discussion surrounds the thought of whether a sub-domain should have the www prefix attached to it.  The idea to deploy a site using sub-domains vs sub folders is an entirely different topic, but if you do make use of sub-domains, you’ll want to read further.  For those unaware, subdomains are simply a domain that is part of a larger domain.  For example, ask.enquiro is a sub-domain of www.enquiro.com.  Although it is part of the main Enquiro domain, sub-domains such as ask.enquiiro are treated as separate entities by search engines. 

Typically you will see the sub-domain with this naming convention:

sub-domain.yourdomain.com 

Using ASK Enquiro as an example, in ask.enquiro.com, ask is the prefix for the sub-domain.  With a normal domain, typically "www" is the prefix.  This is the way that the Domain Name System (DNS) hierarchy works.  In otherwords, when using sub-domains you will very rarely see the URL appearing as: http:/www.ask.enquiro.com.  It’s a little overkill.  In essence, the sub-domain is the prefix for the main domain.  As a result  the "proper" version of the sub-domain is http://ask.enquiro.com.  The question becomes should you place a redirect on http://www.ask.enquiro.com to http://ask.enquiro.com?  Well the answer is it depends.  I would suggest that you do not place a redirect in this case for the simple fact that very few people will be typing or using "http://www.ask.enquiro.com" to find ASK Enquiro.  When viewing our analytics, there was no occurence of any direct traffic coming to the site using "http://www.ask.enquiro.com" .  Not one direct referral using this naming convention.  Typically we expect the new users to arrive at ASK Enquiro by:

  1. Searching for ASK Enquiro in a Search Engine such as Google
  2. Access ASK Enquiro from our main site
  3. Bookmark ASK Enquiro
  4. Type ask.enquiro.com into an address bar

So should you place a redirect from www.sub-domain.yourdomain.com to sub-domain.yourdomain.com?  Well you can, but really it is not necessary.  If you don’t believe us take Google for example.  Google use numerous sub-domains for their various web properties.  There is a reason that it’s http://mail.google.com and not http://www.mail.google.com.  Google does not redirect the www version of the sub-domain to the actual sub-domain.  The sub-domain address for Google Mail is mail.google.com.  It is unlikely that many people are typing in www.mail.google.com into a browser.  Click on the link and you will see that you get taken to an error page.  You are not redirected.  People just do not use this type of www + sub-domain naming conventions.  There are examples of some site that do but it’s not necessary.

One Comment to “Sub-Domains and the www Prefix”

  1. Zaheed 11 January 2009 at 12:07 am #

    I tend to disagree with some points in this article. First, the reason you don’t see any http://www.ask.enquiro.com views in your analytics is because the DNS error causes your JavaScript for your analytics not to execute and hence no page view.

    Secondly, i believe that even Google should fix this on their subdomains. I have seen numerous times where less-savvy web users type in www before the subdomain not knowing what they’re doing is incorrect.

    Thirdly, for such a simple fix, why not make the relatively simply adjustment on the servers of within the code to fix this?