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

Good morning -

I'm a product manager type building an application for the first time. I've taught myself the ruby and rails pieces, but I'm a little gunshy about the sysadmin stuff. I apologize in advance if this is a trivial question.

My is registered at Dreamhost. My email goes through Dreamhost, and the currently redirects to, which is hosted at Dreamhost.

I've been building out the application at Slicehost (it has a couple of application servers, in addition to the web server). I've been hitting the site directly at the IP address as I've been building it.

So now, I want to tell Dreamhost that should point to the Slicehost machines, but I still want to have Dreamhost managing the email traffic.

I looked at CNAME, but this looks like it would redirect the mail, too. I'm a little lost, and I have the creeping terrors that bad things will happen if I mess this up.

Thanks for any direction you can provide,


share|improve this question
up vote 12 down vote accepted

The answer to your question will depend on the URLs you want your users to use.

If you want users to access your application via or you can either use an A record to point app or www to the IP address of the application server, or add a CNAME record to point to the real name of the app server.     A
; Either          CNAME
; OR          A

If you want to point to your application things are trickier. The correct answer it to point the A record for to the IP of your application server. A CNAME might seem tempting; however when you use a CNAME to specify the canonical name for a host you are not allowed to have any other resource records for that host. Your zone will need to have at least SOA and NS records as well as MX records to function properly so a CNAME will not work.    SOA ( 
                     2009061501 86400 7200 3600000 3600 )
@              NS
@              NS
@              MX 5
@              MX 10
; This is invalid:
@              CNAME
; This is valid:
@              A

For information on common DNS mistakes, including CNAME limitations, see RFC1912.

share|improve this answer
+1 for citing the RFC! – Josh Brower Jun 15 '09 at 13:43
Thanks. Very helpful! – Jason Butler Jun 15 '09 at 18:12

MX records are used to direct where your email is delivered. Changing your A records or CNAMEs will not change where email is delivered. BUT you probably should confirm how Dreamhost has your DNS setup before changing anything.

share|improve this answer
This is only partly correct. As others have mentioned, having a CNAME record will prevent you from using any other record type, including an MX, so if you need mail going to one place and web traffic going to another, all for the same domain/subdomain, then you can't use a CNAME. – Mark Jun 15 '09 at 14:20
Yes, you are correct my answer was only partial but then again you need to ask who is asking the question. Jason said he was a product manager type person and so really all he PROBABLY needs to do is change his A record for to point to his new IP address (And he also needs to see where his MX records are pointing to make sure that they are not referencing the entry). So while I agree that my answer was way too short an answer (and he probably needs more information) the top-rated answer right now is too technical and probably does not help him out. – Jeff Widmer Jun 15 '09 at 15:25
Thanks for the response. Yours, in conjunction with the other one, definitely pointed me in the right direction. Once I had direction on which way to go, Dreamhost's interface was clear enough to be able to make it happen. – Jason Butler Jun 15 '09 at 18:11

Do you have access to zone files on dreamhost?

If yes:

  • Change the TTL to a small number some time before moving the domain, nameservers that respect TTL will update your information faster. After some time past the update, change it back to a regular value.

Regarding email:

Make sure your MX entry is pointing to your old mail server (dreamhost), change only A/CNAME entries.

share|improve this answer

The server that handles the mail for is referenced by the MX record in the root of the zone file for

The server that handles web traffic for is referenced by the A record in the root of the zone file for, as well as other address like www.

As you can see, those are separate records, and can be adjusted independently.

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.