Mail Exchange records, usually called MX records, are DNS records that tell other mail servers where to deliver email for your domain. If your domain uses email addresses such as user@yourdomain.com.au, the MX records for that domain determine which mail server receives incoming messages.
MX records are one of the most important DNS settings for any domain that uses email. If they are missing, incorrect or pointed to the wrong provider, email may stop arriving altogether or be delivered to the wrong service. Understanding how MX records work can help you avoid mail delivery issues when setting up website hosting, Microsoft 365, Google Workspace or other third-party email platforms.
What an MX record does
An MX record is part of the Domain Name System, or DNS, which acts like the directory for internet services. While an A record points a domain or hostname to a server IP address, an MX record points email delivery to the mail system responsible for that domain.
When someone sends an email to your domain, the sending mail server checks your domain’s MX records. It then attempts delivery to the mail server listed in those records, based on the configured priority values.
Each MX record includes two key parts:
* Mail server hostname. This is the destination mail server, such as mail.example.com or a provider hostname supplied by Microsoft 365 or Google Workspace.
* Priority. This is a number that tells sending servers which MX record should be tried first. Lower numbers have higher priority.
If multiple MX records exist, mail servers usually try the lowest priority number first. If that server is unavailable, they try the next one.
Why MX records are important
MX records are essential whenever your domain is used for email. They affect:
* Incoming email delivery to your mailbox provider
* Email continuity if you use backup or secondary mail servers
* Migration between email providers such as cPanel email, Microsoft 365 and Google Workspace
* Business continuity, because incorrect mail routing can result in lost or delayed communication
Unlike website DNS records, MX records do not control where your website loads from. They only control incoming mail routing.
How MX record priority works
Priority determines the order in which listed mail servers should be used. The lower the number, the higher the preference.
For example:
* Priority 0 might be the primary mail server
* Priority 10 might be a secondary mail server
* Priority 20 might be a backup mail server
If the primary server cannot be reached, sending servers will usually attempt delivery to the next available MX record.
Some email providers supply only one MX record. Others provide several for redundancy and reliability. It is important to enter them exactly as your email provider specifies.
Common MX record examples
The exact MX records you need depend on your email provider.
For domains using cPanel or standard hosting email, the MX record may point to a hostname such as mail.yourdomain.com.au.
For Microsoft 365, the MX record usually points to a Microsoft-provided destination ending in mail.protection.outlook.com.
For Google Workspace, the MX records usually point to several Google mail servers such as aspmx.l.google.com and related backup servers.
Because every provider may use different values, you should always use the exact MX hostnames and priorities supplied for your service.
Before you change MX records
Before updating MX records, make sure you have the correct information from your email provider.
You should have:
* The exact destination mail server hostname or hostnames
* The correct priority value for each record
* Access to the DNS zone where your domain records are managed
* Confirmation of whether your email service is hosted with Apexhost or with a third party such as Microsoft 365 or Google Workspace
It is also a good idea to review your existing DNS records before making changes. Removing the wrong record can interrupt mail flow.
How to update MX records
If your domain’s DNS is managed through your hosting control panel, DNS provider or domain registrar, you can usually update MX records from the DNS management area.
1. Log in to the platform that manages your domain’s DNS records.
2. Open the DNS zone or DNS management page for the domain you want to update.
3. Locate the existing MX records for the domain.
4. Compare the current values with the settings provided by your email service.
5. Remove outdated MX records only if they are no longer required.
6. Add the new MX record or records exactly as provided, including the correct priority values.
7. Save the changes.
8. Allow time for DNS propagation, as changes may not apply immediately across the internet.
[Screenshot: DNS management page showing MX record fields]
After the change has propagated, new incoming email should begin routing to the updated mail service.
DNS propagation and expected timing
MX record changes are not always instant. DNS updates can take time to propagate depending on the previous TTL, or Time To Live, values and the caching behaviour of remote systems.
In many cases, changes begin taking effect within a few hours, but some networks may continue using cached records for longer. During a migration, this can result in temporary mixed delivery behaviour until all systems refresh the DNS data.
Best practices for MX records
* Keep only the MX records required for your active email provider
* Follow your provider’s supplied values exactly
* Do not point MX records to an IP address directly unless your provider specifically instructs this, because MX records normally point to hostnames
* Make sure any referenced mail hostnames resolve correctly in DNS
* Review related DNS records such as SPF, DKIM and DMARC when setting up a new email platform
* Plan mail migrations carefully to reduce disruption
Troubleshooting MX record issues
Email is not being received
This usually happens when the MX records are missing, incorrect, or still pointing to an old provider.
Check that:
* The MX records match your provider’s current documentation
* Old MX records have been removed where appropriate
* The domain is using the correct DNS name servers
* DNS changes have had enough time to propagate
Email is going to the wrong provider
This can happen if older MX records remain in place or if DNS is being edited in the wrong system.
Confirm where the domain’s authoritative DNS is hosted, then verify that the correct zone has been updated.
Mail provider setup still shows errors
Some providers validate DNS settings automatically. If setup checks fail, wait for propagation and then test again. Also check whether related records such as autodiscover, SPF or DKIM are still incomplete.
Frequently Asked Questions
Can I have more than one MX record?
Yes. Many providers use multiple MX records for redundancy and failover. Each record should use the priority values specified by the provider.
Do MX records affect my website?
No. MX records only control incoming email delivery. Your website uses other DNS records, such as A records or CNAME records.
Can I point email to Microsoft 365 or Google Workspace using MX records?
Yes. Both Microsoft 365 and Google Workspace use MX records to route incoming email for your domain.
What happens if I delete all MX records?
If a domain has no valid MX records, incoming email delivery may fail or become unreliable.
Related Articles
* What is DNS?
* A Records and CNAME Records
* SPF, DKIM and DMARC Explained
* Microsoft 365 DNS Records
* Google Workspace DNS Records
If you require further assistance, please contact Apexhost Support at support@apexhost.com.au.
