Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I am confused about the difference between http://www.example.com and http://example.com, is that true "www" is actually the subdomain of domain example.com? Do people usually redirect from http://example.com to http://www.example.com or it is the reverse? Please enlighten me!

share|improve this question

migrated from stackoverflow.com Apr 30 '12 at 1:21

This question came from our site for professional and enthusiast programmers.

    
    

3 Answers 3

up vote 3 down vote accepted

It's true that www is typically a CNAME or PTR record -- it could also be a subdomain, in case there are CNAMEs or PTRs for en.www.example.com or ru.www.example.com.

I most often see example.com redirected to www.example.com, but I prefer the other direction, and publicize my own sites without the www.

share|improve this answer

The "www." helps identify a web server, but not all web servers use those letters - as an example, Yahoo has news.yahoo.com, maps.yahoo.com, store.yahoo.com, shopping.yahoo.com, and www.yahoo.com, and probably others - each one is completely different.

source

share|improve this answer

www is the host name. Connecting to a domain without a host name is called "the default host". When the world wide web was first set up, www was used as a host name to indicate that the host was part of the world wide web. At some point it became clear that most http requests to public sites simply want to get to the home web page of the organization that hosts the site, so the concept of host is mostly irrelevant, and the concept of a www host is redundant.

This is a matter of personal preference. If you use the default host people don't have to type as much, which is a clear benefit.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.