MX records: route your email

mx, email, routing, priority · 0 found this helpful

An MX (mail exchanger) record says which server accepts email for your domain. When someone writes to [email protected], their mail server looks up the MX record for example.ca and delivers there.

How it works

Each MX record has a priority number and a target hostname. The lowest number is tried first. If that server is down, the next is tried.

example.ca.   3600  IN  MX  10  mx1.provider.example.
example.ca.   3600  IN  MX  20  mx2.provider.example.

Rules:

  • The target must be a hostname with an A record. It must not be a CNAME or an IP address.
  • Equal priorities share load.
  • Remove old MX records when you move email. A leftover record sends some mail to the wrong place.

Email at Barbrick

For mailboxes on your hosting plan, the MX record points to your domain itself, which resolves to the server that holds your mailboxes. mail.example.ca is an alias of the same name, for use in mail apps.

Type Name Value TTL Priority
MX example.ca. example.ca. 14400 0
CNAME mail.example.ca. example.ca. 14400

We create these when the domain is added.

Set mail routing

Mail routing tells our server whether to deliver mail to mailboxes on your account or send it elsewhere. Match it to your MX.

  1. Open Account → Hosting → your site → Email.
  2. Open the More tab and find Mail routing. Each domain has its own setting.
  3. Choose one.
Option Use it when
Local Mailboxes are on this account
Remote Mail is hosted elsewhere, such as Microsoft 365 or Google Workspace
Automatic The MX records are right and you want us to follow them
Backup Rare. Holds mail when the primary is down

If email is hosted elsewhere and routing says Local, our server looks for a mailbox that does not exist and mail to that domain bounces.

Change to another provider

  1. Create the mailboxes at the new provider first.
  2. Lower the MX TTL to 300 seconds a day ahead.
  3. Replace the MX records with the new provider's, and delete the old.
  4. Set Mail routing to Remote if the new provider is not Barbrick.
  5. Move old mail. See Import email from your old provider.

Mail sent during the switch may arrive at either place for a short time. Check both.

Check your MX records

dig MX example.ca +short
0 example.ca.

On Windows:

nslookup -type=MX example.ca
example.ca      MX preference = 0, mail exchanger = example.ca

See Check your DNS records.

If something goes wrong

  • Mail not arriving. See Can't receive email.
  • Bounce says "domain not found" or "no MX". MX records are missing or the domain's DNS is not resolving.
  • Mail goes to old provider. The old MX record is still published, or DNS caches have not expired.

Was this helpful?

Still stuck? Ask us and we'll walk you through it.