10

I used to type the website URL without the "www" and it works fine with almost all sites that I have tried, so far.

But I realize that my university's website never show up if you don't type the "www" before.

Typing this

 http://u-psud.fr/

shows a dead page, but adding the "www" works well:

 http://www.u-psud.fr/

Why is it not working for one's own site, or why is it working for the other website :)

Peter Mortensen
  • 2,318
  • 5
  • 23
  • 24

8 Answers8

12

The "www" part is not really a standard. It's a tradition. It's up to the webmaster/sysadmin to make it work. Just because most sites have enabled both ways (with www and without www), doesn't mean that they have to. In fact, have you noticed that some websites have something like www1, www2, etc.? That's because the sysadmin can decide what he/she wants to put there (or if he/she wants to put anything there at all). As I said - it's just a tradition.

Peter Mortensen
  • 2,318
  • 5
  • 23
  • 24
Vilx-
  • 843
  • 4
  • 16
  • 25
9

It's because the "www." is part of the DNS name that resolves to their web server's addresses. The ones that don't have "www." don't have it as part of their DNS name.

John Saunders
  • 425
  • 7
  • 22
  • is that means "google.com" and "www.google.com" are not the same?? –  Jul 07 '09 at 10:22
  • 1
    It means there are two DNS names, and that they probably point to the same set of IP addresses. – John Saunders Jul 07 '09 at 10:22
  • 4
    It's not sufficient to set up two domain names in DNS. The webserver also has to be bound to both names –  Jul 07 '09 at 10:24
  • 2
    @activa, sorta kinda yes but not always. If you have one IP address for one website, I think most web servers will traditionally accept any old host header and point them at that site. If you have a complex set up with several sites/URLs using one IP address then yes you'd need to set up host headers. But this is just telling the web server what to accept, the issue with "www or not www" is a DNS issue. – Rob Moir Jul 07 '09 at 10:50
6

The part of the URL before the domain name (the www. in this example) is normally interpreted as the logical name of the computer on that domain's network that is required (so you might have a server which calls itself 'www', one which calls itself 'mail', etc.).

If you don't specify a specific domain resource then the default is used, and normally that's set up to be www, but some network admins won't have set this up for whatever reason and so you must enter the www explicitly to get to that resource.

Peter Mortensen
  • 2,318
  • 5
  • 23
  • 24
Mark Pim
  • 161
  • 3
4

Let's look at the specific examples:

$ nslookup u-psud.fr
Server:     192.168.0.1
Address:    192.168.0.1#53

Non-authoritative answer:
Name:   u-psud.fr
Address: 129.175.33.40

So, u-psud.fr -> 129.175.33.40

$ nslookup www.u-psud.fr
Server:     192.168.0.1
Address:    192.168.0.1#53

Non-authoritative answer:
www.u-psud.fr   canonical name = cms10-default.u-psud.fr.
Name:   cms10-default.u-psud.fr
Address: 129.175.125.111

And, www.u-psud.fr -> 129.175.125.111

So, in short, you are connecting to two different web servers.

The history of this is more convoluted. A long time ago, as the Internet grew in popularity, many of the services you know were only growing in popularity. Most of the users were local, so systems often appeared as what they were named locally. (I saw a list circa 1990 that showed the most popular hostnames were things like: calvin, hobbes, mac1, mac2, etc.)

When the Internet usage became more globalized, smart administrators started naming their SMTP hosts "mail", their POP servers "pop" and their FTP servers "ftp". (You would be amazed how hard it was to convince people this made sense...)

For a long time, DNS-smart-but-lazy administrators tried to serve everything off a server for the top level entry (domain.com). These days, few administrators are this foolhardy, you need to spread out the load across several systems. From a naming perspective, using the name-of-service-in-the-domainname makes a lot of sense for end users, it is hard to get wrong.

Peter Mortensen
  • 2,318
  • 5
  • 23
  • 24
benc
  • 683
  • 1
  • 5
  • 13
2

This is the responsibility of whoever sets up the web server. In order for both domain names to work, there should be DNS entries for both names (usually one is an alias for the other), AND the website should be linked to both names.

0

A lot of sites set their name and suffix in the DNS, e.g. google.com and may be set to allow all non-specified sub-sites to go there.

My website (it's rubbish) is setup as cksiteoftreats.co.uk, but you can put anything in front of it and it will work:

useless.cksiteoftreats.co.uk

whatishethingking.cksiteoftreats.co.uk

serverfault.com.cksiteoftreats.co.uk
Peter Mortensen
  • 2,318
  • 5
  • 23
  • 24
ck.
  • 162
  • 8
0

There is even a movement against the usage of www which technically should be a subdomain.

They say that, by default, all popular Web browsers assume the HTTP protocol. In doing so, the software prepends the 'http://' onto the requested URL and automatically connect to the HTTP server on port 80. Why then do many servers require their websites to communicate through the www subdomain? Mail servers do not require you to send emails to recipient@mail.domain.com. Likewise, web servers should allow access to their pages though the main domain unless a particular subdomain is required.

Succinctly, use of the www subdomain is redundant and time consuming to communicate. The internet, media, and society are all better off without it.

It used to be located here.

Elzo Valugi
  • 387
  • 2
  • 4
  • 15
-2

Oh! my dear why all these trumped up answers. It is a laymans question whomsoever he/she is. The answer also should be a laymans answer to the query.Suppose you have your own web server configured in your system. It becomes a web server. It needs a domain name for others to access your web server.Suppose your DNS(Domain Name Server) provider is microsoft who have registered their domain name for its DNS as microsoft.com . Now that you have to register with microsoft.com DNS with the name of your choice for your web server.You give the name www.myweb for registration . Now your domain bame has become www.myweb.microsft.com. If you had give the name myweb only , your domain name shall become myweb.microsoft.com. What if you wish to give the name www only. If there are no other www registered by the microsoft DNS , they may permit the name for your use. Then your web server will have the URL www.microsoft.com. So all in all , it is all in the name.Because of the embeded beauty of the name www, many use it . Your university has included www for registration of its domain name with their Internet Service provider. That is why you are unable to get the site otherwise. I hope I am a layman.

  • Welcome to Server Fault. Remember that this is a site for IT professionals, as such it's expected that most people here will have some basic understanding of various IT concepts. – Michael Hampton Feb 28 '13 at 07:07