Skip to content

How to set up MX records for your domain's email

Security1 min readFixes check email-mx-present

MX records tell other servers where to deliver mail for your domain. Your email provider lists the exact records to add.

Step by step, with screenshots: DNS lookup: how to run one and read every record →

Check your own domain

Our DMARC checker (email & DNS) tool runs this check and writes the record to add, free, in seconds.

Check your domain

What it is

An MX (mail exchanger) record is a DNS record that tells other mail servers where to deliver email for your domain. Each MX record names a mail server hostname and a priority number, for example 10 mx1.mailprovider.com.

Without an MX record, mail sent to you@yourdomain either bounces or is tried against the website's own address, which rarely accepts mail. Receiving servers and spam filters also trust domains that can receive replies more than send-only ones. getReport looks up your domain's MX records and fails the check when there are none. Your domain is OK when its MX records match exactly what your email provider tells you to publish.

What a passing site looks like

  • Mail servers (MX): passesfail · −15 ptseffort S

No MX record, so the domain cannot receive email

Why it matters. Without an MX record, mail sent to your address bounces or is guessed from the website's address. Mailbox providers also trust domains that receive mail more than send-only ones.

How to fix it.
  1. Add the MX records your email provider lists (Google Workspace, Microsoft 365, Zoho and your host all publish them) in your DNS zone.
  2. If the domain never receives email, publish a null MX ("0 .") so senders fail fast instead of retrying.

Questions people ask

How do I look up a domain's MX records?

Run a getReport check, which shows the MX records it finds for your domain. From a terminal, nslookup -type=mx example.com on Windows or dig mx example.com on macOS and Linux lists them with their priorities. Your DNS host's control panel shows the records you have set, which should match what the lookup returns.

What are the MX records for Google Workspace?

New Google Workspace setups use a single MX record: smtp.google.com with priority 1. Domains set up earlier often have the older set of five, aspmx.l.google.com and its alt1 to alt4 backups, which still work. Remove any MX records left from a previous email provider, or some of your mail will keep going there.

What does MX record priority mean?

The priority, or preference, is a number that decides which mail server senders try first: the lowest number wins. If that server does not answer, they try the next one, and records with the same number share the load. The values matter only relative to each other, so 1, 5 and 10 work the same as 10, 20 and 30.

Filed under Security. Copy is generated from the same catalogue that scores every report, so what you read here is what the report says.