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

How do I allow my customers to access from a Google Apps allows you to do this with a CNAME change. How can I offer a similar functionality?

I found a duplicate question with no answers. I upvoted that question but since that was an old question I am asking this again.

share|improve this question
up vote 1 down vote accepted

For the virtual hosts solution to work, you will still require a CNAME entry. Your DNS manager should allow you to enter a wildcard entry (where @ is

* => @

Otherwise, will will need to to enter your subdomain list manually: => @ => @

Hopefully, your DNS is preconfigured with a wildcard, although probably not. If you cannot resolve your subdomain after setting up your virtual hosts, then you will know why.

If you post which server you're using (IIS, Apache, etc) more specific instructions could be given on setting up virtual hosts.

share|improve this answer
  • If you're using Apache, you can use the ServerAlias directive in your VirtualHost declaration

  • If you're using Lighttpd, you can use ModSimpleVhost and then create symlinks to your main folder, or use something like this :

    $HTTP["host"] =~ "^(|$" { .. virtualhost configuration here ... }

share|improve this answer

1.You have some app, where customer each customer has custom subdomain -
2. You have dedicated server and / or root access. Just make your app default (catchall) virtual host and implement custom domain handling in app. Other way is adjust www server config each time client adds custom subdomain. Just make client point CNAME to your server DNS (like

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.