Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.
  1. http://yoursite.com
  2. www.yoursite.com
  3. http://www.yoursite.com
  4. yoursite.com

Which of these would you choose as your favourite to work with, if you were to make a site for 2011 and beyond, which domainname would you provide to clients, websites linking to you, your letterhead, contact cards. Why one OR other? Which to avoid?

Thinking of the following aspects:

  • validity, correctly loading URL
  • audience, most geeks know http://, most seniors/clients don't
  • easiest to remember / URL as a brand
  • misspellings by user input (in mobile phone or desktop browser)
  • browsers not understanding protocol-less links
  • total length of chars for easy user input
  • method of peferance by major search engines/social media sites
  • consistency sothat links dont fragment but all point to the same
share|improve this question

migrated from stackoverflow.com Nov 30 '10 at 20:59

This question came from our site for professional and enthusiast programmers.

    
    
See also on SO: When should one use a 'www' subdomain? –  unor Nov 10 '13 at 3:55

5 Answers 5

up vote 3 down vote accepted

I personally prefer the www domains. As one of @Jonathon's points, the real main reason is with cookies. When you have domain.com and you apply a cookie to it, that cookie governs all sub domains such as www.domain.com, foo.domain.com and bar.domain.com which can cause you headaches in the future if you're dealing with sessions or security.

You can always have a domain.com redirect to a www.domain.com on the server side so when it comes to print media or linking with other sites, the less there is the better. A user will not bother to remember the www of www.domain.com so its useless information and I would go as far as to say that the attempt to do so will make the user unhappy, thereby making them avoid your site altogether.

If you're interested/are using the framework, I can supply the code for such a redirect in the form of an ActionFilterAttribute for ASP.NET MVC (I spent 2 days perfecting the filter on my own, so I'm feeling pretty confident about it).

On another note, when it comes to the actual code on your site, don't skip out on details. Meaning, don't try to take http://www.domain.com/Something/Something-Else into domain.com/Something/Something-Else.

  1. It's not going to work because the browsers don't understand protocol-less links.
  2. Even if they did, the second Uri will cause a redirect to the www version if you're normalizing, resulting in a pointless round trip back to the server.
share|improve this answer
    
Thanks Alex, updated your info into considerations of main question! –  Sam Dec 3 '10 at 9:47
2  
I just want to add about the protocol-less links, its in terms of linking to other sites/resources. If you're doing your own local links you can get away with relative links, ie. /Something. If you're linking to other sites/resources then it can become problematic... (it was 2 AM when I was answering, so I wasn't all there, lol) –  Alex Dec 3 '10 at 22:39

Personally I would put domain.com on contact cards,etc and have it redirect to www.domain.com. This can be done with a simple rewrite.

The reason for this is that my users should never be concerned with having to type www. I absolutely hate sites that require people to type the www - I think it's a completely outdated requirement from years gone by.

You would, however, want to 301 redirect from domain.com or www.domain.com. In fact, to anything. The point is to pick your favourite and set all the different ways to get to your site to redirect to the same place so that you aren't penalised for dupe content (I can't remember the SEO term).

The protocol is useless, since browsers will put it in for you (in fact, Chrome doesn't even show it).

Another reason that I have everything redirect to www.domain.com is due to cookies. For example, the cookies on www.domain.com will be completely separate from static.domain.com but any cookie set on domain.com will be sent with the HTTP request to sub1.domain.com, sub2.domain.com, etc. Although this is just my preference.

share|improve this answer
    
You can use a different domain for static content if you wish - Stack Overflow uses sstatic.net. If you have multiple TLDs you could use the alternate one - example.net if your main site is example.com. –  DisgruntledGoat Dec 1 '10 at 1:41
1  
Yeah - I was just giving a bit of an example as a consideration. Another example, if you're webhost.com and you host your customers as customer.webhost.com then you don't want your cookies passing to them. The static content example was just for static content awesomeness :) –  Jonathon Dec 1 '10 at 9:09
    
