Skip to main content

Home Mail exchange record

Mail exchange record

Mail exchange record definition

Mail exchange record refers to a type of resource record in the domain name system (DNS). It is also known as mail exchanger record or MX record. As the DNS is like an internet phonebook, mapping domain names to IP addresses, mail exchange records tell servers where to send emails for a particular domain.

Each MX record includes a domain name, an indication that it's an MX record, a preference value, and the hostname of the mail server responsible for accepting email on behalf of the domain. The preference value is used when a domain has more than one MX record; the record with the lowest preference value is attempted first.

See also: dns cache, dns filtering, dns record

Mail exchange record examples

Imagine you're sending an email to Your email server would look up the MX records for Those records might look something like this:

  • 3600 IN MX 10
  • 3600 IN MX 20

This tells your email server that it can deliver the email to either or, but it should try to deliver it to first because it has a higher preference value.

These records would typically be managed by whoever administers the domain, usually through a control panel provided by the domain registrar or DNS provider. It's important to have correct and up-to-date MX records to ensure that emails are delivered properly.