Short answer: MX records tell other mail servers where to deliver email for your domain. Point them to your mail server with the priority values your provider gives you (lower numbers are tried first), remove old MX records, then test by sending yourself a message. Check them any time with our free DNS lookup.
If your email suddenly stops arriving, or you are moving to a new email provider, MX records are almost always involved. They are simple once you see how they work.
How MX records work
When someone emails hello@yourbusiness.com, their mail server looks up the MX (mail exchanger) records for yourbusiness.com to find out where to deliver it.
Each MX record has a priority and a mail server name, for example:
| Priority | Mail server |
|---|---|
| 10 | mail.yourdomain.com |
| 20 | backup-mail.example.net |
Senders try the lowest number first and fall back to the next if it fails. Records with the same priority share the load.
MX records only handle incoming mail. Sending is protected by SPF, DKIM and DMARC. See SPF, DKIM and DMARC.
Check your current MX records
Run your domain through our DNS lookup and look at the MX rows. You should see only your current provider's servers. Leftover records from an old provider are a common reason mail goes missing.
Pointing MX to your hosting
If your mailboxes are on your hosting plan, cPanel usually sets the MX record automatically. Check Email Routing is set to Local Mail Exchanger.
Pointing MX to an email provider
- Copy the MX values from the provider's setup page.
- In your DNS editor, delete old MX records.
- Add the new ones with the given priorities.
- In cPanel, set Email Routing to Remote Mail Exchanger, so your hosting server stops treating the domain's mail as local.
- Add the provider's SPF and DKIM records and verification TXT record.
Provider-specific guides: Gmail and Google Workspace and Outlook and Microsoft 365.
Where to edit MX records
MX records live wherever your domain's nameservers point: your hosting's cPanel Zone Editor, your registrar's DNS page or a service such as Cloudflare. Editing anywhere else has no effect. See what nameservers are.
After changing MX
- Add SPF, DKIM and DMARC for the new provider. See SPF, DKIM and DMARC.
- Keep the old mailbox until the change has spread, and check it for a few days. See DNS propagation.
- Send test messages from Gmail and Outlook to your domain and check they arrive.
Common MX mistakes
| Mistake | Result |
|---|---|
| Old provider's MX records left in place | Some mail goes to the old provider |
| MX pointing to an IP address | Invalid: MX must point to a host name |
| MX pointing to a CNAME | Not allowed by the standard; some senders reject it |
| Email Routing left on Local in cPanel after moving email elsewhere | Messages from your own website, such as contact forms, get stuck on the hosting server instead of reaching your new provider |
| Typos in the server name | No mail arrives at all |
Frequently asked questions
Can MX point to an IP address?
No. MX must point to a host name, which then has its own A record.
Why is email still arriving at the old server?
Cached DNS. It settles within hours as old records expire.
Do I need a backup MX record?
Usually not. Modern providers run redundant servers behind one name, and sending servers retry for days if delivery fails.
Will changing MX records affect my website?
No. MX records only affect email. Your website uses A, AAAA and CNAME records.



