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

If I'm using a sub-domain for my clients access to a web application (e.g., and I want client's to optionally use their own domain (e.g., do you think it is advisable to have them point their www CNAME to and forward all to so is always accessed via the www version? I may need to offer SSL on their sub-domain as well as on their main domain.

Are there issues I should be concerned about with this simplified approach?

Also, will I be able to tell which sub-domain they're main domain is pointed to from my web server (NGINX), or will I have to create a table for domain-to-subdomain relationships?

share|improve this question
up vote 1 down vote accepted

from a URL perspective the domain CNAME could work. However, depending on your webserver you should be able to create for example a virtual host in apache that listens for either the domain or subdomain address and so all that would be needed is a proper A record in their DNS.

As for the mapping. I don't know how CNAME works with browsers my guess is that the browser queries the web server using the real address not the CNAME so you would only see requests for the subdomain not for the domain and so wouldn't be able to tell if someone typed the subdomain or was forwarded by dns.

also regarding SSL I believe you can't share the same IP for 2 two certs so your webserver will show your domain and the browser will probably bitch.

share|improve this answer
thanks. I was worried about the SSL thing, but it's not a huge deal. SSL certs for clients might not happen any ways. Secure stuff currently takes place another domain that maps to the application. And, the A Record stuff is great. I didn't even think about just using my own web server to forward requests. I suppose I won't even need to forward requests if I'm listening for their domain. I just map that back, pull it from the DB the same as I would after stripping the www. from the host. Thanks again. – orokusaki Oct 3 '10 at 23:21

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.