New guide: how to warm up a dedicated IP without hurting your reputation. Read now →
Log in
MigoSMTP
Domains and DNSUpdated 18 Oct 2026

MX Record: What It Is, How Priority Works and How to Check It

What an MX record is, how priority works, the rules that cause errors, how to look up MX records, null MX, why MX does not affect sending, how to change records safely and a troubleshooting table.

KW
Written by Kenji Watanabe
HTML Email Developer
Reviewed by Hannah Mitchell
  • Published10 Feb 2026
  • Read time7 min
  • Length1,478 words
Share this guide

An MX record tells the internet where to deliver email for a domain. It is one of the most searched DNS topics because everyone who sets up a business mailbox, moves hosting, or troubleshoots missing email eventually has to look at one. People search for what an MX record is, how to look one up, what the priority number means, how to add or change one and why mail stops arriving after a DNS change. This guide covers all of that in plain language and then answers the question that matters to anyone who sends email through a service like ours: does the MX record affect sending? Short answer: no. MX records control incoming mail. Outgoing mail depends on SPF, DKIM and DMARC, which are different records. Keeping the two ideas apart prevents the most common mistake we see, which is changing MX records while trying to fix a sending problem and breaking the inbox in the process. For the wider set of records, see DNS records for email explained.

MX = inboundsays which servers accept mail addressed to your domain
Lower is firstthe smaller priority number is tried before larger ones
Hostname, not IPthe target must be a hostname that has its own address record

What an MX record is

MX stands for mail exchanger. When someone sends a message to [email protected], their mail server asks DNS for the MX records of example.com. The answer is a list of mail server hostnames, each with a priority number. The sending server connects to the preferred host and hands the message over using SMTP. If that host is unreachable, it tries the next. The MX record does not describe where your website lives, and it has nothing to do with the address mail appears to come from.

A typical MX record has four parts.

FieldMeaningExample shape
Name (host)The domain or subdomain the record applies to. Often shown as @ for the root domain@ or mail
TypeAlways MXMX
Priority (preference)A number. Lower values are preferred10, 20
Value (target)The hostname of the mail servermail.provider.example

Your mailbox provider gives you the exact values to use. Always copy them from the provider's own setup page, because they differ between providers and can change over time. Do not copy values from an article.

How priority works

The priority (also called preference) decides the order. A server tries the record with the lowest number first. Records with the same number are treated as equals, and senders spread mail among them. Larger numbers are backups, used only if the preferred hosts do not answer. The numbers have no meaning beyond their order, so 1 and 5 behave the same way as 10 and 20 as long as the ordering is the same.

  • Single provider: you usually have one record, or several with equal or ascending priority, as your provider specifies.
  • Backup server: a higher-numbered record can point to a secondary host. Be careful: backup mail servers that accept everything can become a path for spam, so use one only if you know why.
  • Equal priority: mail is distributed among hosts, which is how large providers spread load.

Rules that cause errors

  1. The target must be a hostname, not an IP address. An MX value is a name that resolves through an A or AAAA record.
  2. The target must not be a CNAME. Pointing an MX at an alias breaks the standard and some servers will not follow it. Point it directly at a hostname with an address record. See CNAME records explained.
  3. Remove the old provider's records when you switch. Leftover MX records from a previous host send some of your mail to the wrong place.
  4. Mind the trailing dot. Some control panels need a final dot on the hostname, and others add the domain automatically, producing names like mail.provider.example.example.com. If lookups show a doubled domain, that is the cause.
  5. Allow for caching. Changes take time to reach everyone because resolvers keep old answers until the TTL expires. See TTL and propagation.

How to check your MX records

You can look up MX records in a few ways.

From a command line

dig MX example.com +short
nslookup -type=MX example.com

The output lists priority and hostname pairs. If it is empty, the domain has no MX record. To see what the whole internet sees, query a public resolver, for example dig @1.1.1.1 MX example.com +short, and compare it with your DNS host's own nameserver.

From an online tool

Many free web tools show MX records and test whether the listed servers answer. Use them for a quick look, and remember they show what their own resolver sees at that moment.

From your DNS host

Your registrar or DNS provider's control panel shows the records as configured, which is the source of truth for what you published, even if the internet has not caught up yet.

