Which DNS configuration is better for a MX record type?

1.- Having a single MX reord type mx.domain.com resolving to a two A record type:

MX  10  mail.domain.com.    ->  A
                            ->  A


2.- Having two MX record type mx1.domain.com. and mx2.domain.com. resolving to A record type.

MX  10  mx1.domain.com.    ->  A
MX  20  mx2.domain.com.    ->  A

What would be the real reason for choosing either option 1 or option 2, currently I have option 1 deployed but I think it is better answer option 2 but I do not know the reason why.

  • This may belong on ServerFault. – uSlackr Jan 11 '17 at 20:06

I assume #1 means that the DNS is a round robin between the two hosts. Given that I'm not sure there is a difference. But, DNS provided MX weighting (#2) for a reason and I'd be more likely to use #2 over #2. However, unless you have a reason to prefer one hos over the other, I would recommend a third option

MX  10  mx1.domain.com.    ->  A
MX  10  mx2.domain.com.    ->  A

This would route mail through both hosts. In my experience a failover host is of little value unless it is being used regularly. Otherwise, the configs drift apart and when the backup host is actually needed, it doesn't work.

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.