0

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

127.0.0.1       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.

127.0.0.1       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?

1 Answer 1

0

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.

2
  • sorry! i intended it to be www. Is www a subdomain ?
    – Terminal
    Apr 11, 2012 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, 2012 at 14:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .