Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I built a small rails app that allow users to make a simple site. It uses subdomain accounts ex: deb.myapp.com

Whenever an user wanted to have a domain name associated with their site, they would change their NS records to point to slicehost where the application is hosted and I would manage the DNS records myself.

However, as more people are using the application this is not an option for me anymore.

I prefer users to keep their nameservers at goddady, register.com, etc, so they can log in and manage their own MX records or whatever else they need to change.

My question is, should I have them change the A records to point to my server's ip, or should I have them create a CNAME record? Do they need to delete the default A records to allow the CNAME record to work? Will the A record take precedence and overrule the CNAME record?

Thanks in advance. Sorry if this is a very basic question. I've read other posts and I can't find a definite answer.

share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

A CNAME Record must be the only record for a DNS Record. Most common gotcha is that you can not create a CNAME for mysite.com since you also have a NS Record and most likely a MX record for that name.

As long as you have singular occurrences of names I would recommend using CNAME since it makes you more flexible. When you migrate to another server you would just have to take care of changing the name that all CNAMEs point to.

share|improve this answer
    
Right now I do the forwarding from domain.com to www.domain.com in the nginx vhost configuration not on the domain registrar (godady in this case) –  deb Apr 26 '10 at 16:12
    
forwarding can only be done on the webserver. When you start adding A Records for your "naked" domain you already lost the advantage of the CNAME since you manually would have to change all your registered domains when you move your server to a new IP. –  lepole Apr 26 '10 at 17:03
add comment

Your Answer

 
discard

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.