After checking MX, check your authentication records with our SPF, DKIM and DMARC checker.

What if a domain has no MX record?

If a domain publishes no MX records, the standard says a sending server may fall back to the domain's address record and try to deliver there. That fallback exists for old reasons and is rarely what you want. If you do not want a domain to receive mail, publish an explicit null MX record, which has priority 0 and a single dot as its target. It tells senders to stop trying immediately instead of waiting and retrying. This is useful for domains that only send, or that are parked. See protecting parked and non-sending domains. Do not publish a null MX for any address that needs to receive replies, bounces or abuse reports.

Does the MX record affect sending?

No. MX records are consulted by people sending mail to you. When you send mail through a relay, the receiving server checks different things:

  • SPF checks whether the sending IP is allowed to send for your domain.
  • DKIM checks a cryptographic signature on the message.
  • DMARC checks that SPF or DKIM aligns with the visible From domain and applies your policy.
  • Reverse DNS of the sending IP is also checked by many receivers. See reverse DNS and PTR records.

So if you start sending through our SMTP relay or email API, you do not touch your MX records. You add the SPF and DKIM records shown in your dashboard domain settings. Your inbox continues to work exactly as before. See authenticating your sending domain.

There is one place where MX and sending meet. If you want replies to go to an application instead of a person's mailbox, you can give a subdomain its own MX pointing at an inbound handler. See inbound email processing and inbound parse. Using a subdomain keeps your main mailboxes untouched.

Changing MX records safely

  1. Lower the TTL a day or two before the change, if your DNS host allows it, so the switch propagates quickly.
  2. Set up the new mailboxes first and confirm they work with the new provider's own test.
  3. Change the records at the DNS host that is actually authoritative for your domain. Check the nameservers; editing records in a panel that is not authoritative has no effect.
  4. Remove the old MX records in the same edit so you do not split mail between providers.
  5. Test by sending to your address from an outside account, and check again after several hours.
  6. Migrate old mail separately. Changing MX moves new mail only.

Troubleshooting common MX problems

SymptomLikely causeWhat to do
Mail to your domain bounces with "domain not found" or "no MX"No MX record, wrong nameserver or a typoCheck records at the authoritative nameserver
Some mail arrives, some does notOld and new MX records both presentRemove stale records
Mail stopped after a DNS changeRecords deleted in a migration, or wrong valuesRe-add the provider's records exactly
Lookup shows a doubled domain nameControl panel appended the domain to a full hostnameEnter the hostname with a trailing dot, or without the domain, as the panel expects
Changes not visibleCached answersWait for the TTL; query the authoritative server directly
MX points to an aliasCNAME as targetUse a host with a direct address record

Quick answers

  • MX records do not need to match your website host. Many sites use one provider for hosting and another for email.
  • You can have different MX records on subdomains.
  • Changing a website's nameservers can remove your MX records if the new DNS zone does not include them. Copy all records, not just the website ones.

For a broader view of what each record type does, read DNS records for email, and for provider-specific mailboxes see Google Workspace and Microsoft 365 MX records.

Send mail without touching your MX Add the SPF and DKIM records from your dashboard and keep your inbox exactly as it is.

See the SMTP relay

References and further reading

Frequently asked questions

What is an MX record?

A DNS record that lists the mail servers that accept email for a domain, each with a priority number. Sending servers look it up to know where to deliver mail.

What does MX record priority mean?

Lower numbers are tried first. Equal numbers share load, and higher numbers act as backups. The numbers matter only for ordering.

Do MX records affect sending email?

No. They control incoming mail. Outgoing mail depends on SPF, DKIM, DMARC and sender reputation, so adding a sending service does not require changing MX.

How do I check a domain's MX records?

Run dig MX example.com +short or nslookup -type=MX example.com, use an online lookup tool or view the records in your DNS host's control panel.

Can an MX record point to an IP address or a CNAME?

No. It must point to a hostname that has its own address record. An IP address or an alias target breaks the standard and may cause failures.

Topics#mx record#dns#email delivery#priority#null mx#troubleshooting
Was this guide helpful?Your answer helps us improve our documentation.

Start sending in minutes.

Create an account, add your domain and send your first email.

Get started Talk to sales