the latest from 2am Media

22 Oct

What’s best www. or non-www: the case for cookieless subdomains

BY

We recently had some good old banter over lunch the other day regarding the infamous www. vs non-www question. Now I know this is a touchy subject for some people and you tend to find people sit one side rigorously defending either for or against the ye old “www” and I’m not going to jump right in and state whether I am for or against using the www, you will have to read on for that.


First off, with any long standing debate lets see where it originated from and why the www subdomain was used in the first place. According to Wikipedia “Many domains used for the web started with www due to a long standing practice of naming Internet hosts according to what service they provided” (http://en.wikipedia.org/wiki/World_Wide_Web) so basically, www.domain.com represented the world wide web, ftp.domain.com would represent a ftp server and nntp.domain.com would represent a newsnet server.

So what changed you ask? Nothing, except people wanted a change, somebody somewhere decided to make a stance and remove the www, after all its not required, it’s depreciated, it’s a subdomain and it looks damn ugly! Removing the www also made URLs easier to read, speak and send without the unnecessary clutter, so the trend took off and with a lot of focus on SEO in the recent years, people are also more knowledgeable in how to remove it and force users to the non-www version of their site.

Why use www on your website address?

Well it depends on individual situations, for example if you have print material, a website address looks better printed www.domain.com as apposed to http://domain.com or even domain.com, its an instant clue to indicate it’s a domain name/url.

www. and SEO

So from a more important SEO view does one favour over the other? All the articles online state that non-www and www are treated the pretty much the same, as long as you redirect one to the other correctly (301) you shouldn’t see any negative impact on rankings. However if you start to take into account Googles increasing focus on speed, then using www has one advantage over non-www and that is the ability to use a cookieless subdomain to serve your static content.

Other points of view are that none-www use leaves the domain closer to the root that should benefit SEO (Google has favoured keywords in domains and the further from the domain the more effort it takes to make them rank).

Is www. Prettier?

In some cases there is an argument for not using the www. – this mainly occurs when the domain name is long – when you’ve got a short domain it can look aesthetically more balanced with the www. (2am’s clients include: http://www.ameon.co.uk, which demonstrates the point).

Why do people drop the www. In Google Adwords?

In the display URL for Adwords there is a limited amount of space so most organisations drop the www. – this also allows them to include other keywords in the displau URL which will aid in increasing the relevance of the ad to the keywords and landing page (and therefore the quality score of the keywords in that AdGroup).

What do the big boys do?

Twitter serves static items from a separate domain: twimg.com. Vimeo, WordPress and Twitter are examples of websites that don’t use www. Google, Amazon, Ebay, Facebook and Tesco all use it on their domain – although it’s interesting that many of these drop the www off when they use print material.

What is a cookieless subdomain?

With each request to a resource, be it an image, stylesheet or a javascript the browser sends along the cookie you have stored for that domain.

This cookie clutter dramatically increases the size and response time of each page load when multiplied by every resource, however the cookie that is sent along when the browser requests the resource is more than likely never used, hence extra traffic that isn’t needed and just slows down a page load time.

The non-www limitation come in with how cookies are set. Cookies are always set using a wildcard, meaning any subdomains will also inherit and will be sent with all the request headers, so for example if you set a cookie on domain.com it will actually be set on *.domain.com meaning a subdomain like static.domain.com would send the cookie when requesting a resource, there again if we use the www subdomain cookies will be set on *.www.domain.com and when fetching a resource from static.domain.com no cookies will be sent with the request headers.

Using a cookieless subdomain to server static content has a huge impact on page load times and is one of the recommended ways that Google’s page speed and Yahoo’s Yslow tools suggest to speed up your site, and its actually pretty simple to do and effective if done correctly.

Like what you see?

If you've got a web design or internet marketing project in mind and you think we're the team for you, pop in for a coffee and a chat...

Get in touch →