To WWW or Not to WWW Let's Find Out!

Should you be using it and why?

0 Comments

Today we are going to be talking about whether or not websites should be using the WWW prefix with their domain names. What exactly is the WWW we are speaking of? Technically it is known as a subdomain, this means it represents a particular service or section of the whole domain name. In the case of the WWW subdomain, it historically represents the web server portion of your server.

What is in a domain name?

Domain names are just a friendly way to ask for a particular server on the Internet. When we look at the anatomy of a domain name, we need to keep in mind it should be read from right to left and each period “.” represents a dividing point in the domain name. Let’s use: www . yourwebsite . com

com

Keeping in mind we are reading from right to left, the first entity or word we come to is com. The com part of the domain name is known as a top level domain (TLD). This is best thought of as the trunk of a tree. There are MANY different TLDs on the internet, for a rather large listing check out this Wikipedia article.

yourwebsite

Now let us continue reading from the right to the left, the next entity we come to is yourwebsite. This is like a branch from the com trunk, one that can be used to point to a server and the resources it contains. Now, it is important to know that we could stop here and just point yourwebsite.com to a web server and call it a day. However, that would not give us an answer as to what a subdomain is, so let us press on.

WWW

Moving to the left from yourwebsite we come to the WWW entity, we have finally hit a subdomain! When we observe the domain name as a whole, we can see that it is spelling out that we would like a resource that is tied to the name www.yourwebsite.com. The context of WWW has historically meant that we want a web page from the server we are talking to. Now, and this is important, this does not mean WWW has to be tied to a web server, nor does it mean web servers can not be tied to any other subdomain! Is your mind blown yet?

Take a step back

Ok, we have covered a lot of ground here and honestly this is just scratching the top of it all. The WWW subdomain is not the only one that exists, on the contrary, one can use almost anything you want for a subdomain. Furthermore, subdomains can have subdomains and those subdomains can have subdomains too! There are a number of regular subdomains you will see on the Internet:

So, should we use a WWW or not?

If you are scratching your head asking yourself, “Why does this matter”, then you are not alone. Let’s take a look at some things that are affected by that WWW prefix.

Redundancy

As your website grows in popularity and reach, the likely hood that your website will have an issue that requires quick action or redirection increases. Now in most cases, this is done by redirecting your domain name from one server to another. This is easy if you use CNAME DNS entries to redirect the traffic to fallover or replacement servers. However, this can not be done with a base domain name, but it can be done with a subdomain. This means you can easily redirect www.yourwebsite.com from one server to another with minimal downtime or update delays.

Cookies

For those out that who use them, yes there are a lot of you, this section will be of particular importance. Cookies are affected by the domain name that they are set for. The biggest issue is cookies set by a base domain name, remember that means yourwebsite.com, can not be accessed by subdomains.

According to RFC2109:

A is a FQDN string and has the form NB, where N is a non-empty name string, B has the form .B’, and B’ is a FQDN string. (So, x.y.com domain-matches .y.com but not y.com.)”

What this mean is, traditionally, cookies set by a subdomain can be read by another subdomain. However, cookies set by a base domain, could not be accessed. Now, thankfully this has been addressed by newer updates in how applications handle cookies, RFC2965 & RFC6265. While this issue has been addressed, there are still reports that applications have not adopted the changes and result in cookies not being accessible.

Bottom line it for me

If your site is new or just starting up then add the WWW and don’t worry about all the craziness.

If your site is established and you have not been using the WWW subdomain you should think carefully about switching as it can have negative effects such as lowering your search rankings in search engines and just flat out confusing your customers. If you feel it is worth it then by all means switch, otherwise keep the base domain name setup and hope you don’t run into issues down the road.

- By: Posted on:

Comments

Small ad here
Select a size at which to preview the size