views:

1068

answers:

13

From technical perspective the only issue is traffic and incoming links (one of them should redirect to another).

Now I need to choose which one should be primary. Some sites have www (google, microsoft, ruby-lang) and some without www (stackoverflow, github). Seems to me the newer do not use WWW.

What to choose?

Please with some explanations.

UPDATE: This is programming related question. Actually site is for programmers, so I expect to see what techy people think.

UPDATE: Site without WWW is clear winner. Thank you guys!

+23  A: 

It doesn't matter which you choose but you should pick one and be consistent. It is more a matter of style but it is important to note that search engines consider these two URLs to be different sites:

http://www.example.com
http://example.com

So whichever you choose for aesthetic reasons should be consistently used for SEO reasons.

Edit: My personal opinion is to forgo the www as it feels archaic to me. I also like shorter URLs. If it were up to me I would redirect all traffic from www.example.com to example.com.

Andrew Hare
It's also useful to have a single canonical domain so cookies don't get lost, which really confuses users
Adam Batkin
Plus, if you chose one as canonical, accept the other but redirect it to avoid duplicate content from the search engines point of view.
streetpc
I need to choose :). So this answer could not help me :). I am aware about CEO issues, I have otilned this in question.
Mike Chaliy
@Mike - I don't think you meant CEO issues - those would be when the Chief Exec has a fit because "all websites must start with WWW!" ;)
Keith Williams
http://stackoverflow.com/questions/2919394/whats-the-point-in-having-www-in-a-url
Quintin Par
A: 

I always make the non-www one redirect to www and refer to them as www.mysite; Think about various forums and instant messenging apps that correctly convert links only when they begin with www. .

foxx1337
then type it as http://sitename.com - this will get picked up fine and will actually work in MORE cases.
tomfanning
SO picked up what I typed and converted it to a link :-) proving my point. h t t p : / / sitename .com
tomfanning
+8  A: 

Don't use WWW. It's an unnecessary tongue-twister, and a pain in the arse for graphic designers.

Keith Williams
What problems does it cause graphic designers?
StuperUser
I guess they should add WWW to the logo's, otherwise users will be confused, same could be true for ads.
Mike Chaliy
@StuperUser - it's just noise on the logo; the pattern of the Ws is quite visually distracting.@Mike - I think mysite.com is obviously a website, with or without WWW. People will still *type* the WWW, which is why you configure both on the server, but telling someone to go to "bbc.co.uk/news" is just as understandable as "www.bbc.co.uk/news"
Keith Williams
+7  A: 

Register both, obviously. I would make the www redirect to the normal URL, as it only exists to make the people who habitually type it at the beginning of every address happy anyway. Just don't, whatever you do, require the www to be typed manually. Ever.

Lucas Jones
You don't include the "www" when registering domain names. The "www" is a subdomain.
John Topley
Also, if you have a https certificate, don't forget to register it for both www, and non-www.
Mercer Traieste
@John I think he meant register them in your app server.
Mercer Traieste
+5  A: 

I'd redirect to without www. In Apache 2.x:

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.yourdomain\.com$
RewriteRule (.*) http://yourdomain.com/$1 [R=Permanent]

I think the www is meaningless; we all know we're on the world wide web. It would be much better to use subdomains for load balancing or for device specific sites (like m.google.com for mobiles, for example, even though there is a .mobi top level domain now).

Gav
I am interesting why you redirect not how...
Mike Chaliy
+6  A: 

It depends on your audience, I think. A non-technical audience will assume that the www is there, whereas a technical audience will not instinctively expect it, and will appreciate the shorter URLs.

Either way, make sure the one you don't use cleanly does a 301 Redirect to the one you do use - then neither users nor search engines will need to care.

RichieHindle
A: 

You want your url to be memorable, and you want Google et al to register the same url for rankings and the like.

Best practice appears to be to handle the www, but always HTTP redirect it to a non-www variant. That way the search engines know to rank links to both variants as the same site.

Keith
+2  A: 

Would you have other subdomains? If so, that may make using the www make more sense to my mind as some places may have various subdomains used for other purposes like a store or internationalization subdomains.

JB King
+2  A: 

There are some issues you should consider. See for example Use Cookie-free Domains for Components for a cookie validity issue.

But regardless of how you decide: Use just one of that domains as your canonical domain name and use a 301 redirect to correct the invalid. For an Apache webserver, you can use mod_rewrite to do that.

Gumbo
A: 

I normally go with www.sitename.com because it is explicit that it is the main part of your site. Testing.sitename.com is testing. House.sitename.com is my home PC. I like be explicit however I do not mind when sites do not use www. I am not a purest. :)

Tony
+2  A: 

One aspect of this question deals with CDNs and some web hosts (eg. Google Sites). Such hosts require that you add a CNAME record for your site name that points to the host servers. However, due to the way DNS is designed, CNAME records cannot coexist with other records for the same name, such as NS or SOA records. So, you cannot add a CNAME for your example.com name, and must instead add the CNAME for a subdomain. Of course people normally choose "www" for their subdomain.

Despite this technical limitation, I prefer to omit the www on my sites where possible.

Greg Hewgill
As far I know this is not true, you can use "example.com." (did you noticied dot after domain name?).
Mike Chaliy
I see the dot, but I think you'll find that from the point of view of DNS, "example.com" and "example.com." are treated the same and you still can't add a CNAME record for either of them.
Greg Hewgill
May be this depends on implementations, but this is exactly how I did this with heroku hosting. Check out - http://onticoren.com/2009/06/29/go-daddy-dns-heroku/
Mike Chaliy
+2  A: 

www is used as a standard sub domain, subfolder for websites in the main domain.

http://no-www.org/ are trying to get it deprecated.

Although http://www.w3.org/ include www.

Worth checking both those sites.

It seems to be become a matter of taste and a religion issue at the moment rather than a standard. Whatever you choose, make sure you register or redirect from www as Control+enter etc. shortcuts copy in www.

StuperUser
http://www.www.extra-www.org/ - funny
Mike Chaliy
A: 

Use without the www. The general rationale behind this is that since you are writing an address to a web browser, it's already implicit that you are accessing a web site (what else would you do with a browser?) - using the extra www is therefore useless.

To be specific, when receiving a http request, you know the user wants to access the website. The web browser adds the http://-header implicitly, so user only needs to worry about the address. Same goes to other services as well - if you host ftp, it should be enough to point the ftp client to the domain without the ftp. -prefix.

If I understand correctly, the reasons for using the different www., ftp., etc. subdomains are mostly historical, and are no longer relevant these days since traffic is simply directed to the correct server/service - the redundant prefixes have just stuck because of their popularity.

Ilari Kajaste