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

We have a web server with many virtual hosts following this scheme:

Now some of our more naive customers often try resulting in a redirect to

Is there a configuration setting to automatically redirect all requests targeted at www.sub? to sub?

Thanks in advance!

share|improve this question
NO idea what server technology yyou talk about.... ...but it is possible. Basically it depends on the server. I know such customers, too ;) – TomTom Mar 10 '10 at 10:05
up vote 4 down vote accepted

Look for the ServerAlias directive. You can place that next to ServerName in your VirtualHost block

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.