views:

2319

answers:

9

When browsing through the internet for the last few years, I'm seeing more and more pages getting rid of the 'www' subdomain.

Are there any good reasons to use or not to use the 'www' subdomain?

+8  A: 

Just after asking this question I came over the no-www page which says:

...Succinctly, use of the www subdomain is redundant and time consuming to communicate. The internet, media, and society are all better off without it.

Peter
Hah. I couldn't agree more. My programming buddies and I make fun of it all the time when we're giving out websites to each other by saying "WWWWWWWWWWWWWWWWWWWW dot..."
GeoffreyF67
A: 

It's a left-over from 'stupid' people who assume that www is meant to be there. The number of people I direct to sites who type 'www.' in the front. Our primary domain is sans-www but we had to add a cname for the www version because too many people would email us and complain the site was broken.

Adam Hawes
Yeah um, you need to support both.
James D
I wouldn't go as far as to call users like my mother "stupid", just because she doesn't have the technical and historical insight of subdomains and the "www" subdomain in particular. You have to remember that people have been brought up by media to expect the www subdomain.
JohannesH
+11  A: 

Take it from a domainer, Use both the www.domainname.com and the normal domainname.com otherwise you are just throwing your traffic away to the browers search engine (DNS Error)

Actually it is amazing how many domains out there, especially amongst the top 100, correctly resolve for www.domainname.com but not domainname.com

Harry
301 redirect no good in this case?
Typeoneerror
301 redirect is perfectly good, indeed google recommends it
Harry
A: 

I think you should definitely catch it for the people who use it out of habit; but, besides that, I agree with no-www.

Jack Lawson
+32  A: 

There are a ton of good reasons to include it, the best of which is here: Yahoo Performance Best Practices

Due to the dot rule with cookies, if you don't have the 'www.' then you can't set two-dot cookies or cross-subdomain cookies a la *.example.com. There are two pertinent impacts.

First it means that any user you're giving cookies to will send those cookies back with requests that match the domain. So even if you have a subdomain, images.example.com, the example.com cookie will always be sent with requests to that domain. This creates overhead that wouldn't exist if you had made www.example.com the authoritative name. Of course you can use a CDN, but that depends on your resources.

Also, you then don't have the ability to set a cross-subdomain cookie. This seems evident, but this means allowing authenticated users to move between your subdomains is more of a technical challenge.

So ask yourself some questions. Do I set cookies? Do I care about potentially needless bandwidth expenditure? Will authenticated users be crossing subdomains? If you're really concerned with inconveniencing the user, you can always configure your server to take care of the www/no www thing automatically.

jacobangel
Wow. Now that's a great site.
GeoffreyF67
StackOverflow uses a separate domain for static content: http://sstatic.net/
Josh
+2  A: 

As jdangel points out the www is good practice in some cookie situations but I believe there is another reason to use www.

Isn't it our responsibility to care for and protect our users. As most people expect www, you will give them a less than perfect experience by not programming for it.

To me it seems a little arrogant, to not set up a DNS entry just because in theory it's not required. There is no overhead in carrying the DNS entry and through redirects etc they can be redirected to a non www dns address.

Seriously don't loose valuable traffic by leaving your potential visitor with an unnecessary "site not found" error.

Additionally in a windows only network you might be able to set up a windows DNS server to avoid the following problem, but I don't think you can in a mixed environment of mac and windows. If a mac does a DNS query against a windows DNS mydomain.com will return all the available name servers not the webserver. So if in your browser you type mydomain.com you will have your browser query a name server not a webserver, in this case you need a subdomain (eg www.mydomain.com ) to point to the specific webserver.

Stephen Baugh
+7  A: 

There are MANY reasons to use the www sub-domain!

When writing a URL, it's easier to handwrite and type "www.stackoverflow.com", rather than "http://stackoverflow.com". Most text editors, email clients, word processors and WYSIWYG controls will automatically recognise both of the above and create hyperlinks. Typing just "stackoverflow.com" will not result in a hyperlink, after all it's just a domain name.. Who says there's a web service there? Who says the reference to that domain is a reference to its web service?

What would you rather write/type/say.. "www." (4 chars) or "http://" (7 chars) ??

"www." is an established shorthand way of unambiguously communicating the fact that the subject is a web address, not a URL for another network service.

When verbally communicating a web address, it should be clear from the context that it's a web address so saying "www" is redundant. Servers should be configured to return HTTP 301 (Moved Permanently) responses forwarding all requests for @.stackoverflow.com (the root of the domain) to the www subdomain, NOT THE OTHER WAY AROUND! (Unfortunately Stack Overflow got this wrong :|)

In my experience, people who think WWW should be omitted tend to be people who don't understand the difference between the web and the internet and use the terms interchangeably, like they're synonymous. The web is just one of many network services.

If you want to get rid of www, why not change the your HTTP server to use a different port as well, TCP port 80 is sooo yesterday.. Let's change that to port 1234, YAY now people have to say and type "http://stackoverflow.com:1234" (eightch tee tee pee colon slash slash stack overflow dot com colon one two three four) but at least we don't have to say "www" eh?

Kristian B
I enjoyed reading your post :)
JamesC
You can still use `www.example.com` (for "www." being shorter than "http://"), but then redirect to "example.com".You should listen to both, but what you're using as the canonical one does not really matter (apart from cookie/subdomain issues mentioned by jdangel)
blueyed
+4  A: 

There are several reasons, here are some:

1) The person wanted it this way on purpose

People use DNS for many things, not only the web. They may need the main dns name for some other service that is more important to them.

2) Misconfigured dns servers

If someone does a lookup of www to your dns server, your DNS server would need to resolve it.

3) Misconfigured web servers

A web server can host many different web sites. It distinguishes which site you want via the Host header. You need to specify which host names you want to be used for your website.

4) Website optimization

It is better to not handle both, but to forward one with a moved permanently http status code. That way the 2 addresses won't compete for inbound link ranks.

5) Cookies

To avoid problems with cookies not being sent back by the browser. This can also be solved with the moved permanently http status code.

6) Client side browser caching

Web browsers may not cache an image if you make a request to www and another without. This can also be solved with the moved permanently http status code.

Brian R. Bondy
+3  A: 

There is no huge advantage to including-it or not-including-it and no one objectively-best strategy. “no-www.org” is a silly load of old dogma trying to present itself as definitive fact.

If the “big organisation that has many different services and doesn't want to have to dedicate the bare domain name to being a web server” scenario doesn't apply to you (and in reality it rarely does), which address you choose is a largely cultural matter. Are people where you are used to seeing a bare “example.org” domain written on advertising materials, would they immediately recognise it as a web address without the extra ‘www’ or ‘http://’? In Japan, for example, you would get funny looks for choosing the non-www version.

Whichever you choose, though, be consistent. Make both www and non-www versions accessible, but make one of them definitive, always link to that version, and make the other redirect to it (permanently, status code 301). Having both hostnames respond directly is bad for SEO, and serving any old hostname that resolves to your server leaves you open to DNS rebinding attacks.

bobince