Sep
14

MX Record Explained: What Is an MX Record and How Does Email DNS Work

Learn what an MX record is, how MX records route email for a domain, how priority works, and how to check and troubleshoot MX records.

MX Record Explained: What Is an MX Record and How Does Email DNS Work?

If you have ever connected a custom domain to an email service, you may have been asked to add an MX record to your DNS settings.

MX stands for Mail Exchange. An MX record tells mail servers where email for your domain should be delivered.

In simple terms, an MX record helps answer this question:

“Which mail server should receive email sent to this domain?”

In this guide, we will explain what an MX record is, how it works, what MX priority means, how to check MX records, and how to troubleshoot common email DNS problems.

What Is an MX Record?

An MX record is a DNS record that specifies the mail server responsible for receiving email for a domain.

For example, a domain could have an MX record like this:

example.com    MX    10    mail.example.com

This tells other mail servers that mail.example.com is a mail server responsible for receiving email for example.com.

The MX record does not contain an email address. It contains a mail server hostname.

How Does an MX Record Work?

Suppose someone sends an email to:

hello@example.com

The sending mail server needs to find out where the message should go.

It can query DNS for the MX records of example.com.

The process looks like this:

Sender
   ↓
hello@example.com
   ↓
DNS lookup for example.com
   ↓
MX record
   ↓
Mail server hostname
   ↓
Recipient's mail server

The MX record therefore acts as an important part of email routing.

MX Record Example

A basic MX record may look like this:

Type:      MX
Name:      @
Priority:  10
Target:    mail.example.com
TTL:       3600

Here is what each part means:

  • Type: MX identifies the record as a Mail Exchange record.
  • Name: The hostname or domain for which the mail server applies.
  • Priority: The preference value used when multiple mail servers exist.
  • Target: The hostname of the mail server.
  • TTL: How long DNS resolvers may cache the record.

Read More

If you are learning how DNS records work, these guides are useful next:

What Is MX Record Priority?

MX records can have a priority value.

The priority tells a sending mail server which mail server it should prefer when multiple MX records are published.

For MX records, the lower number has higher priority.

For example:

example.com    MX    10    mail1.example.com
example.com    MX    20    mail2.example.com

The mail server with priority 10 is preferred over the server with priority 20.

If the preferred server cannot accept the message, the sending server may try another available MX server according to the published records and its own mail-delivery behavior.

Why Do Domains Have Multiple MX Records?

A domain can have multiple MX records for redundancy.

For example:

example.com    MX    10    primary-mail.example.com
example.com    MX    20    backup-mail.example.com

The primary mail server is preferred. A secondary server can provide another delivery option if the primary server is unavailable.

Some email providers publish multiple MX records as part of their own mail infrastructure. In that situation, you should use the exact records provided by your email service.

MX Record vs A Record

MX and A records are both DNS records, but they have different jobs.

FeatureMX RecordA RecordPurpose | Routes email | Maps a hostname to IPv4
Target | Hostname of a mail server | IPv4 address
Example | mail.example.com | 192.0.2.10
Priority | Yes | No

An MX record should point to a hostname rather than directly to an IP address.

Can an MX Record Point to an IP Address?

No. An MX record should point to a hostname.

For example, this is the normal structure:

example.com    MX    10    mail.example.com

The hostname can then resolve to an IP address through an A or AAAA record.

For example:

example.com    MX      10    mail.example.com
mail.example.com    A       192.0.2.10
mail.example.com    AAAA    2001:db8::10

This separates email routing from the actual network address of the mail server.

MX Records and Email Providers

When you use a third-party email service with your domain, the provider usually gives you one or more MX records.

You add those records to the DNS zone for your domain.

The provider's instructions may include:

  • MX record hostname
  • Priority value
  • TTL recommendation
  • Additional DNS records for email authentication

Always use the current DNS values supplied by your email provider. Do not copy MX records from another domain because different providers use different mail systems.

MX Records and Email Authentication

MX records are important for email delivery, but they are not the same as email authentication records.

