Mail Exchange Record


A Mail Exchange Record (MX Record) is a type of resource record in the Domain Name System (DNS) that defines how email should be routed and delivered for a specific domain. It specifies the mail server responsible for accepting incoming messages on behalf of the domain and its priority in relation to other servers handling the same task. MX Records are crucial for ensuring email delivery is directed to the correct server within a domain’s infrastructure.

Key Takeaways

  1. Mail Exchange (MX) Record is a type of DNS (Domain Name System) record that directs email to be delivered to the specific mail server responsible for receiving and handling emails for a certain domain.
  2. MX records are essential for ensuring that emails are delivered correctly, as email servers will use them to accurately route messages to the intended recipient’s mail server.
  3. Multiple MX records can be configured for a single domain with different priority levels. When a sender’s mail server attempts to deliver an email, it will try the MX records in the order of their priority, using the lowest priority record first, and move up the list until the email is successfully delivered or all available options have been exhausted.


The Mail Exchange (MX) Record is a crucial component in any email system, essentially serving as the email routing information within the Domain Name System (DNS). This record facilitates the proper delivery of emails by defining which mail server is responsible for receiving and handling the emails sent to a specific domain.

Without accurate and reliable MX records, emails would struggle to find their correct destinations, leading to an inefficient and potentially problematic experience for both senders and receivers.

Therefore, the MX record’s significance lies in its ability to ensure seamless email communication and maintain the effectiveness of email systems across the internet.


Mail Exchange Record, commonly referred to as MX Record, is a crucial component in facilitating email communication across the vast network of the internet. Its primary purpose is to direct an email message to its intended destination, by locating the domain’s email server.

Essentially, the MX Record acts as a guidepost for email messages, providing information about which email server the domain relies upon, and ensuring the seamless delivery of messages between users and organizations. The MX Record works closely with the Simple Mail Transfer Protocol (SMTP) which handles the actual process of transferring email messages from one server to another.

When an email message is sent, the sender’s email server queries the Domain Name System (DNS) to ascertain the appropriate MX Record for the target domain. Acting on this information, the SMTP server transmits the message to the designated email server of the recipient’s domain.

By connecting the right email servers, the MX Record streamlines communication transactions, mitigating potentially devastating interruptions that could impede timely delivery of correspondence and critical information exchange.

Examples of Mail Exchange Record

Mail Exchange (MX) Records are part of the Domain Name System (DNS). They direct emails to a specified mail server responsible for accepting and delivering emails on behalf of a domain. Here are three real-world examples of MX Records:Google Workspace (formerly known as G Suite): When a company or organization uses Google Workspace for its email service, it needs to configure the MX Records of its domain to point to Google’s mail servers. Google provides specific values for priority and destination mail servers that need to be set in the domain’s DNS settings. For example: – Priority: 1, Destination: ASPMX.L.GOOGLE.COM – Priority: 5, Destination: ALT


Microsoft Office 365: Microsoft Office 365 is another popular email service for businesses and organizations. When a domain is set up with Office 365, the MX Record settings need to be configured to ensure that emails are properly directed to Microsoft’s exchange mail servers. An example of an MX Record configuration for Office 365: – Priority: 0, Destination: Email Setup: Some organizations and businesses host their own email servers or use third-party mail hosting providers, like Zoho Mail or FastMail. In such cases, the MX Record settings must be configured to point the domain’s email traffic to the specific mail server. For instance, consider an organization hosting its email on a service such as Zoho Mail. The MX Record configuration would look like: – Priority: 10, Destination: – Priority: 20, Destination: mx

zoho.comIn each of these real-world examples, the MX Records are essential for directing incoming email messages to the appropriate mail server responsible for email delivery and management.

Mail Exchange Record (MX Record) FAQ

1. What is a Mail Exchange Record (MX Record)?

A Mail Exchange Record, commonly known as an MX Record, is a type of DNS record that is responsible for routing email messages to the appropriate mail server. It directs the messages to the correct destination based on the recipient’s email address.

2. How do MX Records work?

When an email is sent, the sending server queries the DNS to find the appropriate MX Record for the recipient’s domain. The DNS returns the MX Record, which contains the hostname and priority level of the mail server responsible for receiving mail for that domain. The sending server then connects to the mail server and delivers the email.

3. How do I set up or update MX Records for my domain?

To set up or update MX Records for your domain, you’ll need to access the DNS management settings provided by your domain registrar or hosting provider. Once you’re in the DNS settings, find the MX Records section and add or update the necessary records, including the hostname, priority level, and Time To Live (TTL) values. Make sure to save the changes and allow some time for propagation.

4. What is the significance of priority levels in MX Records?

Priority levels in MX Records determine the order in which mail servers are attempted for mail delivery. Lower priority values indicate a higher preference, meaning the sending server will try to deliver the email to the mail server with the lowest priority value first. If that server is unavailable, the sending server will attempt the next lowest priority value, and so on.

5. How long does it take for MX Record changes to propagate?

It can take anywhere from a few minutes to 48 hours for MX Record changes to propagate fully, depending on the Time To Live (TTL) values set for the records and the DNS cache of various servers. It’s essential to allow enough time for the changes to take effect before testing the new configuration to avoid potential issues.

Related Technology Terms

  • Domain Name System (DNS)
  • Email Server
  • SMTP (Simple Mail Transfer Protocol)
  • MX Record Priority
  • Mail Delivery Agent

Sources for More Information


About The Authors

The DevX Technology Glossary is reviewed by technology experts and writers from our community. Terms and definitions continue to go under updates to stay relevant and up-to-date. These experts help us maintain the almost 10,000+ technology terms on DevX. Our reviewers have a strong technical background in software development, engineering, and startup businesses. They are experts with real-world experience working in the tech industry and academia.

See our full expert review panel.

These experts include:


About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

More Technology Terms

Technology Glossary

Table of Contents