-4

A client want to change their A Record to an other Server respectively IP address. Thats not a problem, but he want to keep their mail service on the old server. So, what entry I need for the MX record, I cannot set there the old IP address, right?

  • 1
    Simple..create an A record for MX record value pointing to old server..for eg create an A record as 'mail.myadomain.com-> old server IP' then add mail.myadomain.com as MX record for that domain. – Sachin Singh Aug 19 '16 at 12:35
  • Lorenzo, please post your zone. – Ryan Babchishin Aug 19 '16 at 13:46
0

This is often the question when you have to move website or email to new server. Sven said everything, i'd just like to expand with example. So you have old server on 1.1.1.1 and new server on 2.2.2.2. Original zone looked like this:

example.com. in A 1.1.1.1
example.com. in MX example.com.

In this example, both A and MX record are pointing to 1.1.1.1

If you want to change A or MX record and point them elsewhere, you should set dns zone like this:

Website on new server

example.com. in A 2.2.2.2
example.com. in MX mail.example.com.
mail in A 1.1.1.1

Mail service on new server

example.com. in A 1.1.1.1
example.com. in MX mail.example.com.
mail in A 2.2.2.2

  • why would you have different A records for mail.example.com on the two servers? They need to be the same and usually they are as the DNS is running somewhere else entirely. – Sven Aug 19 '16 at 13:35
  • I've made two examples for two different cases. In first case, you are pointing A record elsewhere and keeping mx on current server, while in second case, you're pointing mx somewhere else. I realize that I've moved away from answer, but I guess I've tried to explain both cases. – RonanW. Aug 19 '16 at 13:50
2

The MX record must point to an A or AAAA record, so no, you can't put in the IP address or a CNAME. But you can just declare an A record, e.g. mail.example.com, pointing to this IP address and then point the MX record to mail.example.com.

-1

Same domain, just making changes to an A record right? Simple.

You can keep everything for mail set to the old IP. If you show me the zone, I can be more specific. But if you're just changing A records for a website or something, just leave the mail server entries alone so that the MX records are still pointing to something with the old IP address(es).

i.e. Leave mail settings alone

  • You can't make this statement without knowing the records in question. A (stupid but common) scenario is where everything including MX is using www.example.com or even pointing to the apex. In that case, you cannot leave mail settings alone when moving other records away. – Sven Aug 19 '16 at 13:26
  • @Sven Yes I can. I just did. That's a messed way to setup DNS. Anyways, I said I can be more specific if he showed me the zone. He'd figure out pretty fast he can't follow my instructions if he did something odd like that too. – Ryan Babchishin Aug 19 '16 at 13:41
  • 1
    Yes, the original question needs more details, and it shouldn't be answered before further details are given. More details can be asked in comments. – Tero Kilkanen Aug 19 '16 at 13:59
  • 1
    @RyanBabchishin: +1. I agree. There's a bit of an assumption on your part (and mine) that the OP is merely moving the website to a new web host and if that is the case then the answer to the question "What should I do with the MX record?" is Nothing. Do nothing with it. Too many times I see web developers monkey around with NS records and MX records because they're moving a website and think that they have to make changes to the NS and MX records in the process. – joeqwerty Aug 19 '16 at 14:01
  • 1
    @RyanBabchishin: As you well know I can register my domain with one entity, host my DNS zone with a different entity, host my email with yet another and host my website somewhere else entirely... or any combination thereof. That's what I think confuses many people. They think that the DNS zone has to be hosted by the same entity that hosts the website, and the same for the MX records. If the OP is simply moving the website then he only needs to change the relevant DNS records for the website and leave everything else alone. – joeqwerty Aug 19 '16 at 14:01

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.