Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 have run into something I find odd. I am using Apache/2.0.54

If I try to access a non existent sub domain on my server it will resolve to the primary domain. For example going to

will resolve to .

If I enter a valid subdomain e.g.

it will resolve to the proper sub domain.

I am thinking this is due to a server confg of some kind but I'm not sure what. Googling didn't really help me but that may be because I don't know what to call this exactly.

Could anyone suggest why this is happening? Thanks much!

share|improve this question
up vote 3 down vote accepted

On a NameVirtualHost enabled address/port combination, the first matching <VirtualHost> to load is considered the default; requests that match no other hosts are sent to it. See your current configuration with apache2ctl -S.

If you want to avoid this behavior, make the first to load a dummy vhost which serves no content.

share|improve this answer

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.