Websites and Tech

MX Record

Also called mail exchange record

A DNS record that tells other mail servers where to deliver email sent to addresses at your domain.

Quick facts: MX Record

Category
Websites and Tech
Also called
mail exchange record
Level
Intermediate
Affects
Incoming email, enquiry handling, domain moves and website migrations
Where to see it
Google Admin Toolbox Check MX, MXToolbox, dig or nslookup, your DNS provider's zone editor
In this article4
  1. How an MX record works
  2. Why it matters
  3. Common mistakes
  4. How to act on it

An MX record (mail exchange record) is an entry in your domain’s DNS that tells the rest of the internet which server accepts email for your addresses. When someone sends a message to hello@yourbusiness.co.uk, their mail server looks up the MX record for yourbusiness.co.uk and delivers the message to the server it names.

How an MX record works

MX records live in the same DNS zone as the records that point your domain at your website. Each one has two parts: a host name for the receiving mail server, and a priority number. Lower numbers are tried first. If you have several records, the sending server tries the lowest number and falls back to the next if that server does not answer.

The values come from whoever runs your email. Google Workspace currently asks for a single record pointing to smtp.google.com with priority 1 (older set-ups used five records with names such as aspmx.l.google.com, which still work). Microsoft 365 gives each domain its own address ending in mail.protection.outlook.com. Hosting companies that provide email often use the domain itself or a mail subdomain.

The MX record must point to a host name, and that name must have its own A record (or AAAA record for IPv6). It cannot point straight at an IP address or at a CNAME, even though some control panels let you type one in.

Why it matters

MX records only handle incoming mail, yet they cause some of the most painful problems in website projects. A new site is built, the developer moves the domain’s nameservers to the new host or to Cloudflare, and only the website records are recreated. The website works. Email quietly stops arriving, and nobody notices until a customer phones to ask why their enquiry went unanswered.

For a UK service business that relies on contact forms and quote requests, a few days of lost email can cost more than the whole redesign. Form notifications often land in the same inbox, so the leads disappear along with ordinary email.

MX records also sit alongside the records that protect your sending reputation. SPF, DKIM and DMARC are TXT records, not MX records, but they are often lost in the same move, and missing ones can send your outgoing mail to spam.

Common mistakes

  • Changing nameservers without first copying the full DNS zone, including MX and TXT records.
  • Keeping records from a previous email provider alongside the new ones, so some messages go to a mailbox nobody checks.
  • Typing the host name with a missing trailing dot or extra domain, so the record reads as mail.yourdomain.co.uk.yourdomain.co.uk.
  • Pointing the MX record at an IP address or a CNAME.
  • Leaving the host’s own local mail delivery switched on in cPanel after moving email to Google or Microsoft, so messages sent from the website never leave the server.

How to act on it

Look up your current MX records with Google’s Check MX tool or MXToolbox and compare them with what your email provider’s set-up page says. Before any change to DNS or nameservers, export or screenshot every record in the zone. After the change, send test emails from an outside account, such as a personal Gmail address, and submit your own website forms to confirm both arrive.

Keeping email, verification records and DNS intact is part of the checklist I work through for any website migration, alongside the redirects and tracking that protect search traffic.

Do and do not

Do

  • Copy every MX record before changing nameservers or DNS providers
  • Use the exact values your email provider gives you
  • Send test emails from an outside address after any DNS change

Do not

  • Point an MX record at an IP address or a CNAME
  • Leave old MX records from a previous email provider in place
  • Assume email is fine because the website loads

Questions people ask about this

How long does an MX record change take to work?

Usually between a few minutes and a few hours, depending on the TTL set on the old record. Some mail servers hold the old answer for up to that TTL, so during the change a few messages may still go to the old server. Lowering the TTL a day before the switch shortens that window.

Can my website and email be with different companies?

Yes, and it is very common. The A or CNAME records point your domain at the web host, and the MX records point your mail at Google Workspace, Microsoft 365 or another provider. They are independent as long as all the records live in the same DNS zone that your nameservers point to.

Do MX records affect SEO?

Not directly. Search engines do not rank sites on their email set-up. The indirect effect is real, though: if enquiries stop arriving after a website change, the leads that search traffic produced are lost, which is why I check email during every migration.

Related terms

Found this useful?

Share it, or ask an AI to summarise it

Back to the glossary

Knowing the term is the easy part

Applying it to your own site and budget is the work. Book a call and I will tell you what actually applies to you.