www. is NOT deprecated

Having no www. is wrong. Why?

Why can’t we just use both?

You can use both as long as you redirect your traffic from one to the other (eg: example.com redirects to www.example.com). Why?

Well that is simple. It affects the way your website is optimised.

As search engines see a subdomain as a separate site if you run your website on www.example.com and example.com it effectivly means you have two copies of the same website. This means you are taking the focus from one website to two, if you wish to build up traffic it is best to make things as simple as possible for your visitors. Let them know that there is only one URL for your website, as this will considerably help you when people add backlinks to their website, or bookmark your website. It will also help with how search engines index and rank your website.

Its quite important that when you start developing a website you decide whether your going to direct your visitors to www.example.com or example.com as you will need to focus on one.


These redirection methods are used to redirect your domain (eg: example.com) or wildcard subdomain (ie: *.example.com) to www.example.com.

mod_rewrite method:

Add this to your .htaccess file (providing mod_rewrite modual is installed in your apache). (See Apache mod_rewrite)

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

php method:

Place this at the top of your index.php in your php code.

if ($_SERVER["HTTP_HOST"] != “www.example.com”) { header(”Location: http://www.example.com/”); die; }

Hostnames, protocols and examples

As you can see in all these examples, as long as example.com is pointing to the same IP as the host, you could use the domain name instead of one of the hosts above.

The Spamcalc website explains the original concept and usage of Subdomains/Hostnames. It explains that the original purpose of subdomains is to show a hierarchical (eg: computername.subdomain.domain.topleveldomain).

This makes sense when looking at the above protocols and services. As originally, and still today depending on demands, each service is run on a seperate machine (or seperate machines) as an attempt to dispurse heavy usage loads. However unless you run a large international network and have many thousands of users chances are you do not need this kind of structure. It is also apparent that as computers are getting faster and faster they are more than capable of running all these services on one machine.

As your website/services expand, it makes sense that you might need to shift your services onto different machines, to achieve this each machine will need a different IP address. Therefore they will require a different host, as both servers cannot use the domain name, they will need to be assigned the specific hostname, which will ultimately depend on what service they will be running.

Although it sounds complicated, its actually very simple, which is why it makes sense to use the prefix.

Arguments for the other way

Apart from the points made at no-www.org the other reasons why www. has deprecated…




  1. protocol7 » Blog Archive » links for 2007-03-18 said,

    March 18, 2007 @ 12:22 pm

    [...] http://www. is NOT deprecated (tags: www) [...]

  2. Simon Willison said,

    March 18, 2007 @ 5:17 pm

    Here’s a great reason that avoiding http://www. is a bad idea:


    Cookies that you set on example.com are available to all subdomains; cookies that you set on http://www.example.com aren’t. By using example.com you’re limiting yourself to having your cookies “leak” to any subdomains you later setup.

  3. Asbjørn Ulsberg said,

    March 19, 2007 @ 10:05 am

    Just make both work, and have one redirect to the other. Which one you then use as the normative one doesn’t really matter. If cookie leaking is a bad thing for you, go with http://www. If it’s a wanted feater, drop http://www. It’s not really much to discuss anymore.

  4. Asbjørn Ulsberg said,

    March 19, 2007 @ 10:06 am

    Uhm, s/feater/feature. A preview mechanism would be nice! ;-) Oh, and I love the way “www” is recognized as an URI by the comment parser.

  5. Next Generation Internet » no-WWW or yes-WWW said,

    March 20, 2007 @ 9:21 pm

    [...] HM2K är man oxå för http://www. där av mer konkreta anledningar. där anses prefixen spela en betydande [...]

  6. webwards » Blog Archive » Mantenere il “www”? Analisi di pro e contro said,

    March 22, 2007 @ 10:41 am

    [...] di un sito, sia ormai cosa superata. Per alcuni, il “www” è addirittura deprecato. Su hm2k.com è stato pubblicato un interessante articolo contenente alcune buone ragioni (pratiche, [...]

  7. Meri said,

    April 4, 2007 @ 1:42 pm

    If you have a look on the no-www site, their stated philosophy is:

    “To that end, we make the modest proposal that website makers configure their main sites to be accessible by domain.com as well as http://www.domain.com“

    Whether you agree that www is deprecated or not, they are suggesting the same action as you are.

  8. hm2k said,

    April 5, 2007 @ 6:14 pm

    I think some of you should re-read my article again as its seems as though some of you have mis-understood the point.

    Main points are:
    - removing the www is probably/possible a bad idea
    - having two sites (same content) on different domains is a bad idea
    - i agree that both http://www. and non-www should be accessible
    - the http://www. domain should be the primary domain

  9. No-www or yes-www? » Online Business Blog said,

    April 6, 2007 @ 11:48 am

    [...] On the opposite site, http://hm2k.com/articles/yes-www/ proposes that using ‘www.’ is a good [...]

  10. Brad Pollard said,

    April 25, 2007 @ 2:31 pm

    Regarding your point ‘Using the http://www. prefix helps readers of printed advertisements’, I tend to think that confusion over what is a domain name and what isn’t a domain name can be overcome by using a ‘web’ icon next to it. I also think that domain names are easily recognised since the are words seperated by a period ‘.’

  11. hm2k said,

    April 25, 2007 @ 3:37 pm

    People also use the “web” icon to represent email too, as often they are not aware of the difference.

    I cannot begin to explain how often I have seen variations of urls and email addresses mangled together.

    ie: “http://[email protected]”, I really don’t think the “icon” you use next to matters.

    The major problem with dropping the http://www. is in media, that is my concern.

    Often you will see a companies URL/domain taking up the large part of an advertisement, you wouldn’t expect an icon next to that.

    I could not begin to explain about how many times I have witnessed people attempt to type spaces in domain names, yet they always (ALWAYS!) manage to get the http://www. part correct, as they KNOW (think they know) all websites start with that.

    Although dropping the http://www. from your url is “oh so web 2.0″, you have to think about how your “web 1.0″ userbase will deal with this.

    In summery, generally for the masses dropping the http://www. is a bad idea, it just confuses the user. But if you want to be hip and trendy, feel free to drop it.

    To me it doesn’t matter, the purpose of this article was to show people the other side of the argument and make their own decision.

  12. René said,

    October 8, 2007 @ 6:17 am

    Another reason you might want to use a subdomain is SSL. If you host several subdomains on one IP address, you can use a wildcard like *.example.org in your SSL certificate, and the certificate will be valid for all of them. If you use example.org as the CN in your SSL certificate, the certificate will not be valid for e.g. someuser.example.org.

  13. Jon said,

    October 23, 2007 @ 6:47 pm

    Anyone who doesn’t realize that “example.com” is a URI just because they don’t see “www” is an idiot! Lots of big companies are advertising their domains now without it, and they don’t use a “web icon.” And if you’re trying to get customers, you probably don’t want the business of some numbskull that doesn’t know “something.com” is a URI! “www” is outdated, takes extra space to print, and extra time to *say* when you are telling somebody a URI to go to. So, it’s a waste of time and space. I prefer to drop it. It’s not the 90’s anymore people! Just my 2 cents -j

  14. hm2k said,

    October 24, 2007 @ 11:00 am

    Removing the “www.” because you think it’s “hip and trendy” or because you think “it’s no longer needed” or even “the mass media are doing it” is plain stupid.

    It’s a bit like “breaking the back button” (see: http://www.useit.com/alertbox/990530.html), it confuses people.

    You say this but how many times have I seen addresses such as: “http://[email protected]” on company stationary and signage, too many. For them it still works in their browser, and it looks right, but we know it’s not.

    People need to stop being so ignorant about this.

  15. Elektronik Forum said,

    November 3, 2007 @ 12:28 pm

    Speacial Thanks for the mod_rewrite method, it works (see http://www.stshome.de also http://stshome.de ) greate…

    Thanks from Münster Germany


  16. URL con o sin WWW, esa es la cuestión en PHPBSD.net said,

    November 5, 2007 @ 7:42 pm

    [...] Actualmente podríamos decir que es una cuestión de gustos usar o no la WWW para nuestras URL, te encuentras con partidarios del NO, como la iniciativa no-www.org, y otros que exponen interesantes motivos de porque SÍ, como en HM2K. [...]

  17. Basalt said,

    December 4, 2007 @ 3:15 am

    “Removing the “www.” because you think it’s “hip and trendy” or because you think “it’s no longer needed” or even “the mass media are doing it” is plain stupid.”

    You claim it’s stupid to get rid of something that is no longer needed? And how do you support that argument? What? With your personal opinion? Oh, then it must be the truth.

    “It’s a bit like “breaking the back button” (see: http://www.useit.com/alertbox/990530.html), it confuses people.”

    Althought I disagree it will cause mass hysteria amongst the masses: breaking the back button is just plain annoying, deprecating www is new. Everything new confuses. It’s still no reason to not move to better.

    “You say this but how many times have I seen addresses such as: “http://[email protected]” on company stationary and signage, too many. For them it still works in their browser, and it looks right, but we know it’s not.”

    So we get rid of one element and people have smaller possibility to go wrong.

    “example.com is often not detected as a URL, however http://www.example.com is.”

    You don’t really give a bunch of numbers to someone without informing the person it’s a phone number. We have lived with those for quite some time, I think we can handle URL’s without www too (and most companies already are advertising without it,)

    “People need to stop being so ignorant about this.”

    It’s not such a big deal. I think we can safely agree that only thing that really matters is using either www or no-www, and direct the traffic to the other one. It’s no use forcing people to the other.

  18. Roberto Bermejo Blog. » WWW sí o no? said,

    April 9, 2008 @ 7:31 am

    [...] Si a las www [...]

  19. Columbus Search Marketing said,

    April 14, 2008 @ 7:41 pm

    This is a pretty weak argument for keeping the http://www. There are no real valid points to be found here. Simply redirecting any www traffic to the regular domain name addresses any concerns or issues (people can still access the site that way) but we can stop using it for any other purposes. Eventually, it will go away due to natural selection just like many other things that have outlived their purposes. Simply saying “keep it because we’ve always had it” is not an argument. Many worthless things that had always been are gone today, and the world is a better place because of it.

  20. hm2k said,

    April 16, 2008 @ 4:37 pm

    The argument for has more weight than the argument against, that’s for sure.

  21. Uncle Che said,

    April 19, 2008 @ 8:51 pm

    I am not a techie, so i don’t understand most of the terms you guys use here. All I know is www is a subdomain and i will not set a subdomain as the prefered url of my site. I rather use theworldahead.com than http://www.theworldahead.com

  22. noox bloggt! » Blog Archive » Domainname mit oder ohne www. said,

    September 29, 2008 @ 11:30 pm

    [...] das ist die große Frage. Im Web gibt es dazu einige Kontroversen. Es gibt eigene Seiten pro www aber auch kontra http://www. Und manchen gefällt das www so sehr, dass sie sogar für zwei www, also [...]

  23. SB said,

    November 3, 2008 @ 3:54 pm

    Being a lazy surfer I prefer to type omit the www and just type the domain name. However, I am also of the opinion that this should just be a shortcut to the website and that the server should instruct the browser to redirect to the www subdomain. Further, it is my opinion that the file should also be included, as, technically, the page you are viewing is a resource and not a domain/subdomain. Therefore, typing in “example.com” would resolve to “www.example.com/index.html”. This also has the advantage of ensuring that search engines crawl a single resource, as each variation (ie example.com, example.com/index.html, http://www.example.com and http://www.example.com/index.html) is regarded as a unique URL and, thereby, reduces the pages rankings (if accessed using multiple variations).

RSS feed for comments on this post · TrackBack URL

Leave a Comment