DNS Guides

What Is an MX Record and How Does It Work?

MX records explained: what they are, how priority works, example values, and how to check and fix yours.

By Maililo Team · Published · Updated · 2 min read

What Is an MX Record and How Does It Work?

An MX record (mail exchange record) is a DNS record that tells other mail servers where to deliver email for your domain. Without one, nobody can send mail to your custom address.

How MX records work

When someone sends a message to you@yourcompany.com:

  1. Their mail server asks DNS: "What are the MX records for yourcompany.com?"
  2. DNS answers with one or more hostnames, each with a priority number.
  3. The sending server connects to the host with the lowest priority number and delivers the message.
  4. If that server is unreachable, it tries the next one.

What an MX record looks like

TypeNameValuePriority
MX@mail.maililo.com10
  • Name @ means the root domain (yourcompany.com).
  • Value is a hostname — never an IP address, and never a CNAME alias.
  • Priority is a number; lower means preferred.

What does MX priority mean?

If you have several MX records, the priority decides the order. For example:

10 mx1.example.com
20 mx2.example.com

Senders try mx1 first and only use mx2 if mx1 is down. Records with the same priority share the load randomly.

How to add or change an MX record

  1. Open your domain's DNS settings at your registrar.
  2. Delete MX records from any previous email provider.
  3. Add the new MX record with the host and priority your provider gives you.
  4. Save and wait. Most changes are visible within minutes; the old record's TTL decides how long some servers may keep using the previous value.

How to check your MX record

  • Use an online DNS lookup tool and search for "MX" on your domain.
  • On a computer terminal: nslookup -type=mx yourcompany.com (Windows) or dig mx yourcompany.com (Mac/Linux).
  • Maililo checks your MX record automatically when you click Verify DNS, including the priority.

Common MX problems

  • Old records left behind: some mail gets delivered to your old provider.
  • Pointing at a hostname that doesn't exist: the sender can't find the server, and mail bounces or is delayed.
  • Pointing at an IP address: not allowed by the standard; use a hostname.
  • MX set on the wrong name: it should usually be @, not mail or www.

MX vs other email records

The MX record only handles incoming mail. Outgoing mail trust is handled by SPF, DKIM and DMARC — see SPF vs DKIM vs DMARC.

FAQ

Do I need an MX record if I only send mail? Yes, in practice. Receivers check that you can receive replies and bounces, and SPF's mx mechanism relies on it.

How long does an MX change take? Usually minutes, sometimes a few hours depending on TTL.

Next: How to set up email for a custom domain.


Setting up MX for a new domain? Connect your custom email domain to Maililo and we'll show the exact record to add.

Related articles

How to Improve Email Deliverability

Email Deliverability

How to Improve Email Deliverability

A practical checklist to help your business emails reach the inbox instead of the spam folder.

Maililo Team · · 2 min read