Skip to main content
.com domains from $2.99 — free WHOIS privacy on every name

Mail routing · Intermediate · 10 min plus TTL

How to set up mx records — Priorities, Not Preferences: Routing Mail Once

You need inbound mail arriving at the provider that actually holds the mailboxes, not at a server that is still politely accepting it and dropping it.

The short answer

Replace the entire MX set rather than adding to it, because a sending server reads the whole list and tries the lowest priority number first. One leftover row with a lower number than your new records will keep collecting your mail indefinitely.

Then deal with the second half of the job, which is local delivery. If the mailboxes live somewhere else, the mail server on this account must be told the domain is remote, or it will accept messages for local users and never send them anywhere. That setting is not in DNS and no amount of correct MX records will fix it.

By the HostingFast team · Reviewed 24 August 2026

Intermediate

Skill floor

Quick

Hands-on time

4

Steps in total

24/7

Support on call

You need the provider's hostnames and priorities, cPanel access, and a mailbox outside the domain to test from. Ten minutes of work plus a wait bounded by the old TTL.

Mail is the least forgiving thing DNS controls, so the sequence below front-loads the deletion and the verification. Everything is reversible if you saved the original rows first, which is why that is step one.

How a sending server chooses your mail host

A sender queries MX for your domain, sorts the answers by priority ascending, and tries the lowest number first. Equal numbers are load-balanced between, roughly at random. Higher numbers are fallbacks, tried only when everything below them refuses the connection.

That is why the numbers themselves are meaningless and only the ordering matters. A set of 10, 20, 30 and a set of 1, 5, 9 behave identically. What breaks things is a stray record at 5 next to your intended primary at 10, because the stray wins every time and nothing in DNS looks wrong.

The leftover row that keeps stealing your mail

Panels default to adding rather than replacing, so a domain that has moved provider twice often carries three generations of MX records. Mail then goes to whichever generation has the lowest number, which is usually the oldest, which is usually a server that no longer has your mailboxes.

Before adding anything, query the current set with dig MX yourdomain.com +short and save the output. Then delete every row. Then add the new set in full. Reading the saved output afterwards is also how you explain, credibly, where a week of missing mail went.

Local versus remote delivery, and the setting in cPanel

This is the part that DNS cannot tell you. When the account hosting the website also runs a mail server, that server checks whether it considers itself responsible for the domain before it looks at MX at all. If it does, it delivers locally and the message never leaves the box.

In cPanel the control is Email Routing, and the values are Local, Backup and Remote. Mailboxes at a third-party provider means Remote. Mailboxes here means Local. Set it explicitly rather than trusting Automatic, because Automatic guesses from the zone and it guesses wrong during a migration.

Reading the headers, which is the only real test

Send a message from an account outside the domain and open the raw source. The Received headers read bottom to top, each one added by a server as the message passed through, with a hostname and a timestamp. That trace tells you exactly which servers touched it and where the time went.

Do the outbound direction too. MailChannels handles outbound delivery on this platform, so a reply that leaves cleanly and arrives with a pass on SPF and DKIM confirms both halves of the route rather than just the one you changed.

Working through an inbox that carries its own domain name

The stack these steps were measured on

Every walkthrough here is run against the platform we operate — cPanel, LiteSpeed in front of NVMe, Softaculous, WP-CLI over SSH — so the field names in the instructions are the field names on your screen.

Mailboxes on your own domain come as part of the plan, so email is included rather than sold back to you at the checkout.

  • Priority ordering explained, not just listed
  • Email Routing covered, because DNS cannot fix it
  • Verified from the Received headers
  • Engineers on support at any hour

Why HostingFast

Standard on every plan

Ordering, properly explained

The page says how a sender sorts your MX list, which is what makes a stray low-priority row obviously fatal rather than merely untidy.

The leftover row named early

Additive panels leave generations of old MX records behind, and deleting them is step two rather than a footnote.

Local delivery covered

