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.
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.
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.
| Part | Meaning |
|---|---|
| Priority | Order servers are tried in. Lower number = tried first. |
| Mail server hostname | The 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.
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
Create a mailbox on your domain in your control panel, then connect it to a mail app using the settings your control panel provides.
How to migrate mailboxes to a new hostThe order that keeps mail flowing while mailboxes move to a new host: create accounts, copy messages, then switch MX records.
How to fix email you are not receivingA step-by-step way to find out why messages sent to your address are not arriving, from DNS to mailbox storage.
How to point a domain to your hostingThe two ways to connect a domain to a hosting account, when to use each, and how to tell the change has actually taken effect.