How to Set Up MX Records in DirectAdmin

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)

  1. Log in to DirectAdmin and go to Advanced Features or DNS Management.
  2. Click on DNS Management (or DNS Records).
  3. Scroll down to the MX Records section. You will see the current MX entries for your domain.
  4. To add or edit a record, click the Add button or click on an existing record to modify it.
MX Records page showing domain email routing records
MX Records page showing domain email routing records
Click Add (circled) to add a new MX record
Click Add (circled) to add a new MX record

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:

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:

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:

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.

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:

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:

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

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