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?

Terminal
  • 103
  • 4

1 Answers1

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.

johnshen64
  • 5,865
  • 24
  • 17
  • 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