@Jonathon: IMHO putting domain.com on contact paper card is a mistake. Average people (no tech geeks) might not understand that it's a website. I noticed it with emails, even if we send emails from info@mydomain.com, people still ask: "What's your site/domain?". BTW: excellent point about webhost.com and customer.webhost.com –  Marco Demaio Nov 30 '12 at 11:41
    
@MarcoDemaio - I've seen that in actual real-world terms. People have come to expect certain things because it's easier to memorize exactly what it should look like than know technical details. –  Fiasco Labs Mar 2 '13 at 18:05

I don't know if the http:// is really required as mentioned above. Most browsers will assume http:// when a URL is type into the address bar if it is not present when the enter button is pressed. I'd say it only really is necessary in hyperlinks as then it is necessary for the link to function properly (unless the browsers assume http:// but at last check they didn't).

In print with or without the "www" is a tomato / tomáto situation. Users are familiar with the www and older web surfers will remember the days when it was required and is now habit. But it's also very common to see domains advertised without it so i don't leaving it off will confuse enough people to be concerned about it.

My advice is to choose one, any one, and stick with it. Consistency is key (and good usability).

share|improve this answer
    
AFAIK only IE6 would assume http:// in hyperlinks if omitted! –  w3d Nov 30 '10 at 21:43
    
Thanks for the info. Wasn't aware IE6 did that! –  John Conde Nov 30 '10 at 21:49
1  
I don't know about the conditions of IE6, but any link without http:// should be considered a local link. The URL http://example.com/www.example.com is perfectly valid. –  DisgruntledGoat Dec 1 '10 at 1:43
    
thanks! VALIDITY is an important aspect on the web, i just added this essencial word into the question at the very top! –  Sam Dec 2 '10 at 18:13

Forget anything that says http:// -- too scary for non-geeks, and browsers handle this well enough these days (Chrome doesn't even show it on latest builds).

yoursite.com is, strictly speaking, the correct way to represent the domain, as the www. is deprecated.

However, the average man (or woman) in the street is more familiar with seeing www.yoursite.com, so if your audience is non-geeks, do them a favour, give them what they're expecting, and use www.yoursite.com.

If you want to be more cutting edge, your audience is geeky, or you want to school people, use yoursite.com.

share|improve this answer
1  
+1 I agree the www is a MUST for non-geeks guy, if you do ecommerce or sell something remember that most of you customers won't be geeks. –  Marco Demaio Dec 1 '10 at 13:40
    
@Marco, thanks for new insight, i think i agree, now I know why i was struggling to choose between the www.yoursite and the always vaid yoursite ive updated this issue in the question –  Sam Dec 3 '10 at 7:42
3  
what do you mean when you say 'the www. is deprecated' - is this from w3c? –  UpTheCreek Jan 14 '11 at 7:29
    
@UpTheCreek - actually, this may not strictly be true, as i can't find anything definitive at w3.org. Perhaps it is more correct to say that it was never necessary? –  nthonygreen Jan 17 '11 at 6:52
    
Internally deprecated by a web subgroup only if they're not using the web to the full. Cookies are a mess and now you start using a cdn and a blog. Subdomaining will be around for a long, long time. Mostly an SMSification by the above. –  Fiasco Labs Mar 2 '13 at 18:06
  • Online: yoursite.com
  • Print: http://yoursite.com
  • Links: http://yoursite.com

I don't see how any of this relates to future proofing anything. Your DNS and web server should be set so that www.yoursite.com and yoursite.com are the same site.

A real link (for someone linking to you) is always going to start with http:// as that is the web protocol handler. On printed marketing material, it makes sense to use http:// unless specifically labelled as a website.

i.e. http://yoursite.com vs Visit our website: yoursite.com.

share|improve this answer
    
I would disagree and say that if it's a common suffix - either .com or your country's local TLD (.co.uk in the UK) then you don't need http:// or www. However for other less common TLDs I would recommend the www over http. –  DisgruntledGoat Dec 2 '10 at 19:18
    
@Fosco: print would be definitely better www.yoursite.com less chars and immediately recognizable by all type of folks as a website. –  Marco Demaio Nov 30 '12 at 11:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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