LochStudios  /  Help Centre  /  Email Deliverability  /  MX Records and How Email Routing Works

MX Records and How Email Routing Works

How MX records send inbound mail to the right product, and how to set them on AtlasDNS or in cPanel Hosting DNS mode.

Updated

MX (Mail eXchange) records tell other mail servers where to deliver mail for your domain. When someone writes to sales@yourdomain.com, their server looks up your MX records, connects to the hostname listed there, and hands the message over. If those records are missing or pointed at the wrong product, new mail does not arrive.

We set this up with you. Unsure which product or DNS mode you are on? Open a support ticket and we will check.

MX only answers where inbound mail goes. Sending and trust use SPF, DKIM, and DMARC.

Which mail product

MX must point at the product that actually holds the mailboxes. Do not mix those paths.

  • Shared hosting (mailboxes you create in cPanel): keep MX aimed at this account, typically mail.yourdomain.com. See Create an email account.
  • LochStudios Mail (hosted business email): confirm the MX value on the mail service in the portal. Hostname is usually mail.yourdomain.com once DNS and MX point at this product. Open that service and use Log in to WebMail for the inbox. See What is Axigen webmail and how to sign in. Plans are on LochStudios Mail.
  • A VPS you manage: only point MX at that server if it is actually accepting mail. Credentials and the console are on the server in the portal.
  • Another mail product (Google Workspace, Microsoft 365, or a newsletter tool that receives on the domain): add the MX values they gave you, as written. Do not invent a hostname.

A cPanel mailbox will not collect mail that still MX-points at LochStudios Mail, and the other way around. Creating the mailbox does not move inbound mail. Change MX only when you are ready to cut over.

Where the MX record goes

The record is an MX on the root name (@ / yourdomain.com). AtlasDNS is the default. Do not send the domain to a third-party DNS host.

  1. Sign in at /portal.
  2. Open Domains, then the domain, then DNS.
  • AtlasDNS (the usual case): add and edit MX on that page. When the domain uses AtlasDNS, the nameservers are:
ns1.atlasdns.net.au
ns2.atlasdns.net.au
ns3.atlasdns.net.au
  • cPanel Hosting DNS mode (the domain is paired with a shared hosting service): the portal says records are managed from the hosting control panel. Open the hosting service, click Log in to cPanel, and use the Zone Editor (or Email Deliverability to confirm the recommended mail host).

Unsure which mode you are on? Open a support ticket.

A records move the website. Changing only @ and www does not move mail. See Point your domain at your hosting.

How inbound routing works

  1. Someone sends mail to user@yourdomain.com.
  2. Their mail server looks up MX records for yourdomain.com.
  3. It takes the hostname on the lowest priority number (for example mail.yourdomain.com).
  4. It looks up the A or AAAA record for that hostname.
  5. It connects to that address and delivers the message.
  6. The mailbox holds the mail until you open it in Webmail or a mail app.

That lookup is usually quick. After you change MX, other networks may still use the old answer until DNS propagation finishes.

Hostname and priority

An MX record has two parts: a hostname (where mail goes) and a priority (which host is tried first). Lower numbers are tried first.

Example (shared-hosting mail):

yourdomain.com    MX    10    mail.yourdomain.com
FieldMeaning
NameThe domain that receives mail. Use @ (or leave it blank) for the root name.
TypeMX
PriorityLower is first. Shared-hosting mail is often 0 or 10.
ValueThe mail hostname. It must be a name, not an IP.

You can have more than one MX. Add only hosts the product actually uses. Do not invent a mail2.yourdomain.com backup. Shared hosting and LochStudios Mail are usually one MX to mail.yourdomain.com. Another mail product may give you several rows with different priorities. Add every row they listed, with those priorities.

Same priority on two real hosts is allowed. Senders then choose among them. Use the numbers we (or the other product) gave you.

Record types: DNS record types explained.

Add or change the MX

Wrong MX takes inbound mail away from the current inbox. If the name is already live, open a support ticket before you save a cutover.

AtlasDNS

1. Sign in at /portal.
2. Open Domains, then the domain, then DNS.
3. Add an MX record:
- Name: @ (the root)
- Priority: 10 unless the product showed a different number
- Value: mail.yourdomain.com (or the exact hostname from the mail service)
4. Save.

On AtlasDNS, the name field is the left-hand label (@), not the full yourdomain.com, unless the form asks for the FQDN.

