When Is “www” Needed and Why?

Some sites need it, most sites ignore it.

www.
(Image: canva.com)
The "www" in website addresses is now typically optional and even redundant, but there was once a reason as to why it was required in URLs.
The Best of Ask Leo!
Question: Why do some website addresses have “www” and some don’t? And why do some work with or without the “www”?

Most of the time, the “www.” is optional and redundant. I see people taking the time to type (or say) “www.” even though it’s a completely unnecessary waste of space and syllables.

Occasionally, “www.” might be required, but to be honest, it’s usually an oversight. I haven’t run across a case where “www.” was legitimately required in years.

But once upon a time, there was a reason.

TL;DR:

'www' or not?

The “www” in URLs is an acronym for World Wide Web, and in the past indicated the specific server(s) used to handle webpage requests. Today, it’s largely redundant and need not be specified in most URLs. Different websites may behave slightly differently with and without “www” being specified, but they’ll generally work properly either way.

It’s about purpose and/or protocols

Originally, the idea was that “www.” specified what you were trying to do so you could be sent to the right server.

Servers hosting websites on the World Wide Web had names beginning with a “www.” prefix. That’s all it really meant. You might also see servers available for File Transfer Protocol access use an “ftp.” prefix, servers that handle mail might start with “mail.”, and so on.

While “www.” and “mail.” indicated a purpose, you might also see servers identified by the specific internet protocol to be used, like the “ftp” protocol. Other common names include “http.” (rarely used these days), “pop3.”, “imap.”, and “smtp.” for common mail protocols, and so on.

This was important because these were often entirely different computers. So www.example.com, ftp.example.com, pop3.example.com, and smtp.example.com could be hosted on completely different machines, possibly even in completely different locations. The prefix was both a mnemonic device to help us remember what we were doing as well as a way to route us to the right server.

Purposeless assumptions

The question is what to do when no prefix is specified.

Most people don’t realize this, but the way domain names work, www.askleo.com and askleo.com (without the “www.”) are technically two different names, two different sites, and could be on two completely separate servers in two completely different locations.

Over time, websites, the web, and all those “www” servers became the predominant traffic on the internet, so more and more sites began to respond to references both with and without the “www.” It’s become common practice to treat them the same way.

But it takes proper configuration on the server’s part to treat them the same way. For example, with askleo.com, I needed to take extra steps to make them both behave the same way regardless of which you use.

How it works currently

It’s possible, but extremely rare (I’ve not seen this outside of examples) for with and without “www.” to be completely different sites.

  • www.example.com would be one site
  • example.com would be a second website with completely different content from site one

This would be confusing. I hope no one is actually doing this.

More commonly, we have these variations:

  1. Without “www.” the standard, meaning that www.example.com automatically switches to example.com. This is what I do with www.askleo.com: when you type in that URL, you end up on askleo.com without the “www.”.
  2. With “www.” the standard. If you were to visit example.com, it would automatically switch you to www.example.com. There are some exceptionally geeky reasons why this might be preferable, but most sites don’t employ those reasons,1 making this a waste.
  3. Use whatever was specified on entry. This means that if you visit www.example.com, all the links and URLs on the site will be www.example.com. If you visit without “www.”, as in example.com, then all the links and URLs will be example.com. This is surprisingly difficult to do with any consistency. (It also means that every page on the site has two different URLs: one with and one without the “www.”.)
  4. Be completely inconsistent. With or without the “www.” gets you to the right place, but links you find on the site’s pages use one or the other without any real consistency. Many sites seem to follow this model.

It’s worth pointing out that this is different for every site. There is no standard, so it’s up to each website owner to decide (or not decide) how the issue should be handled.

In practice, “www.” is redundant

Here in the real world, regardless of the decisions made by website owners, “www.” is redundant, and there’s just no point in using it, ever.

You don’t need to tell someone to go to “www.askleo.com” when “askleo.com” will work as well and is shorter when typed or spoken.

In fact, I’ll go so far as to say “http://” and “https://” are also redundant when specifying a website. Given all these possibilities:

  • https://www.askleo.com
  • http://www.askleo.com
  • www.askleo.com
  • https://askleo.com
  • https://askleo.com
  • askleo.com

There’s simply no reason to use anything other than the last one.

And that’s true for the vast majority of websites.

Keep that in mind the next time you design your business card. Smile

Do this

Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.

I'll see you there!

Podcast audio

Play

Footnotes & References

1: The ability to specify the “www.” subdomain as cookie-free can sometimes have a minor performance benefit. This isn’t something you can do with a top-level domain without the “www.”.

10 comments on “When Is “www” Needed and Why?”

  1. i ws recently sent a web address to go to that was just a list of numbers: eg: 123.45.33.01 – but the page didn’t open…what is this kind of address?

    Reply
  2. That’s an IP address. All computers on the internet are REALLY identified by IP addresses. The text names you and I use, like “askleo.com” get converted to IP addresses in order to really locate the computer. Most of the time you don’t need to know or care about this.

    Try it: http://207.46.250.119 will take you to the same place http://www.microsoft.com does.

    Reply
  3. You wrote:

    The original intent was that the “www” specified what you were trying to do, so you could be sent to the right computer to do that. Servers that were available for “World Wide Web” access used a “www” prefix. Servers that were available for “File Transfer Protocol” access used a “ftp” prefix. Even on the same base domain, http://www.example.com and http://ftp.example.com might well be completely different machines. The prefix was both a mnemonic device to help us remember what we’re doing as well as a way to route us to the right server.

    One thing you gloss over is the reason that the “www.” has become so redundant — namely, that its function has been almost entirely replaced by the protocol declarator. the “http://” at the start of the URL now does what the “www.” once used to do; and of course, when “ftp://” begins a URL, the URL itself surely doesn’t need to insist on the pattern of “ftp.whatever.com”!!! The “[protocol]://” prefix has pretty much obviated the need for that sort of idiocy. Yet it’s still rampant!

    Hooray for force of habit, huh? :( :( :(

    Reply
    • Completely wrong. The URL “scheme” (http, https, ftp, mailto, …) and the www subdomain both appeared at the same time – at the birth of the World-Wide Web. HTTP quickly became far more common than FTP or any other protocol, so web browsers now assume that when you type example.com you mean http://example.com/ (and the same for http://www.example.com). The www subdomain never meant anything special to browsers, it was just a convention, probably dating from the days when web servers were an experimental side-line rather than a company’s main point of presence on the Internet. Unfortunately the www convention spread around the world before companies realised that their web server was the server most deserving of the short example.com name. It was then blindly propagated by a million marketing departments who knew no better or thought it was trendy.

      Reply
  4. As Leo says, *sometimes* the www. is redundant, sometimes it isn’t. It is the responsibility of the webmaster to straighten that out as Leo has, others have not. Probably it doesn’t make a whole lot of difference – except in one very important case: *secure* sites. A secure certificate for, say http://www.example.com will not work for example.com; they are different sites and the certificate ‘knows’ for which one it’s been issued for. More reasons to keep the webmaster happy.
    As to IP addresses to Hostnames, I like to use http://whatismyipaddress.com for those things. (no www ) Yes, that site tells *your* IP, but you can use the IP-Tools tab to look up any IP address (to see if it’s a host) or any Host name to see what IP address has been assigned to that host. That, plus a pretty good email tracer, make whatismyipaddress a keeper.

    Reply

Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.