8
  1. http://example.com
  2. www.example.com
  3. http://www.example.com
  4. example.com

Which of these would you choose as your favourite to work with from 2016 onward? Which domain name would you mention to your clients, websites that link to you, your letterheads, your contact cards etcetera. Why one or the other? Which to avoid these days?

Thinking of the following aspects:

  • validity, correctly loading URL
  • audience, most geeks know http://, most seniors 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 preference by major search engines/social media sites
  • consistency so that links don't fragment but all point to the same
2

5 Answers 5

10

Personally I would put example.com on contact cards,etc and have it redirect to www.example.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 example.com or www.example.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.example.com is due to cookies. For example, the cookies on www.example.com will be completely separate from static.example.com but any cookie set on example.com will be sent with the HTTP request to sub1.example.com, sub2.example.com, etc. Although this is just my preference.

4
  • 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. Dec 1, 2010 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, 2010 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 [email protected], people still ask: "What's your site/domain?". BTW: excellent point about webhost.com and customer.webhost.com Nov 30, 2012 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. Mar 2, 2013 at 18:05
4

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

You can always have a example.com redirect to a www.example.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.example.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.example.com/Something/Something-Else into example.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.
2
  • Thanks Alex, updated your info into considerations of main question!
    – Sam
    Dec 3, 2010 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)
    – Gup3rSuR4c
    Dec 3, 2010 at 22:39
1

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.example 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.example, so if your audience is non-geeks, do them a favour, give them what they're expecting, and use www.yoursite.example.

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

5
  • 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. Dec 1, 2010 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, 2010 at 7:42
  • 4
    what do you mean when you say 'the www. is deprecated' - is this from w3c?
    – UpTheCreek
    Jan 14, 2011 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? Jan 17, 2011 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. Mar 2, 2013 at 18:06
1

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).

4
  • AFAIK only IE6 would assume http:// in hyperlinks if omitted!
    – MrWhite
    Nov 30, 2010 at 21:43
  • 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. Dec 1, 2010 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, 2010 at 18:13
  • Nowadays you should default to https:// links instead of http:// Aug 20, 2018 at 20:17
0
  • Online: yoursite.example
  • Print: http://yoursite.example
  • Links: http://yoursite.example

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.example and yoursite.example 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.example vs Visit our website: yoursite.example.

3
  • 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. Dec 2, 2010 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. Nov 30, 2012 at 11:31
  • Nowadays you should default to https:// links instead of http:// Aug 20, 2018 at 20:16

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