MX Record: Definition, Usage & Protections

A mail exchanger record, or MX record, directs email to an open and available mail server.

For companies that accept hundreds or even thousands of email messages per day, MX records ensure that the traffic is balanced properly. That leads to fewer dropped notes and unhappy consumers.

What is an MX Record?

The instructions you tap into your email system must be decoded before the note can pass to a recipient. That decoding happens through the MX record system. 

Let's start with an example. 

People send so many emails every day that large companies, including Google, must limit how many messages a single person can send. 

Imagine working at the company that takes in all of those notes. How can you ensure that one lone server doesn't buckle under the pressure while others remain open? 

An MX record can:

  • Translate. Your email address (such as [email protected]) isn't readable through the Domain Name System (DNS). Your email system must translate that address into a numeric version browsers can understand. 
  • Specify. A domain may have dozens of open email servers. The record tells your system which to use first. Some companies specify backup MX records that the system could use but aren't preferred destinations under normal traffic conditions.  
  • Time. The recipient can specify the time to live (TTL) value for the message. In essence, it identifies how many routers your note can pass through before the system discards the packet and the note fails. 

The MX lookup process isn't new. The origins of the process appear in RFC821, published in 1982. In 1986, RFC973 and RFC974 further refined how programmers should use this process for routing mail.

How is an MX lookup performed? 

A person sitting at a computer, tapping out email, doesn't need to look up MX records. The communication happens automatically, as soon as you hit "send" on your note. 

As soon as the note leaves you, message transfer agent (MTA) software takes over. The MTA sends a DNS query to identify which email server should get the note. When it chooses the right server, the MTA establishes a connection. Your email goes through. 

Use this lookup tool to see an example of what an MTA might see during this process. 

If your email server can't make a connection, it might attempt the next available MX server, as specified in the lookup. This capability varies dramatically from server to server. Some don't offer this service at all.

How can MX lookups protect you?

As we mentioned, the MX record protocol can help ensure that email servers are equally balanced, so one doesn't do all the work while another is idle. But this protocol comes with another benefit too. 

You can combine MX lookups with spam filters. In essence, you swap out the inbound email server for a spam filter provider. The system checks notes and scans them for viruses and other malicious content. Valid items pass through, but the system holds back, returns, or deletes suspect items. 

Did you know machine learning can help spam filters like this work even better? We have a blog post dedicated to this subject that's worth a read.


Limits for Sending and Getting Mail. Gmail. 

Simple Mail Transfer Protocol. (August 1982). Information Sciences Institute, University of Southern California.

Domain System Changes and Observations. (January 1986). Network Working Group. 

Mail Routing and the Domain System. (January 1986). Network Working Group.