UK domains, DNS and business email · real people · since 200601623 650333 · Client login
Search domains

What is an MX record and how do priorities work?

An MX (mail exchanger) record tells other mail servers where to deliver email for your domain. Each has a priority, and the lowest number is tried first. MX values must be hostnames, not IP addresses. dijitul sets up and fixes MX records at £45 an hour + VAT, or includes them with hosting.

Updated 2026-10-18 · by the dijitul DNS team, Mansfield, UK

Key facts

  • MX stands for mail exchanger.
  • MX records control where incoming email for your domain is delivered.
  • The lowest priority number is tried first.
  • An MX value must be a hostname, not an IP address or a CNAME.
  • New Google Workspace setups use a single MX: smtp.google.com, priority 1.
  • Microsoft 365 shows the exact MX value to use in its admin centre.

What an MX record does

When someone emails you@example.co.uk, their mail server looks up the MX records for example.co.uk. The answer is a list of mail servers and priority numbers. The sending server then connects to one of those servers and hands the message over.

MX records only affect incoming email. Outgoing email is checked by SPF, DKIM and DMARC records, which are TXT or CNAME records, not MX. If incoming mail fails, look at MX first. If your sent mail lands in spam, look at why emails go to spam.

How priority works

Each MX record has a number. Lower numbers are preferred. If you have:

  • 10 mx1.mailhost.example
  • 20 mx2.mailhost.example

senders try mx1 first and fall back to mx2 if mx1 is unreachable. Two records with the same number share the load. The numbers themselves do not matter, only their order, so 1 and 5 behave the same as 10 and 50.

A common mistake is leaving an old provider's MX record in place with a lower or equal number. Some mail then goes to the old system and is never seen. When you change provider, remove the old MX records completely.

Do you need a backup MX? For most small businesses, no. Google, Microsoft and good hosted email services already run several mail servers behind their MX hostnames. Senders also queue mail and retry for some time if your server is unreachable, so a short outage rarely loses mail. A badly run backup server can actually attract spam, because it may accept mail the main server would reject.

Rules for MX values

  • Hostname, not IP. The value must be a hostname such as mail.example.co.uk, which in turn has an A or AAAA record. An IP address in an MX record is invalid.
  • Not a CNAME. The hostname should not itself be a CNAME. Point it at a name with real address records.
  • At the right name. MX records for the main domain go at "@". A subdomain that receives mail needs its own MX records.
  • Watch the trailing dot. Some control panels add the domain to anything without a final dot, turning mail.provider.example into mail.provider.example.example.co.uk. Check the live record after saving.
  • Cloudflare. Mail hostnames must be set to "DNS only", not proxied, because the proxy handles web traffic only.

MX records for common providers

ProviderMX recordNotes
Google Workspacesmtp.google.com, priority 1New setups use this single record. Older setups may list several aspmx records, which still work.
Microsoft 365The exact value shown in the Microsoft 365 admin centreIt is specific to your domain. Copy it rather than guessing.
dijitul email hostingSet by us for your accountIncluded with dijihost Complete Hosting.

Each provider also needs SPF, DKIM and usually verification records. See how to set up business email.

How dijitul helps

We set up MX records for new email, switch them when you change provider and fix delivery problems. On their own, changes are £45 an hour + VAT. DNS management and email hosting are included with dijihost Complete Hosting at £1 a day + VAT. See MX records setup and moving email provider, or contact us.

Frequently asked questions

What does the MX priority number mean?

It sets the order in which sending servers try your mail servers. The lowest number is tried first. Higher numbers are fallbacks. Records with equal numbers share the load. Only the order matters, not the actual values chosen.

Can an MX record point to an IP address?

No. An MX record must point to a hostname, and that hostname must have its own A or AAAA record. It should not be a CNAME either. Many control panels will reject an IP address, but some accept it and mail then fails.

Why is some of my email going to the old provider?

An old MX record is probably still in place. Senders may use it, especially if its priority is lower or equal to the new one. Remove every MX record for the old provider, then check the live records with a lookup.

Do MX records affect emails I send?

Not directly. MX records control where incoming mail is delivered. Whether your outgoing mail is trusted depends on SPF, DKIM and DMARC records. Some receiving servers do check that a sending domain has valid MX records, so keep them correct.

How long does an MX change take?

The change is live on your nameservers straight away, but senders that cached the old record keep using it until the TTL runs out. Lower the TTL to around 300 a day before switching so the move is picked up quickly.

Related

Get domains, DNS and email sorted

Set up properly, records checked, and real people to call. DNS and email are included with dijihost hosting.

Call usSearch domains