News for hackers. Stuff that matters.
Re:Ask HN: www.site.com or site.com? by byoung2 on Wednesday September 22, 2010 @08:50PM (#1718123)
I think www vs. non-www is a matter of personal preference. More important is that you stick with one and use that sitewide. Don't forget to 301 the other one to your preferred one. People are so used to typing www before a domain name, so I stick with that and force www with a redirect.
Re:Ask HN: www.site.com or site.com? by tnorthcutt on Wednesday September 22, 2010 @09:18PM (#1718180)
It's largely a matter of personal preference, but an important consideration is that using site.com will mean any cookies served from site.com will also be served on any subdomains. For more reading on the subject: http://www.phpied.com/www-vs-no-www-and-cookies/

"Basically you should always use www if you're planning to use any other sub-domains and you want them cookie-free."

Re:Ask HN: www.site.com or site.com? by jpcx01 on Thursday September 23, 2010 @04:32AM (#1718970)
You get to set the domain when setting cookies so its not a huge issue either way.
Re:Ask HN: www.site.com or site.com? by underdesign on Thursday September 23, 2010 @01:28PM (#1720447)
Usually, but some browsers won't accept forged cookies. It'll only accept cookies from the domain it requested from.
Re:Ask HN: www.site.com or site.com? by Rhapso on Wednesday September 22, 2010 @10:25PM (#1718324)
Well, chrome has decided "www." is implied. I am reserving judgment about this, but in all modern browsers you can ignore the www. Honestly, without the "www." you have a much stronger chance to define your brand. Which do you remember better? "www.iamawesome.com" versus "iamawesome.com"?
Re:Ask HN: www.site.com or site.com? by Xurinos on Thursday September 23, 2010 @11:27AM (#1719956)
Anecdote of dealing with average users: When I am over shoulders and ask people to go to various sites, the first thing they do is slap in a "www.", assuming that every web site must begin with it. In some situations, I have to specifically tell them NOT to put the www.
Re:Ask HN: www.site.com or site.com? by imp on Thursday September 23, 2010 @11:53AM (#1720047)
I like site.com because the url is shorter. Just a preference. In these days of browsers on phones and url shorteners, it makes sense to keep the base domain as short as possible. If you redirect from the www, it takes care of everything.
Re:Ask HN: www.site.com or site.com? by _b8r0 on Thursday September 23, 2010 @03:06AM (#1718836)
It shouldn't really matter, but may well do if you're considering less tech savvy visitors. Either way, you should support both with a HTTP 301 redirect to avoid search engines thinking that you have duplicate content.
Re:Ask HN: www.site.com or site.com? by CyberFonic on Thursday September 23, 2010 @02:07AM (#1718761)
I use www.site.com on all printed material, advertising, etc. It seems to be more recognisable for casual web users. Redirect (301) site.com to www.site.com. I think there is a RFC recommending this.
Re:Ask HN: www.site.com or site.com? by beseku on Thursday September 23, 2010 @03:59AM (#1718913)
I default, (by which I mean redirect non-'www.') to 'www.' simply because if you have a few subdomains too, it makes sense in a 'grand scheme of things' kind of way ...

www. dev. old. cdn.

etc etc ...

Re:Ask HN: www.site.com or site.com? by RealGeek on Thursday September 23, 2010 @11:23AM (#1719935)
Technically, it does not matter. Its more of a personal preference.

How does your domain sounds better? With www or without www?

Re:Ask HN: www.site.com or site.com? by underdesign on Thursday September 23, 2010 @01:26PM (#1720437)
You can set your server to respond to both, and should.

I love when I can hit two different web pages on the same URL based on whether or not I included the 'www'.

This is a sign of a poor IT setup.

When you spell it out over the phone, you should include the http://, though. (Haha! It's also useless!)