0

I need to move a client's website off their old host and onto their new host without changing their email server. I've read this extremely thorough answer on a similar question (https://serverfault.com/a/370295/112673) and I think I've wrapped my head around what to do, but I wanted to confirm I understand it correctly.

=================

EDIT - I have since realized my original strategy was dumb. This is now revised.

=================

These are the settings on the zone file for the current host:

localhost.website.com   Address Record (A)  127.0.0.1   
website.com Address Record (A)  1.2.3.4 (current web server IP)
website.com Mail Exchange Record (MX)   preference=10, host=website.com.
ftp.website.com Canonical Name (CNAME)  website.com.
imap.website.com    Canonical Name (CNAME)  website.com.
news.website.com    Canonical Name (CNAME)  website.com.
pop.website.com Canonical Name (CNAME)  website.com.
smtp.website.com    Canonical Name (CNAME)  website.com.
www.website.com Canonical Name (CNAME)  website.com.

I am planning to change these settings to

localhost.website.com   Address Record (A)  127.0.0.1   
website.com Address Record (A) 5.6.7.8 (new server IP)
website.com Mail Exchange Record (MX)   mail.website.com.
www.website.com Canonical Name (CNAME)  website.com.
ftp.website.com Canonical Name (CNAME)  website.com.
news.website.com    Canonical Name (CNAME)  website.com.
mail.website.com    Address Record (A)  1.2.4.5 (old server IP)
imap.website.com    Canonical Name (CNAME)  mail.website.com.
pop.website.com Canonical Name (CNAME)  mail.website.com.
smtp.website.com    Canonical Name (CNAME)  mail.website.com.

If I understand correctly, this will point the actual website website.com to the new server IP, but ALL email related things to mail.website.com which is still pointing to the old server IP.

Additionally, is there any way for me to test this setup before going live? The answer I referred to earlier mentions you can do this yourself with my hosts file locally but I'm not sure exactly how to go about setting that up.

6
  • When you say that you're going to set up the DNS records on the new host, what do you mean? Are you moving the DNS to a new DNS host? If so, why? If you mean that you're setting up the DNS records to reflect the new web host then you should clarify your question. Moving a website doesn't require the DNS to be moved. Other than that, your plan should be fine. Make sure to configure the new MX record well in advance of the change (use the TTL of the current MX record as a guide as to how long before the planned change you should make the change to the MX record).
    – joeqwerty
    Feb 25, 2015 at 18:56
  • Sorry, I think I got some of my terminology wrong. I'm setting up the zone file on the new host so when the name servers are pointed from the old host to the new host, my new settings (website on new host, email on old host) will take effect. Does that make sense? Feb 25, 2015 at 19:10
  • Why are you moving the name servers? If you're moving the website then you should change the website related DNS records on the current name servers. You shouldn't be moving the name servers at all.
    – joeqwerty
    Feb 25, 2015 at 19:14
  • Are the name servers hosted with the current web hoster or are the name servers hosted at the Registrar (or somewhere else)?
    – joeqwerty
    Feb 25, 2015 at 19:33
  • 1
    Right. One of the most common things I (we) see is name servers being hosted with the web hoster. There's no technical requirement to do so and this often leads to confusion and avoidable outages when something goes wrong with DNS. If the name servers are currently with the domain Registrar then my suggestion is to leave them alone. If the name servers are currently with the current web hoster then my suggestion would be to move them to the Registrar. I don't recommend moving the name servers with/to the web hoster.
    – joeqwerty
    Feb 25, 2015 at 20:38

1 Answer 1

1

I need to move a client's website off their old host and onto their new host without changing their email server.

You're in luck because the two things are so unrelated, asking how to move a website without affecting email is like asking "I'm moving to a new house down the street. How do I make sure I don't have to change my car's license plates?"

If I understand correctly, this will point the actual website website.com to the new server IP, but ALL email related things to mail.website.com which is still pointing to the old server IP. When I change the website.com nameservers to point at the new host, website.com should display the website on the new host but the email should remain unchanged.

So on top of changing the zone files, you've changed name servers as well? Regardless of that (which is adding a layer of complexity, but not unmanageable), the zone files as you've stated will do what you want.

Additionally, is there any way for me to test this setup before going live? The answer I referred to earlier mentions you can do this yourself with my hosts file locally but I'm not sure exactly how to go about setting that up.

Hosts files can only do IP -> hostname mappings, so you can't technically test out the CNAMEs. What you need to do is set up a small, temporary DNS server and point a host or two at that DNS server to test an identical copy of your zone file. Perhaps a simple dnsmasq server.

6
  • Thanks, I realized that there's no need to change the zone files. I was overcomplicating things. I've updated my original question to reflect that. Feb 25, 2015 at 20:34
  • @RyanGiglio Wait, no need to change the zone files? So you're not going to move the website away from the same system that the mail server is on? I has confuse.
    – Wesley
    Feb 25, 2015 at 20:39
  • Wow that was totally not what I wanted to say. Sorry, I'm a bit flustered. There's no need to change the name servers, only to update the zone file on the current host to point the website's A Record to the new server. Feb 25, 2015 at 20:57
  • @RyanGiglio Ah, okay. I no has confuse now. :D
    – Wesley
    Feb 25, 2015 at 20:58
  • So does what you said earlier still apply - the new zone file I've stated will do what I want? Website on new server, email on original server? Feb 25, 2015 at 20:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .