Is it ok to not use 'www' in my website subdomain url?

13,536

Solution 1

There is no real right or wrong answer to this question, it's purely down to personal preference.

The www prefix originated to specify web servers, for example you might have mail.example.com, vpn.example.com, san.example.com etc. www.example.com just became the standard for web sites, however it's not, and has never been required. As an interesting read, Heroku (Cloud Ruby Rails hosting) recommends using the www prefix (http://status.heroku.com/incident/156) but that's for reasons to do with DNS CNAME records, etc.

There is no hard or solid reason to, or to not, use the www prefix. Yes you could say not using it reduces your data transfers by a few bytes (HTTP Host header, cookies, absolute links) but you should always give both options. If you prefer no www. then set up a redirect to the main domain. The only consideration is canonical URLs (Google will see www.example.com and example.com as two separate sites, so it is generally good to redirect one to the other).

Solution 2

You could always direct enquirers to No-WWW.ORG, the organizers of which make the rather pithy point that one addresses mail to [email protected] not [email protected] so why should URLs have rôle domain name labels.

This is what the www. label is, of course: a rôle label. It isn't actually necessary to use rôle domain name labels for services such as mail, FTP, and the WWW. They are superfluous and ambiguous. (ftp.example.com. may or may not have WWW service, for example.)

A halfway house, that retains the rôle name, is to make http://example.com./ work like http://www.example.com./ and that is what most people do. (Note that the canonical way of doing this, as given, does not involve client-side HTTP redirects, and concerns about redirects are actually irrelevant.)

Of course, in an ideal world (as envisaged by Jim Nelson and many others), the WWW would have been brought kicking and screaming into the 21st century, instead of the WWW being the one shameful laggard, and such rôle names would be obsolete.

Share:
13,536

Related videos on Youtube

churnd
Author by

churnd

I admin Mac, Windows, Linux, Sun, and even still SGI. Twitter - @churnd

Updated on September 18, 2022

Comments

  • churnd
    churnd over 1 year

    We have a website that is a subdomain of our primary domain, such as site.example.com. The official URL of the website is http://site.example.com, but some people keep referring to it as www.site.example.com.

    I have a redirect rule in place to redirect www.site.example.com to site.example.com, but I ultimately need to explain why www.site.example.com is bad practice (or is a bad idea), but I don't know how. Are there any guidelines or rules that dictate best practices with regard to domain names, specifically the use of subdomains?

  • churnd
    churnd almost 13 years
    I was afraid of that. I personally think if there is a subdomain, leaving off "www" looks right.
  • DocRoot
    DocRoot over 5 years
    This answer seems to focus on www being a subdomain of the domain apex. However, the question is specifically focusing on subdomains, where the use of www would be a sub-subdomain (ie. a subdomain to the existing subdomain). Heroku only recommends the www subdomain on the main/apex domain. If you already have a subdomain (as stated in the question) then you shouldn't add another www sub-subdomain in order to configure Heroku - that simply adds complexity and is only going to cause problems.
  • Patrick Mevzek
    Patrick Mevzek over 5 years
    no-www.org : this domain is for sale claims the website.
  • Will Hancock
    Will Hancock about 3 years
    This is missing the point of the question; is it good practice to add www. subdomain to an existing sub-domain. I think it looks fugly - and wouldn't and actually can't find anywhere where I see this practice. I just had this same request come in because they can't get the redirects working... www.{subdomain}.{hld}.com is UGLY. Bleh.
  • Mc Bton
    Mc Bton over 2 years