Modern email setups may also use records such as:

  • SPF for defining authorized sending servers
  • DKIM for signing outgoing messages
  • DMARC for defining how receiving servers should handle authentication results

These records have different purposes.

An MX record primarily tells receiving mail systems where to deliver email. SPF, DKIM, and DMARC help with email authentication and anti-spoofing.

How to Check MX Records

You can check the MX records currently published for a domain with a DNS lookup tool.

Use the AuraTools DNS Lookup tool and look for records with the type MX.

A result may look similar to:

MX    10    mail.example.com
MX    20    backup.example.com

Compare the results with the DNS instructions provided by your email service.

Common MX Record Problems

1. Missing MX Record

If your domain does not have the required MX records, other mail servers may not know where to deliver messages for your domain.

2. Incorrect MX Target

If the MX target points to the wrong mail server, incoming email may be delivered to the wrong destination or fail.

3. Incorrect Priority

When multiple MX records are used, incorrect priority values can change which server is preferred.

4. Old MX Records

This can happen when moving from one email provider to another. Old MX records may remain in DNS and interfere with the intended mail configuration.

5. MX Target Does Not Resolve

The hostname used by an MX record needs to resolve correctly. If the target hostname is not configured properly, mail delivery can fail.

6. DNS Changes Have Not Propagated

DNS information can be cached. After changing an MX record, different DNS resolvers may show the old result until their cached information expires.

How to Troubleshoot MX Records

If your domain is not receiving email correctly, start by checking the published DNS records.

  1. Check whether the domain has MX records.
  2. Compare the records with your email provider's current instructions.
  3. Check the MX priority values.
  4. Verify that the MX target hostnames resolve correctly.
  5. Check whether old MX records are still published.
  6. Allow time for DNS caches to update after making changes.
  7. Check your mail provider's server and account configuration.

Start with a DNS lookup on AuraTools to see what MX records are publicly visible for your domain.

MX Record and the Root Domain

MX records are commonly configured for the root domain.

For example:

example.com    MX    10    mail.example.com

This means mail addressed to users at @example.com can be routed according to the domain's MX records.

The exact DNS interface can display the root domain as @, the full domain name, or another equivalent format.

Do Subdomains Have MX Records?

They can.

MX records can be published for a specific domain name or subdomain when a separate mail-routing configuration is needed.

For most normal business email setups, however, the MX records are associated with the main domain.

How Long Do MX Record Changes Take?

There is no single fixed time that applies to every DNS change.

The TTL of the record and existing DNS caches affect how quickly a new MX record becomes visible to different resolvers.

If you have just changed your MX records, avoid repeatedly changing them while waiting for the DNS results to update. First check what is currently published and compare it with the intended configuration.

Frequently Asked Questions

What is an MX record?

An MX record is a DNS record that tells mail servers where email for a domain should be delivered.

What does MX stand for?

MX stands for Mail Exchange.

What does MX priority mean?

MX priority determines which mail server is preferred when a domain has multiple MX records. A lower number represents a higher preference.

Can an MX record point to an IP address?

No. An MX record should point to a hostname. That hostname can then resolve to an IP address.

Can a domain have multiple MX records?

Yes. Multiple MX records can be used for mail infrastructure, preference, or redundancy depending on the email provider's configuration.

How can I check an MX record?

You can use a DNS lookup tool and query the domain for MX records.

Is an MX record required for sending email?

An MX record primarily defines where incoming email for a domain should be delivered. Sending email involves additional mail-server and authentication configuration.

Final Takeaway

An MX record is one of the most important DNS records for a domain that uses email.

It tells other mail servers which hostname should receive email for your domain. When multiple MX records exist, their priority values help determine which mail server is preferred.

If you are setting up business email or troubleshooting missing messages, checking your MX records is a useful first step.

Check your domain's MX records with AuraTools DNS Lookup and compare the result with the configuration provided by your email service.


Contact

Missing something?

Feel free to request missing tools or give some feedback using our contact form.

Contact Us