MX Record - Email Configuration

Direct your emails to the right servers with MX records.

The MX (Mail Exchanger) record is the pillar of your email infrastructure. It tells email servers worldwide which server to send emails destined for your domain to. Without a properly configured MX record, no email can reach you.

Unlike A records that handle web traffic, MX records exclusively handle email traffic. A domain can have its website on one server and its emails on another (Gmail, Office 365, dedicated email server). MX configuration enables this separation.

Monitoring MX records is critical for your professional communication continuity. An unauthorized change can redirect all your emails to a malicious server. MoniTao alerts you instantly if your MX records are modified.

What is an MX Record?

The MX record defines the servers responsible for receiving emails for a domain:

Why MX Records are Critical

Emails are often the lifeblood of businesses:

How to Configure MX Records

Here's how to properly configure your MX records:

  1. Identify your email servers: Get the MX server addresses from your email provider (Gmail, Office 365, host, etc.). They usually provide a list with recommended priorities.
  2. Create the records: In your DNS manager, add an MX record for each server. Use @ or leave the hostname blank for the root domain.
  3. Set priorities: Assign priorities according to your provider's instructions. Typically: 10 for primary, 20 for secondary, etc.
  4. Verify propagation: Use dig MX example.com or online tools like MXToolbox to verify your MX records are properly configured and propagated.

MX Configuration Examples

Here are common MX configurations:

; Google Workspace configuration
example.com. IN MX 1  ASPMX.L.GOOGLE.COM.
example.com. IN MX 5  ALT1.ASPMX.L.GOOGLE.COM.
example.com. IN MX 5  ALT2.ASPMX.L.GOOGLE.COM.
example.com. IN MX 10 ALT3.ASPMX.L.GOOGLE.COM.
example.com. IN MX 10 ALT4.ASPMX.L.GOOGLE.COM.

; Microsoft 365 configuration
example.com. IN MX 0 example-com.mail.protection.outlook.com.

; Dedicated server with backup
example.com. IN MX 10 mail.example.com.
example.com. IN MX 20 backup-mail.example.com.

; Verification with dig
$ dig example.com MX +short
10 mail.example.com.
20 backup-mail.example.com.

Note the trailing dot after domain names in the DNS zone. The lowest priority is tried first. Multiple servers with the same priority are used in round-robin.

MX Best Practices

Optimize your MX configuration:

Email Configuration Checklist

  • MX records configured according to provider instructions
  • At least one backup MX server configured
  • Priorities correctly defined
  • SPF configured to authorize your sending servers
  • DKIM enabled for email signing
  • MoniTao monitoring enabled for MX

Frequently Asked Questions - MX Records

Can I have an MX pointing to an IP address?

No, MX records must point to a domain name, not an IP. This domain name must then have an A (or AAAA) record that resolves to the email server's IP.

What does an MX priority of 0 mean?

Priority 0 is the highest possible priority. This server will always be contacted first. It's often used by Microsoft 365 which has only one MX record.

How long are emails retried if my MX servers are down?

Most email servers retry for 4-5 days (configurable). During this period, emails are queued. After this delay, they are returned to the sender with an error message.

Do subdomains inherit MX records from the parent domain?

No, MX records are not inherited. If you want to receive emails on subdomain.example.com, you must create specific MX records for that subdomain.

How does MX round-robin work?

If multiple MX servers have the same priority, sending servers randomly choose among them. This allows basic load balancing between equivalent servers.

My email stopped working after MX change, why?

Several possible causes: incomplete DNS propagation (wait 24-48h), MX record pointing to a domain without an A record, or misconfigured email server. Verify each step with dig and test send/receive.

Secure Your Email Infrastructure

MX records are the backbone of your email communications. Incorrect configuration or a malicious change can have disastrous consequences for your business: lost emails, intercepted communications, ruined email reputation.

Configure your MX records according to best practices, add redundancy, and monitor them continuously with MoniTao. Your email is too important to be left unmonitored.

Ready to Sleep Soundly?

Start free, no credit card required.