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.
Mail exchange record examples
Imagine you’re sending an email to firstname.lastname@example.org. Your email server would look up the MX records for example.com. Those records might look something like this:
- example.com. 3600 IN MX 10 mail1.example.com.
- example.com. 3600 IN MX 20 mail2.example.com.
This tells your email server that it can deliver the email to either mail1.example.com or mail2.example.com, but it should try to deliver it to mail1.example.com 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.