Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

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

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

share|improve this question

1 Answer 1

up vote 0 down vote accepted

the second line should have been

X.X.X.X www.abc.com www

domains are hierarchical, so you can have sub1.abc.com, www.sub1.abc.com, or even www.sub2.sub1.abc.com, 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 www2.www.abc.com 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 www.hr.abc.com, www.marketing.abc.com, 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.