Sep
28

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

Learn what an MX record is, how mail exchange records work, what MX priority means, and how to check and troubleshoot email DNS settings for your domain.

An MX record is a DNS record that tells other mail servers where to deliver email for a domain. MX stands for Mail Exchange.

If you use an email address such as hello@example.com, the sending mail server needs to discover which mail servers accept email for example.com. It uses DNS MX records to find that information.

In this guide, you will learn what an MX record is, how MX priority works, how to check email DNS settings, and how to troubleshoot common MX record problems.

What Is an MX Record?

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

A simple example looks like this:

example.com    MX    10    mail.example.com

This record tells sending mail servers to use mail.example.com as a destination for email sent to addresses at example.com.

The number 10 is the MX preference value. It helps determine which mail server should be tried first when multiple MX records exist.

How Does an MX Record Work?

When someone sends an email to a domain, the sending mail system needs to locate the recipient domain's mail servers.

The simplified process is:

Sender writes an email
        ↓
Sending mail server
        ↓
DNS MX lookup
        ↓
Find destination mail server
        ↓
Connect to destination
        ↓
Deliver email

For example, when an email is sent to hello@example.com, the sending server looks up the MX records for example.com. It then attempts delivery using the mail server information returned by DNS.

MX Record Example

A domain may publish an MX record like this:

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

In many DNS dashboards, @ represents the root domain. The exact way a provider displays the record name may differ.

The target is a hostname, not an IP address. The mail server hostname must resolve to an address so that the sending system can connect to it.

What Is MX Priority?

MX priority, also called preference, determines the order in which mail servers are considered.

A lower number means a higher preference.

For example:

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

In this example, a sending mail server normally tries mail1.example.com first. If it cannot deliver mail there, it may try the server with priority 20.

Priority does not measure server quality or speed. It is an ordering value used for mail delivery decisions.

Read More

Explore these related DNS guides:

Can a Domain Have Multiple MX Records?

Yes. A domain can publish multiple MX records. This is commonly used to provide alternative mail servers or support a provider's recommended mail delivery setup.

For example:

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

The sending mail server uses the preference values to decide which destination to try first. The exact delivery behavior can depend on the sending system and the available servers.

MX Record vs A Record

MX and A records have different purposes.

FeatureMX RecordA RecordPurpose | Identifies mail delivery hosts | Maps a hostname to an IPv4 address
Target | Mail server hostname | IPv4 address
Example | mail.example.com | 192.0.2.25

An MX record points to a mail server hostname. That hostname can then have an A record or AAAA record that provides its IP address.

MX Record vs CNAME Record

An MX record identifies a mail destination. A CNAME record creates an alias from one hostname to another.

For example:

MX:
example.com    MX       10    mail.example.net

CNAME:
www.example.com    CNAME    example.com

MX records should point to hostnames that resolve to mail server addresses. They should not point to a hostname that is itself an alias through a CNAME, because that configuration is not recommended for mail exchange targets.

How to Set Up an MX Record

The exact steps depend on your DNS provider and email service. In general, you will need the MX values supplied by your email provider.

  1. Sign in to the DNS provider that manages your domain.
  2. Open the DNS records or DNS zone settings.
  3. Add a new record and choose MX.
  4. Enter the host or name, often @ for the root domain.
  5. Enter the priority supplied by your email provider.
  6. Enter the mail server hostname supplied by your provider.
  7. Save the record and allow for DNS caching.

Do not copy example MX values from a tutorial into a real domain unless they match the instructions from your email provider.

Where Do You Find Your Email Provider's MX Values?

Your email provider should publish the exact MX records required for your domain.

These values can differ between hosted email services, business email platforms, and self-managed mail servers.

Use your provider's official setup instructions. Check whether it requires one MX record or several records with different priorities.

How to Check MX Records

You can check a domain's published MX records using a DNS lookup tool.

Use AuraTools DNS Lookup to inspect DNS information for your domain. Select or query MX if the tool provides record-type selection.

You can also use a command-line tool:

dig example.com MX

On systems with nslookup, you can try:

nslookup -type=MX example.com

The results should show the mail server hostnames and their preference values.

What Does It Mean If a Domain Has No MX Record?

If a domain has no MX record, mail delivery may still be attempted using the domain's address records under the applicable SMTP fallback rules.

However, relying on fallback behavior is not a substitute for configuring the mail records recommended by your email provider.

If you expect a domain to receive email, check its provider's setup instructions and confirm that the required MX records are published.

Common MX Record Problems

1. Incorrect MX Target

If the target hostname is wrong, sending mail servers may not be able to find the intended mail server.

2. Incorrect Priority

If multiple MX records are configured, incorrect preference values can cause mail servers to try destinations in an unintended order.

3. Missing MX Records

If your email provider requires MX records and they are missing, incoming email may not reach the intended service.

4. MX Target Does Not Resolve

The hostname used by an MX record must resolve to an IP address. Check that the target has the required address records.

5. MX Record Points to a CNAME

Mail exchange targets should not be configured as aliases through CNAME records. Use the actual mail server hostname specified by your provider.

6. DNS Changes Have Not Appeared Everywhere

DNS caching can cause different resolvers to show different results for a period of time after an update. Check the authoritative DNS data and allow caches to expire.

MX Records and Email Authentication

MX records help route incoming email, but they do not prove that outgoing email is genuine or authorized.

Other DNS records are commonly used for email authentication:

  • SPF: A TXT-based policy that identifies systems authorized to send email for a domain.
  • DKIM: Public-key information published in DNS so receiving systems can verify message signatures.
  • DMARC: A policy and reporting mechanism that builds on SPF and DKIM alignment.

Correct MX records alone do not guarantee email delivery or prevent messages from being marked as spam. Email configuration often requires several records and provider-side settings.

How to Troubleshoot Email DNS

If you cannot receive email at your domain, check the following:

  1. Confirm which DNS provider is authoritative for your domain.
  2. Check that the expected MX records are published.
  3. Compare the targets and priorities with your email provider's instructions.
  4. Confirm that each MX target hostname resolves correctly.
  5. Check for old or conflicting MX records.
  6. Review your email provider's domain verification and account settings.
  7. Allow time for DNS caches to update after changes.

Check DNS records with AuraTools as an initial step when investigating a domain's email configuration.

Frequently Asked Questions

What does MX stand for?

MX stands for Mail Exchange.

What is an MX record used for?

An MX record tells sending mail servers which hostnames accept email for a domain.

What is MX priority?

MX priority is a preference value used to order mail servers. A lower number has a higher preference.

Can I have more than one MX record?

Yes. Multiple MX records can provide alternative destinations or support a provider's mail configuration.

Does an MX record contain an IP address?

No. An MX record points to a hostname. That hostname must resolve to an IP address through other DNS records.

Can an MX record point to a CNAME?

MX targets should be hostnames that resolve directly through address records, not aliases through CNAME records.

How do I find my domain's MX records?

Use a DNS lookup tool or a command such as dig example.com MX to query the domain's MX records.

Final Takeaway

An MX record tells the email system where to deliver incoming messages for a domain. Its target identifies a mail server hostname, while its priority helps determine the order in which destinations are tried.

If you are setting up business email or troubleshooting missing messages, compare your published MX records with the exact values provided by your email service.

Use AuraTools DNS Lookup to start checking the DNS configuration for your domain.

Contact

Missing something?

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

Contact Us