Super User is a question and answer site for computer enthusiasts and power users. 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 have Linode VPS where I host multiple domains.

Let's say I have

Now I've added a wild card subdomain on like


So that whatever I type as a subdomain (e.g.,, I'm hoping it will go to "".

But instead of going to "", it's taking me to "".

Is there anything I've missed?

share|improve this question
What type of record have you added? Was it A or CNAME? What does dig * return? – gronostaj Feb 24 '14 at 12:11
up vote 2 down vote accepted

If you're using name-based virtual hosts in Apache, the first virtual host to be defined (in the order config files are processed) is the "catch-all" host.

Unless you have virtual hosts for and explicitly defined, requests to these hosts will be processed by the "catch-all" host.

share|improve this answer
thanks Daniel, is there a way to get around this without explicitly specifying every sub-domain? (I guess I could put first..., but maybe there is a more elegant way? – ericbae Feb 24 '14 at 12:32
Elegant, well... It's possible to accomplish this with a dedicated catch-all host (so as not to disturb the regular content) and mod_rewrite: Matching Canonical Hostnames. Be warned though, this contains regex trickery. – Daniel B Feb 24 '14 at 12:45
You could use some PHP code in the index file of to perform a permanent redirection when the HTTP header matches Host: – pkSML Feb 24 '14 at 12:46

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.