2

When I was doing some web design, I found one interesting thing.

When I type

http://example.com/xxx/xxx

it always asks me for credentials. However, when I use

http://www.example.com/xxx/xxx

it logs me in directly! I know there is something with the cookie.

But what I really want to know is:

What is the difference between http://example.com and http://www.example.com?

Do tell me it is the browser automatically adding "www" to the url.

Thanks, : )

Community
  • 1
  • 1
sommcewce
  • 73
  • 5
  • 10

1 Answers1

2

www is a subdomain like any other (e.g. http://math.stackexchange.com/). It's just a convention to have it point to the same place as the main domain. This answer has some good points about why you would use www.

Community
  • 1
  • 1
Simon MᶜKenzie
  • 8,344
  • 13
  • 50
  • 77