What Is an MX Record? Priority, Google Workspace and Microsoft 365 Values

MX recordWhat Is an MX Record? Priority, Google Workspace and Microsoft 365 Values

What is an MX record? An MX (mail exchanger) record is a DNS record that tells other mail servers where to deliver email for your domain. Each MX record pairs a mail server's host name with a priority number, and senders try the lowest number first.

If you're setting up email for a new domain, switching providers, or wondering why mail isn't arriving, the MX records are the first thing to look at.

In short:

  • What it is: a public DNS record that names the mail servers that accept email for a domain.
  • Priority: the lowest number is tried first; higher numbers are backups.
  • Provider values: Google Workspace uses one record, smtp.google.com at priority 1. Microsoft 365 uses a value specific to your domain, ending in mail.protection.outlook.com.
  • How to check: use a free MX lookup, or run dig or nslookup.

How an MX record works

When someone sends a message to name@example.com, their mail server looks up the MX records for the part after the @, here example.com. That DNS lookup returns a list of mail servers with their priority numbers.

The sending server then connects to the server with the lowest number. If it can't deliver there, it moves on to the next one. When two servers have the same number, the sender picks between them, which spreads the load. This order is set out in RFC 5321, section 5.1. Servers deliver to each other on port 25; our guide to SMTP ports explains which port does what.

What happens if a domain has no MX record? Under the same RFC, the sender falls back to the domain's own address record (A or AAAA) and treats that host as the mail server. If there's no address record either, the mail can't be delivered.

A DNS MX record only covers incoming mail. It says where mail for your domain should go, not which servers may send as your domain. That's SPF's job (see below).

What an MX record looks like

An MX record has a type (MX), a name (the domain, often written @ for the domain itself), a priority and a mail server host name. Here is an MX record example for a placeholder domain with two mail servers:

Priority Mail server
10 mail1.example.com
20 mail2.example.com

In zone-file format, the style dig uses for its answers, the same two records look like this:

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

Reading left to right: the domain, the TTL in seconds, the class (IN), the type, the priority and the mail server. example.com and these host names are placeholders; use the values your email provider gives you.

MX priority

MX priority (also called preference) decides the order in which senders try your mail servers:

  • Lowest number first. A server at 10 is tried before a server at 20.
  • Higher numbers are backups. Senders move to them when the preferred server is unavailable.
  • Equal numbers share the load. Senders pick among servers with the same number.
  • Only the order matters. 10 and 20 work the same as 1 and 2; the numbers have no meaning on their own.

Diagram of an email trying its first mail server and falling back to a backup server when the first is unavailable

An example setup, not a provider's values:

Priority Mail server Role
10 mail1.example.com Tried first
20 mail2.example.com Backup

If your provider gives you a single MX record, that's all you need. Use the priority it tells you to.

Google Workspace MX records

If your domain's email runs on Google Workspace, Google now asks for a single MX record. As of November 2026, from Google's MX record setup page:

Field Value
Type MX
Name / Host @ or blank (your domain itself)
Value / Mail server smtp.google.com
Priority 1
TTL Your registrar's default

Some registrars want a period at the end of the value: smtp.google.com.. Check your registrar's help if you're not sure.

Google also says:

  • Delete any other MX records on the domain, or email may not work.
  • Allow up to 72 hours for Google to recognize the new record.
  • Older setups are fine. Accounts set up before 2023 may use the older aspmx values. Google still supports them, and if your email works, you don't need to change anything.

What about the Gmail MX record? If you use a regular @gmail.com address, there's nothing to set up: the MX records for gmail.com belong to Google. The values above are for your own domain on Google Workspace. To see what any domain, including gmail.com, currently publishes, use the MX lookup.

Microsoft 365 MX records

For Microsoft 365 (formerly Office 365, including Outlook on your own domain), the MX record value is specific to your domain. It follows this pattern, from Microsoft's external DNS records reference, as of November 2026:

