vote up 34 vote down star
14

Recently I had to choose whether the main URL for my site will be www.mysite.com or mysite.com. I went with the www option (here it is) because I'm used to seeing such sites. However, in the process I discovered there are many people that are very much against the usage of www in URLs.

  • Is there any reason to be against www?
  • Is there any reason to be in favor of www?
  • Is there a right or wrong on this subject?
  • What are some considerations to take into account when making such a decision?
flag
show 5 more comments

16 Answers

vote up 58 vote down check

If you are going to use cookies, definitely keep the www..

You can always use an 301 redirect to redirect the short domain to the one with www., that way your users don't have to type it.

This will allow you to create sub-domains that are cookie-less for static data serving. Without a www., cookies are served on all sub-domains. Therefore, if you are not using the www., you need a completely separate domain name to have a cookie-less domain versus just using a sub-domain.

Other than that, choosing between keeping the www. or not is just a question on which one you prefer. Just make sure to redirect the one not chosen to the other one using a 301 redirect.

EDIT:

To explain, setting a cookie uses a hierarchy for how the cookie is propagated to domain.

For example, setting a cookie to example.com effectively allows the transfer of cookies to:

example.com
www.example.com
sub.www.example.com
my.example.com
oh.my.example.com
images.example.com
hello.example.com

Versus setting a cookie to www.example.com only allows the cookie in those situations:

www.example.com
sub.www.example.com

By using a www. you are allowing yourself to use sub-domains to have different cookies from the main site (and none at all if so desired).

Without www. (or another sub-domain), all cookies set on the domain will propagate to the sub-domains.

link|flag
4  
This is a big issue - could you please explain what's the drawback of no-www regarding cookies? I have never heard such limitation mentioned anywhere... – Rax Olgud Aug 31 at 20:44
1  
+1 thanks for the details – Rax Olgud Aug 31 at 20:50
2  
By (mis-)using example.com for web server address, you risk ending up with inelegant solutions like serving static content from addresses like sstatic.net instead of static.example.com for instance... – hlovdal Aug 31 at 21:05
4  
@hlovdal: Yes, that's exactly what happened with StackOverflow, SuperUser and ServerFault. Atwood regretted going the no-www route. – Andrew Moore Aug 31 at 21:05
2  
Interesting, I'd never encountered this problem. I dropped the 'www' from my personal domain name years ago based on an article I read by someone, Zeldman or TBLee (don't remember now) where they argued that 'www' was unnecessary. And I just think it looks better without the 'wu-wu-wu' in front. – beggs Sep 1 at 1:52
show 6 more comments
vote up 15 vote down

It doesn't really matter which one you choose, however I would choose one and enforce that with .htaccess to prevent duplicate results in search engines and weird cross-domain cookie problems.

To force the www:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
link|flag
vote up 7 vote down

Nothing much to add that hasn’t been mentioned already; however, regardless of which one you choose, please make sure that either your site works with and without the www, or it redirects from one to the other as Dan suggested. There’s nothing worse than going to a site and erroneously think it’s down because it doesn’t work without the www.

link|flag
show 1 more comment
vote up 6 vote down

In my opinion just mysite.com for a web server is annoying. It is much clearer if hosts are named by function, www.mysite.com, ftp.mysite.com, nntp.mysite.com, irc.mysite.com, ns1.mysite.com, blog.mysite.com, etc.

link|flag
3  
I just consider no-www to be a silent www. It's not as if someone's likely to put the FTP, IRC, name etc. servers on the root. – ceejayoz Aug 31 at 21:12
2  
ceejayoz: Well, actually, most people do :) They just run them on different ports. – joshhunt Sep 2 at 6:56
show 1 more comment
vote up 5 vote down

Everyone will have their own opinion, but I prefer using the "www". From a practical standpoint, it allows you to create rules that apply to different resources within the same domain. For example, if you establish a Web site at http://example.com, and then later create another site at http://test.example.com, it can be difficult or impossible in some cases to take actions affecting example.com that do not also affect test.example.com (there are a number of issues with cookies, for instance).

link|flag
vote up 4 vote down

