WWW or not WWW, what to choose as primary site name?

Domain Name

Domain Name Problem Overview


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!

Domain Name Solutions


Solution 1 - Domain Name

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.

Solution 2 - Domain Name

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

Solution 3 - Domain Name

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.

Solution 4 - Domain Name

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

Solution 5 - Domain Name

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.

(Edit: I recently set up a domain for my family to use, including webmail. My wife asked what the address of the webmail was. I said "mail.ourdomain.com". She typed "www.mail.ourdomain.com".)

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.

Solution 6 - Domain Name

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.

Solution 7 - Domain Name

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

Solution 8 - Domain Name

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

http://no-www.org/">http://no-www.org/</a> are trying to get it deprecated.

Although http://www.w3.org/">http://www.w3.org/</a> 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.

Solution 9 - Domain Name

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.

Solution 10 - Domain Name

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

Solution 11 - Domain Name

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.

Solution 12 - Domain Name

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

Solution 13 - Domain Name

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.

Solution 14 - Domain Name

Whatever you use, stick to one or else you'll have to make 2 sets of cookies for each domain to make your sessions/cookies work properly.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMike ChaliyView Question on Stackoverflow
Solution 1 - Domain NameAndrew HareView Answer on Stackoverflow
Solution 2 - Domain NameKeith WilliamsView Answer on Stackoverflow
Solution 3 - Domain NameGumboView Answer on Stackoverflow
Solution 4 - Domain NameLucas JonesView Answer on Stackoverflow
Solution 5 - Domain NameRichieHindleView Answer on Stackoverflow
Solution 6 - Domain NameGreg HewgillView Answer on Stackoverflow
Solution 7 - Domain NameGavView Answer on Stackoverflow
Solution 8 - Domain NameStuperUserView Answer on Stackoverflow
Solution 9 - Domain NameJB KingView Answer on Stackoverflow
Solution 10 - Domain NameTonyView Answer on Stackoverflow
Solution 11 - Domain NameIlari KajasteView Answer on Stackoverflow
Solution 12 - Domain Namefoxx1337View Answer on Stackoverflow
Solution 13 - Domain NameKeithView Answer on Stackoverflow
Solution 14 - Domain NameAdam FView Answer on Stackoverflow