Field Value
Type MX
Name / Host @ (your domain itself)
Value / Mail server <domain-key>.mail.protection.outlook.com
Priority 1 (Microsoft: lower than any other MX record)
TTL 3600 (one hour)

<domain-key> is a placeholder. Don't guess it; Microsoft gives you the exact value:

  1. Sign in to the Microsoft 365 admin center and go to Domains.
  2. Select your domain and open Fix issues.
  3. In the MX records section, select What do I fix? to see the value to publish.

Microsoft's Cloudflare walkthrough uses priority 1 too. Use the priority your admin center shows.

Before you change anything, know what the change does:

  • It moves all mail. Once the MX record points to Microsoft 365, all mail for the domain goes there.
  • Remove the old provider's MX records once mail is flowing to Microsoft 365. Microsoft notes that multiple MX records can cause delivery problems, and that one MX record pointing to one mail system avoids many of them.

Google Workspace vs Microsoft 365

Google Workspace Microsoft 365
Value smtp.google.com <domain-key>.mail.protection.outlook.com
Priority 1 1 (lower than any other MX record)
Where to get it The same for every domain Microsoft 365 admin center, under Domains
Other MX records Delete them Remove them once mail flows

Values as of November 2026; check the linked vendor pages before you rely on them.

How to check a domain's MX records

How do I check my MX record? Three ways, all free:

Our MX lookup. Open the free MX lookup, type a domain or an email address and click Look up MX records. You see the domain's mail servers in priority order, their IP addresses and the email provider. No account needed.

dig (Mac or Linux). In a terminal, run:

dig example.com mx

nslookup (Windows). In Command Prompt or PowerShell, run:

nslookup -q=mx example.com

Replace example.com with the domain you want to check. Both commands list each mail server with its priority number. In dig, look at the ANSWER SECTION; each line has the zone-file format shown earlier in this post. After a provider switch, you should see only the new provider's servers.

Common mistakes and troubleshooting

The MX record points to a CNAME. The mail server in an MX record must not be an alias (RFC 2181, section 10.3). Point it at the host name your provider gives you, not at a CNAME you created.

The MX record points to an IP address. The value has to be a domain name, such as smtp.google.com (RFC 1035, section 3.3.9). If your mail server only has an IP address, give it a host name with an A or AAAA record and use that name in the MX record.

The old provider's MX records are still there. Google and Microsoft both tell you to delete other MX records. Microsoft's reference adds that more than one MX record can cause delivery problems, and that pointing the domain at one mail system avoids many of them.

Mail doesn't arrive right after a change. DNS changes take time to spread. Microsoft says it typically takes about 15 minutes, occasionally longer; Google allows up to 72 hours. Check the records with a lookup before you change anything else. If senders get bounces, our guide to SMTP bounce codes explains what the messages mean.

A domain that accepts no email at all can publish a null MX (RFC 7505): a single record with priority 0 and a dot as the mail server. The MX lookup page explains what you see when a domain has one.

MX records and email authentication

MX records handle inbound mail. SPF, DKIM and DMARC are separate TXT records that cover the sending side: they let receivers check that mail claiming to come from your domain really does. Changing your MX records doesn't change them, and the other way round.

The two meet in one place: an SPF record can use the mx mechanism to allow your domain's mail servers to send, as our post on Sender Policy Framework (SPF) describes.

To learn how the three authentication records fit together, read SPF, DKIM and DMARC: how the three work together. If you just moved to Microsoft 365, set up the Office 365 SPF record next. You can check all three with our SPF, DKIM and DMARC checker.

Next step: check your MX records

Look up a domain's MX records with the free MX lookup. No sign-up needed.

An MX check shows that a domain can receive mail, not that a particular mailbox exists. To check a single address, use the free email verifier.

Join 1,000+ CompaniesImproving Email Deliverability

Start with 200 free validations. Upgrade only when you're ready.

No credit card required • Cancel anytime