cPanel Hosting DNS mode

  1. Sign in at /portal, open the hosting service, and click Log in to cPanel.
  2. In the Domains section, open Zone Editor.
  3. Find the domain and click Manage, or use + MX Record.
  4. Add MX for the root name (@ or the bare domain), priority 0 or 10, destination mail.yourdomain.com.
  5. Save.

If the domain was created on this hosting account and you have not pointed mail elsewhere, cPanel usually already wrote that MX and the matching mail A record. Confirm the row. Do not add a second copy of the same name and host.

The hostname must resolve

MX must point at a hostname. That hostname needs an A or AAAA record.

For shared-hosting mail, mail.yourdomain.com should be an A record to this account's Shared IP Address (cPanel General Information). For LochStudios Mail, copy the hostname (and any A record) from the mail service in the portal. Do not guess an IP.

nslookup mail.yourdomain.com

You should see an address. If the name does not resolve, add the A record first, or open a support ticket.

Do not point MX at an IP:

yourdomain.com    MX    10    192.0.2.1          (wrong)
yourdomain.com    MX    10    mail.yourdomain.com  (right, and that name has an A record)

Check that it works

Changes are often quick. They can take a while to show everywhere. See DNS propagation explained.

Look up the published MX (use your real domain):

nslookup -type=MX yourdomain.com

You should see the hostname and priority you saved.

Then send a real message to the mailbox from an address that is not on this domain.

  • Shared hosting: open Access Webmail (Roundcube).
  • LochStudios Mail: Log in to WebMail on the mail service.

If it arrives, inbound MX is working. Client app settings are a separate step: General IMAP/POP/SMTP mail settings or Axigen email server settings.

If you would rather we check, open a support ticket and include the domain and which product should receive the mail.

If something looks wrong

No MX on the name. Add the row for the product that holds the mailboxes. Wait for propagation, then look up again.

MX points at a name that does not resolve. Add the A (or AAAA) for that mail hostname, or change MX to a hostname that already has one.

MX still lists an old host. Delete MX rows you are no longer using. Do not leave two competing products on the same name.

You edited the wrong zone. AtlasDNS records live under Domains → the domain → DNS. The Zone Editor is live only in cPanel Hosting mode.

Website works, mail does not. @ and www A records do not deliver mail. Check MX, then the mailbox on the matching product.

Mailbox exists, nothing new arrives. Creating the address does not change MX. Confirm the live MX still points at that same product.

Do not restart services yourself. If the record looks right and mail still does not arrive, open a support ticket.

Moving mail to another product

When you are ready to cut over:

  1. Create the mailboxes on the new product first.
  2. Lower TTL on the current MX a day ahead if you can (300 seconds is fine).
  3. Replace the old MX set with the new product's values. Do not leave both sets on the name.
  4. Update SPF and DKIM for the new sender. Then add DMARC if it is not already there.
  5. Send a test from outside the domain.

Mail already stored on the old product stays there until you move it. MX only affects new inbound messages.

If the name is live, open a support ticket before you save. We will set the records with you.

Subdomain addresses

A subdomain can have its own MX, separate from the root name:

mail.yourdomain.com    MX    10    mail-server.yourdomain.com

That delivers user@mail.yourdomain.com on its own path. Addresses on yourdomain.com still follow the root MX. The target hostname still needs an A or AAAA record.

Most people do not need this. Shared-hosting and LochStudios Mail addresses on the root domain use the root MX.

MX, SPF, DKIM, and DMARC

These four work together. MX is delivery. The others are authentication.

  • MX: send inbound mail to mail.yourdomain.com.
  • SPF: which servers may send as this domain.
  • DKIM: this message was signed by the sending product.
  • DMARC: what to do when SPF or DKIM do not align with the From domain.

Fix MX first so mail lands in the right product. Then publish SPF and DKIM for that same product. Filters weigh all of this when they decide inbox versus spam. See Why your emails go to spam.

Good habits

  • Point MX at one product per name. Remove leftover rows from a previous mail host.
  • Keep a matching A (or AAAA) on the mail hostname.
  • Do not put a CNAME on the root name. The root already holds MX and TXT.
  • Test after any MX change: send from outside the domain, then open Webmail.
  • When you add a newsletter tool that only sends, you usually change SPF and DKIM, not MX.

Related


Was this article helpful?

← Back to Email Deliverability