Mail routing · MX records · 10 minutes plus propagation
How to set up mx records — Telling the Rest of the World Where Your Mail Goes
One wrong value here does not break mail outright — it makes most of it arrive and some of it vanish, which is far harder to notice.
The short answer
An MX record names the hosts that accept mail for your domain, each with a priority number, and it is the only record that decides where a message addressed to your name is delivered — the website's A record has nothing to do with it.
Two rules govern what you may put in one: the value must be a hostname, never an IP address, and that hostname must resolve to an address directly rather than pointing at a CNAME. Break either and delivery becomes selective rather than broken, which is the worst of both outcomes.
By the Hosting & Domains team · Reviewed 24 August 2026
Intermediate
Level assumed
Quick
Budget for it
4
Stages, start to finish
24/7
Support, at any hour
Mail routing is decided in the zone, not at the mail provider. Whoever answers DNS for the name controls where messages go, which is why a mail migration is really a DNS job with a mail provider attached.
Plan the change for a quiet hour and leave the old service accepting mail for another day. Sending servers retry for hours, and a window in which either end will accept a message means nothing falls between the two.
What an MX record is allowed to contain
The value is a hostname and nothing else — mail.provider.net, aspmx.example.com, whatever the provider publishes. An IP address is not valid in an MX record however convenient it looks, and the standards also say the hostname you name must resolve directly to an address rather than being a CNAME pointing somewhere else.
Both mistakes fail selectively. Strict senders reject the route outright while tolerant ones deliver anyway, so you get the infuriating case where mail from most of your correspondents arrives and mail from a handful never does. Those take weeks to pin down because everything looks fine from the inside.
The priority number is an order, not a rating
Senders try the lowest number first and work upwards when a host does not answer. Records sharing a number split the traffic between them. A single record at priority 10, or at 0, or at 5 is equally correct — the figure only has meaning relative to the other records in the same set.
Publish the whole set the provider lists rather than just the first line. The higher-numbered hosts exist to catch mail while the primary is unavailable, and leaving them out means messages that would have been queued elsewhere are simply bounced instead.
The zone you edit has to be the authoritative one
This is where mail migrations stall. The MX records must be added wherever the domain actually delegates, which is not always where the website is hosted and not always the panel you were given a login for. Look up the domain's NS records and go to whichever provider they name.
Remove the old MX entries in the same edit rather than adding new ones alongside. A zone carrying both providers' hosts divides delivery unpredictably between them, so half the enquiries land in a mailbox nobody is watching any more.
The cutover hour, and the day after it
Lower the TTL on the existing MX records a day ahead. That shortens the window in which some senders still hold the old answer, which is the entire duration of any risk in this job.
Then make the change during a quiet hour and leave the old service running and accepting mail for at least another day. Anything delivered to the old system during the crossover is still recoverable; anything bounced during it is gone, and the sender is the one who finds out.
MX alone does not authenticate you. Changing where mail arrives says nothing about who may send as you. The SPF record has to name the new provider's sending infrastructure, DKIM needs the provider's selector records published in your zone, and DMARC then tells receiving servers what to do when neither lines up.
Move MX without those and inbound mail works perfectly while your outbound quietly starts landing in junk folders — a fault that takes days to notice because nobody tells you their reply went to spam. Publish all four in the same sitting.

The name and the mailboxes in the same panel
Mailboxes answer at the name you hold, with webmail, IMAP, POP and SMTP, so a DNS change and a mail change are handled in one place rather than argued between two suppliers.
Support means a person at any hour, and the remit covers the awkward practical questions other hosts hand straight back.
- Written for the person who holds the name
- Exact record types, hosts and values
- No step that quietly loses your mail
- Someone reachable while the change is still landing
Why Hosting & Domains
Standard on every plan
The rules on values spelled out
Hostname only, no IP address, no CNAME target — with the reason each one fails selectively rather than obviously.
Priority explained properly
An order of attempts rather than a quality rating, and why the whole set matters instead of just the first line.
The right zone, found first
Mail migrations stall in zones nobody queries, so the delegation check comes before the edit.
A cutover with no gap
Lower the TTL, change during a quiet hour, leave the old service accepting for a day — nothing bounces in between.
Authentication kept in step
SPF, DKIM and DMARC changed alongside MX, so outbound mail does not quietly start landing in junk.
Mailboxes on the same account
Where mail stays with us, the MX records are already right and the whole job is a check rather than a change.
Quick Start
Order placed to site online
- 1
Collect the provider's full set of hostnames
Your mail service publishes its MX hostnames with a priority against each. Copy every line exactly as printed. An MX target is always a hostname, never an IP address, and never a name that is itself a CNAME.
- 2
Open the zone the domain actually delegates to
Look up the NS records first, then edit there. Write down whatever MX entries already exist and remove them in the same edit — a zone holding two providers' hosts splits delivery between them unpredictably.
- 3
Enter the whole set, priorities intact, TTL low
Add every host the provider lists with its number. Lowest is tried first and matching numbers share the load. Drop the TTL for the changeover so the old answer falls out of circulation quickly.
- 4
Prove it with a real message, then fix authentication
Run an external MX lookup, then send a message in from an unrelated account and watch it arrive. Finish by updating SPF, publishing the provider's DKIM records and checking DMARC still describes the truth.
Built In
Fitted to every plan
- Mailboxes that answer at the name you hold
- Webmail in the browser, plus IMAP, POP and SMTP for any client
- Spam and virus screening in front of every mailbox at your name
- Full zone control — A, CNAME, MX and TXT — from the panel
- Free SSL on every plan, reissued before the old certificate lapses
- A daily copy, with restores you run yourself from the panel
- People on the support desk every hour of every day
- cPanel, which is what most of the industry already runs
- 99.9% uptime as the target, watched around the clock
- Money back within 30 days on hosting plans, 7 on reseller
Frequently Asked
Questions we field again and again
Can an MX record point at an IP address?
No. The value must be a hostname, and that hostname must resolve directly to an address rather than being a CNAME. Strict senders reject anything else outright while tolerant ones deliver, which produces the miserable case where most mail arrives and some silently does not.
Some mail is still arriving at the old provider. Why?
Either senders are still holding the previous MX answer until its TTL expires, or the old records were left in the zone alongside the new ones. Check the zone first for leftovers, then wait out the TTL — and keep the old mailboxes reachable until the flow has genuinely stopped.
Do I need to change SPF when I change MX?
Yes, if the same provider is also sending your outbound mail. MX governs delivery to you; SPF, DKIM and DMARC govern mail claiming to come from you. Change MX alone and your outbound will start failing authentication checks at the receiving end within days.
What happens to messages sent during the change?
Sending servers queue and retry for hours rather than giving up at the first refusal, so a message caught mid-change is usually delivered a little later rather than lost. Leaving the old service accepting mail for another day closes the remaining gap entirely.
Keep reading
Domain Names
Search, register and transfer names — with the zone and the mail records in the same panel.
WordPress Hosting
WordPress hosting where the site's mail and the domain's records are administered together.
Changing provider? Work through this checklist beforehand.
A straightforward running order for a migration your visitors never spot: which files travel first, how to bring the mail across without dropping a single message, the right moment to repoint DNS, and the two errors that sit behind almost every outage we get called in to fix.
Mail that arrives at your own name.
Mailboxes at your own name, daily copies you restore yourself, and 30 days to change your mind on hosting plans.
View Domain Names plans