
An MX record (Mail Exchanger record) is a type of DNS record that tells the internet which mail server is responsible for receiving email on behalf of your domain. Without correct MX records, email sent to your domain will not be delivered. Whether you want to use AsiaGB's built-in mail server, switch to Google Workspace, or migrate to Microsoft 365, this guide walks you through everything you need to know.
What Is an MX Record and What Does It Do?
When someone sends an email to [email protected], the sending mail server performs a DNS lookup for the MX records of yourdomain.com. The MX record responds with the hostname of the mail server that should receive the message (for example, mail.yourdomain.com or aspmx.l.google.com). The sending server then connects to that host and delivers the message.
Without a valid MX record, sending servers have no idea where to deliver email for your domain, so all messages will bounce back to the sender with a delivery failure error.
Finding MX Records in DirectAdmin (DNS Management)
- Log in to DirectAdmin and go to Advanced Features or DNS Management.
- Click on DNS Management (or DNS Records).
- Scroll down to the MX Records section. You will see the current MX entries for your domain.
- To add or edit a record, click the Add button or click on an existing record to modify it.
Default MX Records at AsiaGB
When you sign up for hosting at AsiaGB, your domain's MX record is automatically configured to point to AsiaGB's mail server. The default entry looks something like:
- Priority: 10
- Mail Server: mail.yourdomain.com
This default configuration works immediately with DirectAdmin's built-in email features — you can start creating email accounts right away without any additional DNS setup.
Switching MX to Google Workspace
If you want to use Google Workspace (formerly G Suite) for your business email, you need to replace your existing MX records with Google's official MX entries. Delete all existing MX records first, then add the following five records:
- Priority 1: ASPMX.L.GOOGLE.COM
- Priority 5: ALT1.ASPMX.L.GOOGLE.COM
- Priority 5: ALT2.ASPMX.L.GOOGLE.COM
- Priority 10: ALT3.ASPMX.L.GOOGLE.COM
- Priority 10: ALT4.ASPMX.L.GOOGLE.COM
After saving, allow 24–48 hours for DNS propagation. Your domain email will then be handled entirely by Gmail/Google Workspace while your website continues to be hosted at AsiaGB.
Switching MX to Microsoft 365
To route your domain email through Microsoft 365 (Outlook for Business), you will need to add Microsoft's MX record. The exact hostname is unique to your Microsoft 365 tenant, but the general format is:
- Priority: 0
- Mail Server: yourdomain-com.mail.protection.outlook.com
You can find the exact MX record value in your Microsoft 365 Admin Center under Settings → Domains → DNS Records. Delete your current MX records in DirectAdmin and add the Microsoft record. Allow 24–48 hours for propagation.
Understanding Priority (Preference) Values
Every MX record has a priority number (also called preference). Lower numbers indicate higher priority — the sending mail server will always try to deliver to the lowest-priority (numerically smallest) MX record first. If that server is unavailable, it tries the next one in ascending order.
- Priority 0 or 1: Primary mail server — handles all mail first.
- Priority 5–10: Secondary/backup servers — used only if higher-priority servers are unreachable.
For single-server setups (like AsiaGB's default), one MX record at priority 10 is sufficient. For external services like Google Workspace, follow their exact priority specifications.
What TTL to Set
TTL (Time to Live) controls how long DNS resolvers cache your MX record before checking for updates. A lower TTL means changes propagate faster but creates slightly more DNS query load. For most purposes:
- Normal operation: 14400 (4 hours) or 3600 (1 hour) is fine.
- Before making changes: Lower the TTL to 300 (5 minutes) at least 24 hours before you plan to make changes, so the switch happens faster when you update the record.
Setting Up MX for Zoho Mail
Zoho Mail offers a free plan for custom domain email, making it a popular choice for small businesses that want professional email addresses without a monthly fee. To route your domain email through Zoho, replace your existing MX records with the following entries:
- Priority 10: mx.zoho.com
- Priority 20: mx2.zoho.com
- Priority 50: mx3.zoho.com
As always, verify the current MX record values in your Zoho Mail Admin Console before making changes, as cloud providers occasionally update their mail server addresses.
Troubleshooting Email Delivery Problems Caused by Incorrect MX Records
If email is not being delivered after configuring your MX records, the quickest way to diagnose the problem is to check what your MX records actually say from the outside — independent of what you see in DirectAdmin.
Checking with dig (Linux / macOS)
dig MX yourdomain.com +short
This command shows the MX records currently returned by DNS. Compare the output with what you entered in DirectAdmin. If they do not match, either the change has not propagated yet or there is a typo in the record.
Checking with nslookup (Windows)
nslookup -type=MX yourdomain.com
Common MX Record Mistakes
- Pointing to an IP address instead of a hostname — MX records must always point to a hostname, never an IP address directly.
- Conflicting MX records not removed — If you add Google Workspace MX records but forget to delete the old ones, email may split between the old and new servers.
- Judging too early — DNS propagation can take up to 48 hours. Wait at least 24 hours before concluding there is a problem.
- Port 25 blocked — Some networks block outbound SMTP (port 25). Check with your hosting provider that the required mail ports are open.
- Trailing dot missing — Some DNS management panels require hostnames to end with a trailing dot (e.g.,
mail.yourdomain.com.). Check DirectAdmin's interface requirement.
Online tools like MXToolbox (mxtoolbox.com) are invaluable for verifying MX records from multiple global locations simultaneously and checking whether your mail server responds correctly on port 25.
DNS Propagation Time
After you save changes to your MX records in DirectAdmin, those changes need time to propagate across DNS servers worldwide. This process typically takes 2–24 hours for most resolvers, but in rare cases can take up to 48 hours. During propagation, some email may still be delivered to the old server — this is normal and temporary. You can check propagation status using tools like MXToolbox (mxtoolbox.com) or DNSChecker (dnschecker.org).
Important: After changing your MX records — whether switching to Google Workspace, Microsoft 365, or any other provider — allow 24–48 hours for full DNS propagation before assuming there is a problem. During this window, email may be intermittently delivered to either the old or new mail server. Do not delete your old email accounts until you have confirmed the new MX records are fully propagated and mail is being received correctly.
Hosting with Custom MX Record Support
AsiaGB hosting gives you full DNS control — easily switch your MX records to Google Workspace, Microsoft 365, or any mail provider you choose.
View Hosting Plans