My personal reason to not use a www is URL retention in the user's mind. We want our brand to stand out and hence it's got to be simple and easy to understand.

link|flag
2  
Yeah, there's something about that "DoubleYou DoubleYou DoubleYou DOT" at the start of a domain that lends it credibility. – Phoshi Aug 31 at 20:58
show 4 more comments
vote up 4 vote down

There's a very non-technical reason to use the www. Novice users often get confused if you tell them a url not starting with www. I run in to this everyday when trying to direct customers to different sites and then have to explain that www is not necessary. They're just trained that a url starts with www and everything else confuses them.

Doesn't matter of course but it can be taken into consideration.

link|flag
7  
Which is why the best method, imo, is to silently redirect www. to the domain. Eventually they'll catch on, but until then it doesn't make a difference to them. – Phoshi Aug 31 at 21:07
vote up 3 vote down

Here's a good article on the topic

link|flag
show 1 more comment
vote up 2 vote down

I use the www. because many people associate that with "the internet", and mostly I deal with non-experts in the field, so...

link|flag
vote up 2 vote down

If you are creating a XML sitemap for your site and you have a large number of links, you could save four characters per URL. For a site like stackoverflow and sister sites, that is a big saving on the XML file size.

<loc>http://example.com/site/abc/</loc>

vs

<loc>http://www.example.com/site/abc/</loc>
link|flag
2  
That should not make a difference at all when the sitemap file can be compressed. – Thilo Sep 1 at 6:31
1  
@stukelly, you don't even have to compress it yourself. A sane web server compresses things on the fly, if the browser (or the search engine bot) accepts it. – Arjan van Bentem Sep 13 at 10:18
show 1 more comment
vote up 2 vote down

Pros www:

  • Easy to understand that "visit www.example.com" refers to a website
  • Some quick-launchers(windows startmenu search for example) parse www.example.com as a website and launches your web browser, while not identifying example.com without the http:// as a website and instead tries to search for files on your harddrive. (same as 1 actually)

Cons www:

  • Looks ugly
  • 4 extra characters to pronounce, type, transfer and store somewhere
  • Completely redundant as all http-connections are most likely referring to a webserver already
link|flag
vote up 1 vote down

Apart from the cookies answer from Andrew Moore the only other reason would be personal preference.

Whatever you choose make sure that the other is redirected to it this is to ensure you have only one Page Rank with Google.

With Google your Page Rank is treated as separate for mysite.com and www.mysite.com.

So if some people link to your site as mysite.com and others as www.mysite.com this will give you two separate page rank scores and hence a lower position in the search results.

link|flag
vote up 1 vote down

The WWW prefix doesn't seem to serve any purpose - if you're opening the mysite.net in a web browser, everyone and everything involved knows you want to see a www page.

The same goes for other prefixes as well. No reason for ftp.mysite.net - if I open it in an FTP browser, it's quite clear to everyone that I want connect to the FTP service.

Technically speaking, the client software I use already knows which protocol and designated port it should use for connecting. Similarly on the server side, the traffic can be directed to the correct service or a dedicated server depending on the port being used. As I understand it, there might have been some historical performance reasons to separate different type of traffic directly to different servers - but I'm pretty sure they are long gone. (I might be mistaken in this, so please correct me if it's actually still relevant for performance issues.)

To me, using www. ftp. irc. and such prefixes just feels crude. The computer should deal with it, not us. It's forcing the tech down the user's throat in a situation where it makes no difference. It's a very common practice, possibly for historical reasons, so we've become very used to it - but that doesn't make it reasonable.

So what it boils down to, is that it's a matter of taste. Some people like it, some don't, for various reasons.

link|flag
vote up 1 vote down

Don't use the www prefix. It serves no purpose other than to confuse users.

link|flag
vote up 0 vote down

Regardless of using www in a web browser or not:

For me the main place to avoid using www, is in all kind of communications. This is purely to keep non-savvy people from creating ugly printed material in which some word processor has changed the URL to show as blue, underlined text. Which, of course, is not clickable on paper at all.

link|flag

Your Answer

Get an OpenID
or
never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.