0

I have situation where my domain's A record is pointed to certain IP address, which I need to change, but MX record have destination - to my domain name!

How to change A record and to avoid mail failure for the duration of propagation time?

3
  • Is mail still working on the "old" IP? Other than forwarding traffic there's not much you can do ...but why do you need to change it?
    – Nathan C
    Jul 25, 2013 at 14:53
  • I have to change where mydomain.com goes, but to retain where mails for mydomain.com are arriving Jul 25, 2013 at 14:54
  • 2
    Is the mail server also changing its IP address? Jul 25, 2013 at 14:57

3 Answers 3

6

If your mail server is staying where it is then I would do the following:

  1. Create a new A record for mail.domainname.com (or whatever you like really), pointing at the existing IP and change the MX record to use this at the same time.
  2. Wait a good day or so to make sure any cached copies of the old MX record disappear. (Technically, you only need to wait for the amount of time specified in the MX TTL).
  3. Change the A record for domainname.com.
2

Create a new A record with the new name and create a new MX record pointing to the old name (ideally with priority equal to the existing MX record). After some time has passed, remove the old A record and the old MX record.

1
  • I will suggest to decrease ttl for A/MX records, for example, to 3600 (1 hour), actually you can try even 1800. Wait until record has updated and then change ip address. There will be some "downtime", but you should not to lose any mails
    – ALex_hha
    Jul 25, 2013 at 15:04
0
  1. Dual home your mail server, with the old IP address and the new IP address
  2. Have two mail servers, one with old, one with new
  3. Set a really low TTL on your zone file 48 hours before the change, say a TTL of 5 minutes, then after 48 hours are up, change the MX record, wait 24 hours and set the TTL back to normal.

You must log in to answer this question.

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