FAQ Email

What are MX records?

What an MX record does, why it is separate from your website's DNS, and where to find the ones set for your domain.

Updated 4 min read Beginner

An MX record — Mail Exchanger record — is a DNS entry that tells the wider internet which server should receive email for a domain. It is entirely separate from the records that point a domain's website: a domain can have its website hosted in one place and its email handled somewhere else entirely, controlled independently through MX records rather than the A record or nameservers that point the site.

Why this matters

Because MX and website records are separate, changing one does not automatically affect the other. This is exactly why pointing a domain at new hosting using an A record, rather than changing nameservers, is the safer option when email must keep working at its current provider during a website move — the MX record is simply left untouched.

Changing nameservers changes every record at once, including MX

If a domain's nameservers are switched to a new host, every DNS record — including MX — moves to whatever the new host has configured, or to nothing at all if it has not been set up yet. This is the most common cause of "email stopped working" immediately after a nameserver change: the MX record that used to route mail correctly no longer exists on the new nameservers unless it was recreated there first.

What an MX record looks like

yourdomain.com.   MX   10   mail.yourhostingprovider.com.

The number — 10 in the example above — is the priority. Lower numbers are tried first. A domain can list several MX records at different priorities, so that if the primary mail server is unreachable, a receiving server falls back to the next one in order.

PartMeaning
PriorityOrder servers are tried in. Lower number = tried first.
Mail server hostnameThe actual server that accepts mail for the domain, shown in your control panel

Finding the MX records set for your domain

Your control panel's DNS section lists the current MX records for any domain you manage there. To check what is publicly visible from outside, query it directly:

dig MX yourdomain.com +short
nslookup -type=MX yourdomain.com    # Windows

When MX records need changing

  • Moving email to a new host, where the new host's mail server hostname replaces the old one. See migrating mailboxes to a new host for the safe order to do this in.
  • Switching to a third-party email provider such as Microsoft 365 or Google Workspace, which each require their own specific MX records to be published instead of your host's.
  • Adding a backup mail server at a lower priority, for organisations that want mail queued elsewhere if the primary server is briefly unreachable.
MX record changes affect only where new mail is delivered

Existing mailboxes and their contents are not moved or affected simply by changing an MX record. The record only controls where the next incoming message is routed to — moving the actual mailbox content is a separate step, covered in migrating mailboxes to a new host.

If mail stops arriving after a DNS change

Check the MX records first — a missing or incorrect one is one of the most common causes, and it is easy to overlook when attention is focused on the website working again. Also allow time for the change to spread; see how long DNS propagation takes. If mail is still not arriving once MX records are confirmed correct and enough time has passed, fixing email you are not receiving covers the remaining checks.

Related reading