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 am trying to figure out how to allow my users to use a CNAME for their unique wildcard domain. (, etc

I read here:

That using a wildcard DNS for CNAME's may not be the best, so I would need another way to identify the user, thats fine. I can do that with some database work.

However, I can't seem to get the CNAME to work with OR

It just doesn't do anything... just loads up a blank screen.


What do I have to do to allow for CNAMES to work on my server? (I am using MediaTemple, but I can switch if there is an easier host for this)

I read something about .conf files with VitrualHost but that doesn't make any sense to me...


I got it working! I upgraded to dedicated server with a unique IP, and that seem to work.

The wildcard DNS does not work, but I can I just use the HTTP host to find the user. :)

share|improve this question

There are 2 main ways to go. For the sake of making an example, let's say your company name is :

a) Per account subdomains under your domain: All your users get a Fully Qualified Domain Name under your domain, i.e. <userid> , <nextuser> I would do this with a catch-all A-Record:

@               IN A  
www             IN CNAME
*               IN A   # This one

b) "Vanity domains" going to a dedicated gateway: Say you want to offer your en users the option to set up a FQDN in their own domain, like In that case, I would dedicate a gateway server to handle this, and let the users create CNAME's to this gateway. Something like:

@               IN A  
www             IN CNAME
gateway         IN A   # This one

.. and your end users must create a CNAME pointing to in this example.

Notes: In both cases above I'm using A-Records, but you can also use CNAME's if that's more convenient. And your server must look at the incoming HTTP headers and act appropriately, i.e. your programming of your webapp needs to handle the user accounts right on a per-request basis.

share|improve this answer
Hey Jesper, the settings you explained... where do I add this? Sorry, I am a complete n00b with server stuff. :) Is there a file I am editing for this? – DylanJones_md Apr 2 '11 at 13:43
@DylanJones_md: I tried to explain the DNS side of the solution (DNS: The system that translates from your domain name to the IP address your server has, i.e. the global addressbook that leads user requests to your server). My examples are in BIND syntax, which you're probably not using directly -- you're probably using GoDaddy, Mediatemple or someone else to host your domain DNS for you. If you're so new to all this, perhaps you should consider hiring a consultant to accelerate the setup of this. :-) – Jesper Mortensen Apr 2 '11 at 15:07

In IIS in Windows you would use host headers. In Linux I believe it's called a Virtual Host, as you stated. Here's a link that explains it:

share|improve this answer
Thanks, helped me understand virtual hosts :) – DylanJones_md Apr 2 '11 at 14:27

As others have stated it's a two step process, involving your content DNS server and your content HTTP server.

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.