Email DNS explained

What is an MX record?

An MX (mail exchanger) record tells every other mail server where to deliver email sent to your domain. Without the right MX records, mail to you@yourdomain.com bounces or goes to the wrong place.

How MX records work

When someone emails you, their mail server looks up the MX records of your domain and hands the message to the server listed there. That server belongs to your email provider, such as Google Workspace, Microsoft 365 or Zoho Mail.

Source: RFC 5321: SMTP, section 5.1 (IETF)

What the priority number means

Each MX record has a priority (also called preference). Senders try the lowest number first and use higher numbers as backups. That is why a leftover record from an old provider with a lower number can quietly take your mail.

Source: RFC 5321: SMTP, section 5.1 (IETF)

A domain that doesn’t receive email

A domain can publish a “null MX” record (priority 0 and a single dot) to say it accepts no email at all. Every message sent to it is refused, so remove it before you set up a mailbox.

Source: RFC 7505: A "Null MX" No Service Resource Record (IETF)

Common MX mistakes

What goes wrong most often:

  • MX records from a previous provider left in place, next to the new ones.
  • Mixing MX records from two different email providers.
  • A typo in the mail server name, so mail goes nowhere.

Source: RFC 5321: SMTP, section 5.1 (IETF), Connect your domain by adding DNS records (Microsoft Learn), Configure Email Delivery (Zoho Mail Help)

MX records: questions

What happens if a domain has no MX record?

Senders then try to deliver to the domain’s own address (its A record), which usually isn’t a mail server, so messages bounce or get lost. A domain that takes no email at all can say so with a null MX record.

Can a domain have more than one MX record?

Yes. Many providers use several MX records with different priorities, so mail can still be delivered if one server is unavailable. They should all belong to the same email provider.

What happens if my MX records are wrong?

Email sent to you can bounce or go to a server you no longer use, so you can miss messages. Run a check to see where your MX records point now.

Ready to set it up?

Pick your email provider and DNS host to get the exact records and steps.