71

When going to www.facebook.com or www.cbc.ca is there any benefit or difference made by omitting the www?

EDIT: so it could be a problem if www is omitted but not automatically added, could it ever be a problem if www is added but not required?

Celeritas
  • 8,159
  • 36
  • 107
  • 150
  • 27
    See here: http://no-www.org/ – gparyani Jan 07 '14 at 02:53
  • 27
    See here: http://www.yes-www.org/ – Michael Hampton Jan 07 '14 at 17:14
  • 27
    Nah, see here: [extra-www.org](http://www.www.extra-www.org/) – chris-l Jan 07 '14 at 17:53
  • That might be a question regarding [user experience](http://ux.stackexchange.com) – Val Jan 07 '14 at 18:16
  • I've always been amused that the acronym "www" requires far more syllables to pronounce (at least in English) than the entire phrase it replaces. At least it is easy to type... :-) – RBerteig Jan 07 '14 at 19:22
  • @gparyani It is interesting that [www.no-www.org](http://www.no-www.org) works! – Nazar554 Jan 07 '14 at 20:22
  • @Nazar554 It's a redirect to the non-www version. – gparyani Jan 07 '14 at 20:43
  • I'm pretty sure that an extra-extra-www.org site will spring up soon (e.g. `www.www.www.example.com`). – gparyani Jan 07 '14 at 20:46
  • @RBerteig I know some people who pronounce it "triple-U" for that reason. Not sure if that'll ever catch on... – Darrel Hoffman Jan 08 '14 at 01:32
  • @DarrelHoffman I generally never say it at all because the convention seems to be these days that with or without it leads to the same place. – user287352 Jan 08 '14 at 01:48
  • 1
    dub-dub-dub was common for a while - what happened to that? – Phil Jan 08 '14 at 08:32
  • 1
    try http://vim.org vs. http://www.vim.org – sehe Jan 08 '14 at 10:01
  • @sehe I get redirected to the same site with a black kid holding a drill. – Celeritas Jan 08 '14 at 10:07
  • @Celeritas the first link is dead. If you get redirected, it's your browser doing you "favours" – sehe Jan 08 '14 at 10:07
  • @sehe isn't this bizarre, in Firefox the first link USUALLY works if I click it with the middle mouse button and open it in a new tab, otherwise it doesn't. It also works if I right click on it and select new tab. – Celeritas Jan 08 '14 at 10:16
  • @Celeritas oh joy. Go file some bugs at mozilla. Really, I suppose it could be construed a security issue to open a different link from what the user clicked. Meh. – sehe Jan 08 '14 at 10:22
  • 4
    @MichaelHampton I love that yes-www seems to be saying we should use www to remind people of the difference between hypertext transfer protocol and other internet protocols. It's a shame, really, that no one ever thought to just put http in web URLs just to make it clear ... ;) – StackExchange What The Heck Jan 08 '14 at 10:25
  • 2
    @chris-l: Nice to see that they _redirect_ [www.extra-www.org](http://www.extra-www.org) and [extra-www.org](http://extra-www.org) to [www.www.extra-www.org](http://www.www.extra-www.org) :-) – Martin Schröder Jan 10 '14 at 11:48
  • @DarrelHoffman I usually pronounce it woo-woo-woo and that is usually understood in context. – RBerteig Jan 13 '14 at 19:32

8 Answers8

80

In modern webbrowsers is there any point in putting www infront of a url that uses it? When going to www.facebook.com or www.cbc.ca is there any benefit or difference made by omitting the www?

It usually doesn’t, but it could.

This has nothing to do with the browser; it has to do with the web-server. The web-server is a computer (or even multiple computers) which receive queries for web-pages and send the appropriate data. A URL includes several parts, one of which is the name or address of the web-server.

Many companies host more than just a web-server, they may also run an FTP-server, a database-server, a mail-server, and so on. These could be hosted from the same machine as the web-server or on different machines.

In the past, it was common to specify the difference via a prefix for consistency. So for example, Acme Industries might buy the domain-name acme.org, then set up one or more computers to host the different service they have. When you want to use one of the services, you enter the appropriate host name:

 www.acme.org - Acme’s web-site
 ftp.acme.org - Acme’s file server
 sql.acme.org - Acme’s database server
 pop.acme.org - Acme’s incoming mail server
smtp.acme.org - Acme’s outgoing mail server

So why does it still work without www.? Because most web-servers allow you to accept different URLs and redirect them as necessary. For the convenience of users, most companies and organizations set up a rule to have have the web-server handle connections to the hostname on port 80 (the “web port”) or redirect it to another system if the web-server is a different machine.

Differentiating the service or machine being accessed can also be done through the port, but it requires specifically including it in the name, so it’s not really any better than using prefixes:

acme.org:80     - web-server
acme.org:21     - file server

Sometimes the scheme can perform this function:

http://acme.org - web-server
ftp://acme.org  - file server

Using schemes works as well and can be done automatically using the appropriate software (e.g., a browser would add http://, an email client would add pop://, etc.), but there are not official schemes for every type of server that can exist, and inventing one is not ideal because it would require software to support it.

It’s becoming less and less necessary to include www., but it is not universal and some sites still require it because helps keep things organized.

Synetech
  • 68,243
  • 36
  • 223
  • 356
  • 2
    Depending on the setup, the redirections might actually be happening on the DNS level. In fact, that's the default setup with at least one major domain provider. Also, if the redirect *was* on the webserver level, you'd still need DNS entries both the domain and its `www` subdomain towards the webserver anyway (though this does allow more control for different services/ports). – Bob Jan 07 '14 at 06:34
  • 1
    Yes, there are different ways that it can happen now and it can get quite complex and confusing. `:-/` That said, when the Internet’s foundations were first being designed (and later when URLs were being standardized), there was no ICANN or even IANA and sub-domains really did refer to actual, physical machines. These days they can all be hosted from the same system or even a whole cluster. – Synetech Jan 07 '14 at 14:16
  • it's a pity that SRV records can't used for HTTP until 1.2 at the earliest: http://stackoverflow.com/questions/9063378/why-do-browsers-not-use-srv-records – Rob Starling Jan 07 '14 at 17:28
  • On a side note, sometimes browsers _do_ have something to do with this: In Firefox, if the non-www domain is unreachable, the browser will try to load the www subdomain. For example loading `example.invalid` will also load `www.example.invalid` without any server redirects. – kapex Jan 08 '14 at 11:11
  • @kapep, yes, some browsers will try to be helpfull and add schemes and prefixes automatically. For example, in Chrome, if you enter `microsoft` and press `Ctrl`+`Enter`, Chrome will add `http://www.` and `.com`. However I meant that the *requirement* for them has nothing to do with the browser, it is up to the server whether it will work or not. – Synetech Jan 08 '14 at 20:07
15

Yes and no. The www is 'just' a subdomain thats used for websites commonly, and unfortunately not all companies set up their second level domain to be accessible without it.

If the address you're going to has a www subdomain and its not set up to allow its second level then its necessary. Else no.

As for how you set it up, there's both schools of thought that www is not needed and that it does. There's little reason not to set up your domain records to point at the www less second level domain. www is probably obsolete in this day and age but it dosen't hurt to have it. In my case, I personally don't have www domains but thats due to laziness more than anything else.

Journeyman Geek
  • 127,463
  • 52
  • 260
  • 430
  • 3
    I think a subdomain and a cname are different things. The `www` is a cname, not a subdomain. – user287352 Jan 07 '14 at 03:15
  • 6
    A cname is *merely* a type of record like an A name or a AAAA name, just that it points to another domain name, rather than an IP address. There's nothing magical or special about the www subdomain that makes it always a cname - I typically set them as A names or AAAA names. – Journeyman Geek Jan 07 '14 at 03:37
  • Yes, that is right, but no one sets up the `www` as a subdomain, where that is something different than the regular domain. It is confusing to call it a subdomain, because of convention, not because it technically is one or not. Though, technically, the `www` is not the cname either, but that feels too technical for this question. – user287352 Jan 07 '14 at 03:41
  • 1
    technically foo.bar is a subdomain of .bar, which is a top level domain (that annoyingly will likely exist soon), and www.foo.bar is a subdomain of foo.bar. We're splitting hairs here but a cname is a *type of domain record* rather than a *type of domain*. – Journeyman Geek Jan 07 '14 at 04:46
  • @fredsbend - actually its common to set up www as a subdomain, as it provides better performance - one less DNS lookup. Look no further then Google as an example of this. Their www records are A records as are their base domains. The same is true for superuser.com and slashdot.com They are by no means unique or different to the norm. – davidgo Jan 07 '14 at 05:19
  • @fredsbend It can be setup either way,using an A record can save a query and for large traffic websites that can be a significant resource savings. – Jacob Jan 07 '14 at 15:35
  • I would call "www" a *host name*. Whether the record is implemented as an a record or a cname is irrelevant. The host is named "www", and the domain is "facebook.com". A host name refers to *one* physical system, whereas a subdomain or domain refers to a *group* of systems. – TomXP411 Jan 07 '14 at 21:37
  • I disagree there - though I think the difference is minor. You can have more than one system with the same hostname - for example with round robin load balancing. You could also choose to have a different domain name and hostname for a system, and the hostname isn't necessarily a FQDN. On the internet, no one needs to know your hostname is dog. – Journeyman Geek Jan 08 '14 at 02:22
  • @TomXP411: According to that naming `facebook.com` is a domain, but `facebook` is also _host_ name in domain `com`, because `facebook.com` has an A record in addition to SOA and NS ones. And yes, that was one of the reasons why there used to always be `www`—to avoid mixing SOA+NS records with other types. According to DNS parlance, all records are called domains though. – Jan Hudec Jan 08 '14 at 06:38
  • @JourneymanGeek Acknowledged. While technically, a hostname is a form of domain name, there's a difference in their purpose. I'll never use the term "domain" to refer to a single endpoint. That's a "host", even if that host is a load-balanced group that responds to a single IP address. Whether facebook.com is also a hostname... well, there's a reason we put www in front of domain names - to distinguish the web servers from the ftp servers and other servers on a network. That facebook.com is synonymous with www.facebook.com is merely a convenience and shouldn't be relied upon. – TomXP411 Jan 08 '14 at 17:28
  • I see it as the other way around - I consider having a www in front of a domain name to be an anachronism, and that unless you have multiple servers with the same roles that need to be seperated, I'd expect that using the 'main' domain should get me where I logically expect to. If I run journeymangeek.com on say, 3 servers , I'd expect www.journeymangeek.com and journeymangeek.com to work for the website, and any resource all of them need to serve identically and 1.journeymangeek.com 2.journeymangeek.com and 3.journeymangeek.com for specific resources like ftp and ssh. I guess we veer into – Journeyman Geek Jan 09 '14 at 01:11
  • Best practices, philosophy and a tiny bit of religion at this point. I wouldn't consider using the www subdomain as part of a hostname *essential* (for that matter, I favour computer/role specific hostnames over FQDNs). They're nice to have. I do grumble, and adjust when a website isn't accessible over the 'main' domain name however. – Journeyman Geek Jan 09 '14 at 01:12
3

Usually, companies redirect "domain.com" to "www.domain.com", but that's not a required standard, and it's not always followed.

While you do most of your internet interaction through a web browser, there's other stuff on the Internet besides web pages. While nearly all of this is wrapped up in web pages today, there's still FTP, Telnet, Gopher, news servers, mail servers, SIP (voice over IP) and a few other fun protocols. Anyone remember Finger?

Since all of these services were different, each had a unique hostname assigned to it by convention: you could always count on finding an FTP server at ftp.netscape.net, their gopher server was gopher.netscape.net, and so on.

Of course, in the 80's and early 90's, a server computer cost more than a luxury car. So www.company.com and ftp.company.com probably pointed to the same place, since the entire company would have just a single Internet server.

Then something big happened. In the 90's: server computers got cheaper, and expensive mainframes and minicomputers gave way to commodity systems that cost less than a weekend at Disneyland. Any desktop machine could be a web server, thanks to free Linux, and people started building out their server farms with multiple PC's. Today, you can build a web server for less than $100, and store it in a soda can (hopefully an empty one.)

So the Internet exploded: Facebook today gets more hits in one day than the entirety of the Internet did in 1995. So we use more than one server to handle web requests: entire groups of computers these days will respond to a single host name, thanks to the magic of load balancing, and the Internet seems to have settled on a standard of doing all of our Internet work through a web browser.

What this means is that www.domain.com is no longer on the same computer as ftp.domain.com. So where do we send requests to the "naked" domain of "domain.com"?

Today, people think of "the web" as "the Internet", and so they use a browser for everything they do. That's convenient, since having separate programs for downloading files, reading news, checking email, reading blogs, and checking the weather can be a real pain. It also brings up questions like "why do we have www in front of web pages?" This means that we can usually get away with assuming that a request for a naked domain is the same as a request for that domain's www server.

So now, most companies will respond to naked requests by redirecting "domain.com" to "www.domain.com". However, there's no standard that requires it, and you'll frequently find that small domains hosted on server farms won't respond to naked domains that way. (For example, one hosting company I used dropped users to the hosting company's landing page when someone typed just "mydomain.com".)

Luckily for the lazy among us, there's a keyboard shortcut in most browsers that lets you shorten the process even more: just type "company", press Control-Enter, and the browser expands it to "www.company.com".

TomXP411
  • 306
  • 2
  • 6
  • That's a good point about users asking why we have `www` in front of addresses. Practically the only time an end user sees a URL is in their browser, which almost always goes to a `www`. Once you start writing web application or administering networks, you quickly "discover" all sorts of non-`www` URLs. People ask why they have `www` in their web page, but nobody asks why they have to add the `smtp` and `pop` to their URL when configuring Thunderbird. – Superbest Jan 08 '14 at 07:48
  • Back when webmail was becoming a thing (rather than using stand-alone mail clients like Outlook), I told a user to get her email by pointing her browser at "mail.mydomain.com". She kept telling me it wasn't working. After 2 days of go-arounds, she finally showed me a screen shot. She was typing "www.mail.mydomain.coim". Sometimes, you just can't win. – TomXP411 Jan 08 '14 at 17:20
3

The domain name part of URLs is read backwards. So www.example.com/index.html is actually like com/example/www/index.html in terms who is "inside" who.

Many sites have a www subdomain, but they may also have other subdomains such as ftp, secure, members, forum, us, fr, china and so on. These are all different from each other, and www.example.com is also a different address from example.com (there's no rule saying example.com should be interpreted as www.example.com and not, for instance, store.example.com).

What happens if I don't add the www?

Usually, nothing. People who run websites realize that everyone is going to forget it all the time, so they configure their site to make www.example.com and example.com point to the same place (by redirecting).

Once in a blue moon you may run into a site that won't work without the www because the person running it didn't do the configuration. So you will be able to access http://www.example.com but http://example.com will return an error.

What happens if I put in an extra www?

Same as above, except switch around which URL works and which doesn't.

Also, technically, you are supposed to include the http:// part as well, so any address you enter is incomplete anyway whether you enter the www or not. The browser will have to infer what you meant in both cases - so it may infer that the www was meant to be included.

Sites where the www matters are very rare nowadays, but I know I've encountered a few in the past 2-3 years. I can't remember what they were right now.

Superbest
  • 1,980
  • 3
  • 26
  • 39
0

There is a lot of rubbish being talked here.

The thing containing a "www." (or not) is a DNS name and hence subject to some very specific rules. Notably that you can't have two names of different record types unless one of the records is an A or an AAA record. If you want to receive emails at example.com then you must have an MX record for example.com. But browsers won't search for MX records when trying to find a website, they only look for CNAME, AAA and A records. So if a site has an MX record it cannot have a CNAME with the same name. The problem with A records is that they only point to a single host - and the layer of abstraction provided by CNAMEs is important for load balancing and disaster recovery. Cloudflare (for example) allow you to configure DNS records as if a CNAME were permitted and convert this to an A record on the fly.

symcbean
  • 271
  • 1
  • 9
0

As a sysadmin, if you want to use CDN Services for speed up your web service, you can't use any combination of dns rules together.

To use a CDN, you must use a dns Cname, so you need to create a Cname for acme.org, but if you want to receive Mail with user@acme.org, you can't have a cname for acme.org. Then you must use a subdomain www for the web server, so as sysadmin is mandatory to have a www record.

Modern browsers hidden to you the need for write the www part, but this part can be necessary for a website with a high visit rate. The rules for internet are old, but are our rules.

0

There are the issues dealing with the variety of smartphones and small-screened tablet devices (sorry, but I cannot force myself to type the iWords) that are now browsing the web.

Generally the prefixes of mobi. or m. are used (instead of www.) in order to provide web pages that are tailored to the smaller screens.

Who hasn't run into the issue of trying to navigate a large scaled web page on a small device (scroll, scroll, scroll)?

Kevin Panko
  • 7,346
  • 22
  • 44
  • 53
-1

Building on what has been mentioned already, most corporate/private servers will automatically redirect to WWW. On the other hand many, if not most, .GOV and .MIL sites will not. In those cases you usually receive one of many error messages. These sites also usually do not automatically redirect to HTTPS: from HTTP: even when needed.