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 set up a vanilla Ubuntu Server installation,

Other computers on the network can access its webserver with http://servername/

But when I try to access sub domains (e.g. http://something.servername/) it doesn't work.

Any ideas?


share|improve this question
up vote 1 down vote accepted

servername is not a domain, it's a hostname (computername) so you can't have a subdomain of it. Your domain name would look something like

If you have a domain like and servername is a part of it (that is, has a dns host record in the domain), then the first URL you have would be

If you want to have a subdomain then it needs to first be created in dns. Let's call it At that point you then need a host record in the subdomain to have a valid URL. Something like

share|improve this answer
I don't think so. I just put something.servername into all 'hosts' files; a bit of a hack but it works. Thanks for the info. – aidan Oct 2 '09 at 16:03
Ok. Understand, though, that your machine will interpret servername as the domain name and something as a host name. You have not created a subdomain. This could mess with your apache config. – squillman Oct 2 '09 at 16:09

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.