4 ms·
Ask HN: www.site.com or site.com?
Which is preferred and why?
- byoung2 16y agoI 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.
- tnorthcutt 16y agoIt'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/ 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."
- jpcx01 16y agoYou get to set the domain when setting cookies so its not a huge issue either way.
- underdesign 16y agoUsually, but some browsers won't accept forged cookies. It'll only accept cookies from the domain it requested from.
- Rhapso 16y agoWell, 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"?
- CyberFonic 16y agoI 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.
- iuguy 16y agoIt 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.
- beseku 16y agoI 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 ...
- RealGeek 16y agoTechnically, it does not matter. Its more of a personal preference. How does your domain sounds better? With www or without www?
- Xurinos 16y agoAnecdote 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.
- imp 16y agoI 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.
- underdesign 16y agoYou 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:// http://, though. (Haha! It's also useless!)