Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am configuring an Ubuntu server on Amazon EC2. The tutorial I am following says /etc/host to be configured like this.   localhost
X.X.X.X   subdomain

Suppose my site name is Is the current configuration correct for my site.   localhost
X.X.X.X         www

I have a doubt regarding subdomain. How exactly are they identified and written?

share|improve this question
up vote 0 down vote accepted

the second line should have been

X.X.X.X www

domains are hierarchical, so you can have,, or even, etc.

share|improve this answer
sorry! i intended it to be www. Is www a subdomain ? – Terminal Apr 11 '12 at 14:29
here no, www is a host name, not a subdomain normally, but it could be, if you have etc., but normally www is a host or a cname to mean that it serves web pages. it is entirely up to you, but a logical and intuitive system would help others, such as,, etc. – johnshen64 Apr 11 '12 at 14:34

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.