-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
                            [Back] [Bottom] [Index]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

                   -=[ Is "www." Needed in Domain Names? ]=-
		   
         By Michael Walden - Created: 2024-01-01 - Updated: 2024-01-01

Background
----------

Historically, "www." was used to indicate that a domain name was for use on the
World Wide Web as opposed to FTP, POP3, IRC, Gopher, etc..  However, as the
Internet evolved, the need for "www." diminished.  Nowadays, most websites can
be accessed with or without "www." at the beginning of the domain name.

There is nothing special about the "www." subdomain other than tradition.  Any
word or string of letters (a-z, 0-9 and "-" but not as a starting or ending
character and not two or more consecutive) can be used in a subdomain.

For The Webmaster
-----------------

Use of "www." in a domain name is not a requirement.  It is common practice to
include "www." as a subdomain in URLs.  Currently, the choice between using
"www." or not is a matter of preference or a branding choice.  The domain
without "www." is easier to type, most would say it looks better on promotional
material, and the brand name does not get cluttered with unnecessary letters.

Technically speaking, there is a slight difference between using "www." and not
using it, with respect to the use of cookies.  Care should be taken when
configuring cookies on your website relative to subdomains.  See [1], [2], [3],
and [4].

Ultimately, whichever option is chosen, with or without "www.", it is essential
to configure the website and server settings to ensure that both the "www." and
non-"www." versions of the URL work correctly.  This is to prevent loss of
traffic by web surfers that may otherwise think the site is down/gone if they
use the URL form that does not work.  To make both URLs work, use URL
redirection to send the URL you are not using to the URL you are using.

If you want to have a TLS/SSL certificate (allowing https to work) for
"https://example.com", it will not work with "https://www.example.com".  They
are considered different websites and the TLS/SSL certificate knows which one
it was issued for.

If you are intending to have a website with a TLS/SSL certificate and wish to
use URL redirection to direct the unused URL to the used one, you will
unfortunately have to get another TLS/SSL certificate for the URL that is only
used to do the URL redirection.  This is if you do not want the web surfer to
see their browser complain about the site being insecure (when using https on
the domain that is being redirected).  Unfortunately this can, at times, come
at a monetary cost.

## UPDATE: Just before posting this article, I found a web page which claims
## that some of what I said above about "www." not being needed is not entirely
## correct, at least when it comes to big websites.  It also has a more
## technical description of the need for "www.".  See the following link after
## reading the rest of this page.  Link [5].  This may also explain why the
## "100 Big-Name Websites" survey below has 94% with "www." added by the site.
## Also, to clarify one point, the article linked above really needs to say that
## *any* subdomain is good to have, not just "www.".  So, "www." is not special.
## It may be just a convenient placeholder to use.  Lastly, before preparing
## this article, I did my research on this subject (Is "www." Needed in Domain
## Names?) and the predominant belief is what I wrote about here.

For The Web Surfer
------------------

