Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the point of www in web urls? [closed]

Tags:

url

web

I've been trying to collect analytics for my website and realized that Google analytics was not setup to capture data for visitors to www.example.com (it was only setup for example.com). I noticed that many sites will redirect me to www.example.com when I type only example.com. However, stackoverflow does exactly the opposite (redirects www.stackoverflow.com to just stackoverflow.com).

So, I've decided that in order to get accurate analytics, I should have my web server redirect all users to either www.example.com, or example.com. Is there a reason to do one or the other? Is it purely personal preference? What's the deal with www? I never type it in when I type domains in my browser.

like image 989
davekaro Avatar asked Jan 05 '09 15:01

davekaro


People also ask

What is the point of www in a URL?

It's actually not necessary to use WWW in URLs. It exists for just one purpose—to identify the web address. This is not the case with other important URL signifiers, such as a File Transfer Protocol (FTP) server (ftp) or news server (news). As such, WWW may be classified as a subdomain of a larger website.

Why do we not use www in URL?

It's unnecessary. There is no need to include "www" in your website's address. It was a URL prefix added in the early days of the web and caught on by accident.

Can you leave the www out of URL?

Do I Really Need “WWW” in My URL? Putting “WWW” in your URL—is it necessary? In short, no. But to maximize your website's search performance and ease of access for users, you'll want to set things up so it works with or without those three letters using a specific method.

Why is www used in domain?

What exactly is the “www?” Technically, it's a subdomain traditionally used to indicate that a site is part of the web, as opposed to some other part of the Internet like Gopher or FTP.


2 Answers

History lesson.

There was a time when the Web did not dominate the Internet. An organisation with a domain (e.g. my university, aston.ac.uk) would typically have several hostnames set up for various services: gopher.aston.ac.uk (Gopher is a precursor to the World-wide Web), news.aston.ac.uk (for NNTP Usenet), ftp.aston.ac.uk (FTP - including anonymous FTP archives). They were just the obvious names for accessing those services.

When HTTP came along, the convention became to give the web server the hostname "www". The convention was so widespread, that some people came to believe that the "www" part actually told the client what protocol to use.

That convention remains popular today, and it does make some amount of sense. However it's not technically required.

I think Slashdot was one of the first web sites to decide to use a www-less URL. Their head man Rob Malda refers to "TCWWW" - "The Cursed WWW" - when press articles include "www" in his URL. I guess that for a site like Slashdot which is primarily a web site to a strong degree, "www" in the URL is redundant.

You may choose whichever you like as the canonical address. But do be consistent. Redirecting from other forms to the canonical form is good practice.

like image 162
slim Avatar answered Oct 14 '22 11:10

slim


Also, skipping the “www.” saves you four bytes on each request. :)

like image 37
Bombe Avatar answered Oct 14 '22 11:10

Bombe