cPanel Email Routing is the setting no DNS change can compensate for, and it gets its own step and its own section.

4 steps, no padding

Four actions with an observable result each, and the wait described as a wait rather than dressed up as work.

Tested with real mail

The verification is a real message and its Received headers, in both directions, not a panel that says saved.

Engineers on call

Mail problems do not keep office hours, and support is staffed for the hour you notice.

Quick Start

From order to online

  1. 1

    Save the current set, then collect the new one

    Run dig MX yourdomain.com +short and keep the output. Get the full hostname and priority list from the new provider's documentation, including the fallbacks — a partial set is a single point of failure you have introduced deliberately.

  2. 2

    Delete every existing MX row before you add anything

    In cPanel Zone Editor, filter to MX and remove all of them. Panels add rather than replace, and one surviving record with a lower priority number will keep taking delivery no matter how correct the new rows are.

  3. 3

    Enter the full set, then set Email Routing

    Add every hostname with its priority exactly as documented. Then open Email Routing for the domain and set it to Remote if the mailboxes are elsewhere, or Local if they are here. Do not leave it on Automatic during a change.

  4. 4

    Verify with dig, then send a real message both ways

    Check dig MX yourdomain.com @1.1.1.1 returns only the intended rows. Then send in from an outside account and read the Received headers in the raw source, and reply outbound and confirm SPF and DKIM pass at the far end.

Built In

Loaded onto every plan

  • Mailboxes that run on your own domain name
  • Spam and virus screening on every mailbox as standard
  • Webmail in the browser plus IMAP, POP and SMTP
  • Free SSL on every plan, renewed before it can lapse
  • NVMe storage on every tier, not only the expensive ones
  • Per-site PHP version switching in the control panel
  • WordPress and 400+ other applications in one click
  • DDoS filtering absorbed at the network edge
  • Support staffed by humans, every hour of the day
  • Money back: 30 days on hosting, 7 on reseller

Frequently Asked

What people ask us most often

Mail still arrives at the old host after I changed MX. Why?

Three candidates, in order of likelihood. A leftover MX row with a lower priority number is still winning, so check dig MX yourdomain.com +short returns only what you intended. Resolvers are still holding the old answer, so read the TTL countdown. Or the mail server on the account thinks it is responsible for the domain, in which case Email Routing is on Local and the message never gets as far as DNS.

What priority numbers should I use?

Whatever your provider documents, unchanged. The absolute values carry no meaning — only the ordering does — so 10 and 20 behave exactly like 1 and 2. Equal values are load-balanced between, which is intentional for a provider with several equivalent inbound hosts. The one rule that matters is that no other row anywhere in the zone has a lower number than your intended primary.

Does moving MX break my outbound authentication?

It will if you leave SPF alone, and that is the step people forget. MX governs inbound; SPF governs who may send outbound on your behalf. Moving mailboxes to a new provider without updating the include mechanism in your SPF record means your own outbound mail starts failing authentication, which looks nothing like an MX problem and gets diagnosed as one for a fortnight.

Can I split mail between two providers on one domain?

Not cleanly by MX, because MX is per domain and not per mailbox: every sender gets the same list. The workable patterns are a subdomain with its own MX set for the second group, or routing everything to one provider and forwarding selected addresses onward. Two providers at equal priority on the same domain gives you mail landing in whichever one won the coin toss.

Keep reading

Changing hosts? Run through our checklist first.

A straightforward sequence for a switch your visitors never feel: which files move first, how to shift email across without losing a single message, the right moment to repoint DNS, and the two mistakes behind almost all the downtime we get asked to rescue.

You'll get the checklist email, then occasional pointers on keeping a site running fast. Unsubscribe the moment you want out — the privacy policy covers the rest.

Route the mail, keep the site quick.

Mailboxes on your own domain included, NVMe behind a LiteSpeed cache, free SSL and migration, and a price that never moves.

View Domain Names plans