When entering a domain name in the address bar of your web browser, you should
enter it as the short form "https://example.com" since nearly all websites will
automatically redirect you to the long form "https://www.example.com" address
saving you keystrokes.  In the case that you get an error message or the wrong
web page (such as the web server's default page) in your browser, try adding
the "www." and see if that gets you to the expected page.

100 Big-Name Websites (Mostly in USA)
-------------------------------------

I was curious about what 100 big-name websites would do with the use of "www."
and non-"www." domains.  So, I conducted a survey.  Below is a complete list of
the results.  Launching each of the following URLs will demonstrate the handling
of the "www." and non-"www." domains.  The URLs are not in any particular order.

(Type, URL)
1, https://amazon.com
1, https://wholefoodsmarket.com
1, https://walmart.com
1, https://target.com
1, https://costco.com
1, https://aldi.us
1, https://bestbuy.com
1, https://albertsons.com
1, http://kroger.com
1, https://traderjoes.com
1, https://ebay.com
1, https://apple.com
1, https://microsoft.com
1, https://dell.com
1, https://hp.com
1, https://ibm.com
1, https://microcenter.com
1, https://asus.com
1, https://logitech.com
1, https://samsung.com
1, https://sony.com
1, https://att.com
1, https://verizon.com
1, https://xfinity.com
1, https://t-mobile.com
1, https://lg.com
2, https://www.panasonic.com
1, https://facebook.com
2, https://www.twitter.com
1, https://instagram.com
1, https://linkedin.com
1, https://reddit.com
1, https://netflix.com
1, https://google.com
1, https://youtube.com
1, https://bing.com
1, https://yahoo.com
2, https://www.yandex.com
2, https://www.duckduckgo.com
1, https://startpage.com
1, https://aol.com
1, https://nike.com
1, https://adidas.com
1, https://reebok.com
1, https://converse.com
1, https://gap.com
1, https://kraftheinzcompany.com
2, https://www.coca-cola.com
1, https://pepsi.com
1, https://drpepper.com
1, https://sprite.com
1, https://7up.com
1, https://canadadry.com
1, https://rootbeer.com (A&W)
1, https://doritos.com
1, https://mcdonalds.com
1, https://subway.com
1, https://starbucks.com
1, https://bk.com (Burger King)
1, https://wendys.com
1, https://tacobell.com
1, https://kfc.com
1, https://pizzahut.com
1, https://dominos.com
1, https://chick-fil-a.com
1, https://dairyqueen.com
1, https://whitehouse.gov
1, https://usps.com
1, https://ups.com
1, https://fedex.com
1, https://dhl.com
1, https://cbs.com
2, https://www.abc.com
1, https://nbc.com
1, https://pbs.org
1, https://fox.com
1, https://usatoday.com
1, https://wsj.com (The Wall Street Journal)
1, https://nytimes.com (The New York Times)
1, https://washingtonpost.com
1, https://latimes.com (Los Angeles Times)
1, http://barnesandnoble.com
1, https://ford.com
1, https://gm.com (General Motors)
1, https://stellantis.com
1, https://fiat.com
1, http://chrysler.com
1, https://dodge.com
1, https://jeep.com
1, http://alfaromeo.com
1, https://peugeot.com
1, http://chevrolet.com
1, https://toyota.com
1, https://honda.com
1, https://nissan-global.com
1, https://subaru.com
1, http://hyundaiusa.com
1, https://vw.com (Volkswagen)
1, https://bmw.com
1, https://tesla.com

Type Key:
 1 = "www." added by the site
 2 = "www." removed by the site
 3 = Either with or without "www." works
 4 = Broken or incorrect page (such as the web server's default page) with "www."
 5 = Broken or incorrect page (such as the web server's default page) without "www."

Results:
 94% Type 1
  6% Type 2
  0% Type 3
  0% Type 4
  0% Type 5

Based on the findings above, if you are going to set up a website, it is best to
configure your site to have the long form "https://www.example.com" address as
your active page, and to have the short form "https://example.com" redirect to
the long form address.  That is what the majority of big-name sites do.  On the
other hand, if you only intend to have a small website then you can use the
short form "https://example.com" address as your active page and have the long
form "https://www.example.com" address forward to the short form address.  For
a technical explanation of why website size matters, see [5].
 
Cited Links
-----------

[1] Share cookies between subdomain and domain
    https://StackOverflow.com/questions/18492576/share-cookies-between-subdomain-and-domain

[2] How do browser cookie domains work?
    https://StackOverflow.com/questions/1062963/how-do-browser-cookie-domains-work

[3] Using HTTP cookies
    https://Developer.Mozilla.org/en-US/docs/Web/HTTP/Cookies

[4] HTTP State Management Mechanism (Cookies)
    https://www.RFC-Editor.org/rfc/rfc6265

[5] Why use www? | www. is not deprecated
    https://Web.Archive.org/web/20220527025758/http://www.yes-www.org/why-use-www/

Other Related Links
-------------------

World Wide Web - Wikipedia
 https://en.Wikipedia.org/wiki/World_Wide_Web

Webmaster - Wikipedia
 https://en.Wikipedia.org/wiki/Webmaster

Domain name - Wikipedia
 https://en.wikipedia.org/wiki/Domain_name

Subdomain - Wikipedia
 https://en.Wikipedia.org/wiki/Subdomain

URL - Wikipedia
 https://en.Wikipedia.org/wiki/URL

URL redirection - Wikipedia
 https://en.Wikipedia.org/wiki/URL_redirection

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    (This document was originally published here: https://MW.Rat.bz/www )
                         Counter:  2323  (Since 2024-01-01)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
                              [Back] [Top] [Index]
                            [Contact Michael Walden]
                      [Validates as HTML 4.01 Transitional]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
                                     [EOF]