MX Records Explained: How They Work & Setup Guide

Email DeliveryNov 27, 20257 min read

If you're wondering what an MX record is or how to configure MX records correctly, you're not alone. MX records (Mail Exchange records) are a critical part of DNS that determine how emails are routed to your domain. Misconfigured MX records are one of the most common causes of email delivery failures, leading to bounced emails, lost messages, and disrupted communication. In this guide, you'll learn exactly how MX records work, how to set them up step by step, and how to avoid common mistakes that affect email deliverability.

What Is an MX Record and How Does It Guide Email Delivery?

An MX record is a type of DNS record that specifies which mail servers are responsible for receiving emails for a domain. Every domain that receives emails must have at least one MX record. Without MX records, email servers will not know where to deliver messages, resulting in email bounces or lost communications.

guide email delivery

Key Functions of MX Records

  • Email Routing: MX records direct emails to the correct server, whether it’s Gmail, Microsoft 365, or a private mail server.
  • Backup Servers: MX records use priority values. The server with the lowest number is the primary, and higher numbers are backups. This ensures continuity if one server goes down.
  • Spam Filtering Support: Proper MX configuration also improves email authentication with SPF, DKIM, and DMARC, reducing the risk of emails being marked as spam.

How MX Records Work

When someone sends an email to your domain:

1.The sender’s email server queries the DNS for your MX records.

2.It identifies your primary mail server using the priority value.

3.If the primary server fails, it tries the next MX record based on priority.

Example:

  • Priority 10: mail.primaryserver.com
  • Priority 20: mail.backupserver.com

Emails first try the primary server (priority 10). If it fails, the backup server (priority 20) receives them.

How to Find MX Records

Before making changes, check your existing MX records. This helps prevent conflicts and downtime.

  • 1

    Using Command Line

    • Windows: Open Command Prompt and run:nslookup -type=mx yourdomain.com
    • Linux/macOS: Open Terminal and run: dig mx yourdomain.com

    These commands list all MX records and their priorities for your domain.

  • 2

    Using Online Tools

    • MXToolbox: Provides global MX record lookup and alerts.
    • Google Admin Toolbox: Checks Gmail MX records.
    • DNSChecker: Confirms MX propagation across multiple servers worldwide.
  • 3

    Email Provider Documentation

    Popular email providers, such as Gmail or Outlook, list required MX records in their documentation. Always copy the values exactly to avoid errors.

    Example Gmail MX 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

Configuring MX records correctly is the backbone of email delivery. Even small mistakes can cause bounced emails or communication delays.

The 5-Step Guide to Set Up and Configure MX Records

This is the core section for anyone managing email infrastructure. Follow this step-by-step guide to set up MX records accurately, ensure redundancy, and verify successful propagation.

step by step guide to set up mx records

Step 1: Pre-Configuration Planning and Preparation

Before touching your DNS, thorough preparation ensures a smooth setup.

1. Inventory Current Email Infrastructure

  • List all current email services for your domain, including primary and secondary mail servers.
  • Document any third-party email services, like marketing platforms, automated notifications, or backup servers.
  • Note existing MX records and priorities to compare after configuration.

Tip: Maintaining a clear inventory helps avoid conflicts when adding new MX records.

2. Choose Your Email Service Provider and Obtain MX Record Details

  • Decide on the primary email provider (e.g., Gmail, Microsoft 365, Zoho, or a private server).
  • Obtain their exact MX record values from official documentation.
  • Ensure you have information on priority numbers, hostnames, and TTL values.

Example: Gmail’s primary MX record is ASPMX.L.GOOGLE.COM with priority 1, followed by backups with higher priority numbers.

3. Establish a Maintenance Window and Communicate Changes

  • Schedule changes during periods of low email traffic to minimize disruption.
  • Notify your team about potential downtime.
  • Keep backup access credentials ready in case you need to revert changes.

Step 2: Accessing and Navigating DNS Management

MX records are managed in your domain’s DNS settings. Proper access and navigation prevent errors.

1. Identify Your DNS Hosting Provider

  • Determine where your domain’s DNS is hosted (e.g., GoDaddy, Cloudflare, Namecheap, AWS Route 53).
  • Some domains use different providers for DNS and domain registration. Verify the correct DNS host.

2. Securely Access the DNS Management Console

  • Log in using your provider’s portal.
  • Use multi-factor authentication for security.
  • Keep backup credentials in a secure location.

3. Locate Existing MX Records

  • Review all current MX records.
  • Take screenshots or notes to restore records if needed.
  • Identify outdated or conflicting MX entries that may need removal.

Step 3: Configuring MX Records with Precision

Accuracy in this step is critical to avoid email delivery issues.

1. Remove or Disable Outdated MX Records

  • Delete old MX entries that are no longer valid.
  • Retain temporary backup if needed until new records propagate.
  • Avoid having multiple conflicting MX records with the same priority.

2. Input New MX Record Values Accurately

When adding new MX records, fill in every field carefully:

Field Example Notes
Name / Host @ or yourdomain.com @ usually represents the root domain
Record Type MX Select MX from the dropdown
Priority / Preference 10, 20, 30 Lower numbers have higher priority
Target / Value mail.primaryserver.com Exact hostname from your provider
TTL 3600 seconds (1 hour) Time until DNS refreshes

Tips:Copy hostnames exactly as provided. A single typo can stop emails from arriving.

3. Add All Required MX Records

  • Most providers require primary and backup MX records for redundancy.
  • Assign unique priority values to ensure failover works correctly.

Step 4: Validation and Propagation Verification

After saving MX records, you need to confirm they work globally.

1. Save Changes and Initiate Propagation

  • Click Save, Update, or Apply Changes in your DNS console.
  • Propagation usually completes in 24–48 hours, depending on TTL and global DNS caching.

2. Use Multiple DNS Lookup Tools to Verify

  • Verify your MX records from different global locations:MXToolbox,DNSChecker,Google Admin Toolbox .

3. Conduct End-to-End Email Testing

  • Send test emails from external accounts (e.g., Gmail, Outlook) to your domain.
  • Check if emails arrive correctly in inbox, spam, or fail.
  • Test both primary and backup MX records by temporarily disabling the primary server (if safe).

Step 5: Post-Configuration Monitoring and Optimization

Even after propagation, monitoring ensures consistent email delivery.

1. Monitor Email Delivery Metrics

  • Track bounce rates, delayed emails, and spam placement.
  • Monitor for 7–10 days to catch early issues.

2. Set Up DNS Monitoring Alerts

  • Configure alerts if MX records change unexpectedly.
  • Tools like MXToolbox or DNSChecker can notify you of failures or tampering.

3. Document the Final Configuration for Future Reference

  • Keep records of all MX entries, priorities, hostnames, and TTL values.
  • Include notes on backup servers and expected propagation times.
  • Documentation helps during audits or troubleshooting.

Pro Tips for Reliable MX Record Setup

  • Always add new MX records before removing old ones.
  • Keep at least one backup MX record to prevent email loss.
  • Regularly test email delivery after significant DNS changes.
  • Ensure SPF, DKIM, and DMARC records align with your MX configuration.

MX Record Troubleshooting: Fix Email Delivery Issues

Even with correct MX records, email delivery problems can still happen. This section covers the most common MX record errors and explains how to fix them step by step. Whether emails are bouncing, delayed, or not arriving at all, these troubleshooting methods will help you identify and resolve the issue quickly.

Emails Not Receiving After MX Record Update

One of the most common problems occurs right after updating or adding MX records. You make a change, wait a few minutes, and then realize no emails are coming through. Before assuming the configuration is wrong, consider these three factors.

DNS Propagation Time

DNS changes do not happen instantly. When you update an MX record, it takes time for the new information to spread across DNS servers worldwide. In most cases, propagation completes within 24 to 48 hours. Some providers show changes faster, but you should always allow at least one full day before testing email delivery again.

If you need to check whether your MX records have propagated, use an online DNS lookup tool or run a command line query from a different network.

Incorrect TTL Settings

TTL (Time to Live) controls how long DNS resolvers cache your records. If your previous MX record had a high TTL value, such as 86400 seconds (24 hours), DNS servers will continue using the old record until that cache expires. To speed up future changes, set your TTL to a lower value (for example, 300 or 600 seconds) before making updates.

Wrong Record Type or Value

MX records must point to a fully qualified domain name (FQDN), not an IP address. A common mistake is entering an IP like 192.168.1.1 instead of a hostname like mail.example.com. Double-check your DNS panel to make sure the record type is set to MX and the value is a proper hostname.

MX Record Priority Conflicts

MX records use priority values to determine which mail server receives email first. Lower numbers mean higher priority. When these values are configured incorrectly, email routing fails or behaves unpredictably.

Understanding Priority Values

A typical MX setup looks like this:

  • mail.primary.com — Priority 10
  • mail.backup.com — Priority 20

In this example, sending servers always try mail.primary.com first because it has the lower number. Only if that server is unavailable will they attempt delivery to mail.backup.com.

Common Priority Mistakes

  • Using the same priority for all MX records, which causes random routing instead of planned failover
  • Setting backup server priority lower than the primary (for example, 5 for backup and 10 for primary), which reverses the intended order
  • Leaving priority blank, which some DNS panels treat as zero and others reject entirely

Always assign a clear priority order. Start with 10 for your main server, then use 20, 30, and so on for backups.

Invalid MX Record Format

MX records follow a strict format. Small formatting errors can prevent mail servers from reading the record correctly.

FQDN Requirements

The target of an MX record must be a fully qualified domain name. This means it needs a hostname and a domain, such as aspmx.l.google.com. It cannot be a bare domain like example.com unless your provider specifically supports it, and it cannot be an IP address.

The Trailing Dot Issue

In some DNS management panels, MX record values require a trailing dot to indicate the root domain. For example:

  • Correct: mail.example.com.
  • Incorrect: mail.example.com (on systems that require the dot)

Check your DNS provider’s documentation. If you are unsure, test both formats or use an online MX validator to confirm the record is being read correctly.

Spaces and Special Characters

MX records should not contain spaces, underscores, or other special characters in the hostname. Some panels auto-format entries, but manual input can introduce hidden characters that break the record.

SPF, DKIM, and DMARC Conflicts

MX records control where emails are delivered, but they work together with other DNS records to ensure secure and reliable email. When SPF, DKIM, or DMARC records are misconfigured, emails may be rejected even if your MX records are perfect.

SPF Record Conflicts

SPF (Sender Policy Framework) tells receiving servers which IP addresses are allowed to send email for your domain. If your SPF record does not include your mail server’s IP address or includes too many lookups, emails sent from your domain may be marked as spam or rejected.

A basic SPF record looks like this:

v=spf1 include:_spf.google.com ~all

If you recently changed mail providers, make sure your SPF record reflects the new server. Conflicting SPF entries are a common cause of delivery failure after MX record updates.

DKIM and DMARC Alignment

DKIM adds a digital signature to your emails. DMARC tells receivers what to do if SPF or DKIM checks fail. When these records are missing or misaligned with your MX setup, major providers like Gmail and Outlook may refuse to accept your messages.

If you have updated your MX records to point to a new email service, always check whether that service requires specific SPF, DKIM, or DMARC configuration. Many providers give you exact DNS records to add during the setup process.

For a complete overview of email authentication, refer to our guides on SPF records, DKIM setup, and DMARC configuration.

Using Online Tools to Diagnose MX Issues

When manual checks are not enough, online diagnostic tools can give you a clear picture of what is happening with your MX records and overall email configuration.

Recommended Tools

  • MXToolbox: Enter your domain to see all MX records, check DNS propagation, and run blacklist tests
  • Google Admin Toolbox: Google’s own tool for checking MX, SPF, and DKIM records against Gmail’s requirements
  • WhatsMyDNS: Shows how your MX records appear from different locations around the world, which helps confirm propagation status
  • DNSChecker: Tests MX, A, CNAME, and TXT records from multiple global DNS servers simultaneously

What to Look For

When using these tools, focus on the following:

  • Whether your MX records match exactly what your email provider specified
  • Whether the priority values are ordered correctly
  • Whether any duplicate or conflicting MX records exist
  • Whether SPF, DKIM, and DMARC records are present and valid

These tools are especially useful when you have made a change and are waiting to confirm whether the problem is resolved. Run a check, make adjustments, and test again until all records show clean results.

Common Beginner Mistakes to Avoid

Configuring MX records may seem straightforward, but even small mistakes can lead to serious email issues. Many beginners unintentionally disrupt email delivery because they overlook essential best practices. Here are the most common errors and how to avoid them.

1. Deleting Default MX Records Before Adding New Ones

One of the most frequent mistakes is removing existing MX records before adding new ones. This can immediately block all incoming emails to your domain.

Example: If your domain uses Gmail MX records and you delete them without adding the new MX entries, any email sent to your domain will bounce back to the sender.

Tip: Always add new MX records first. Verify they work, then remove outdated or unnecessary records. This ensures uninterrupted email flow.

2. Omitting Backup MX Records

Some beginners only configure a single primary MX record, assuming one server is enough. Without backup MX records, your domain has a single point of failure.

Example:If your primary server goes offline due to maintenance or an outage, all incoming emails will fail until the server is back online. This can lead to missed client communications or lost opportunities.

Tip: Always include at least one backup MX record with a higher priority value. This ensures that if the primary server fails, emails are automatically routed to the secondary server.

3. Ignoring TTL Values During Changes

TTL (Time to Live) determines how long DNS servers cache your MX record information. Beginners often leave TTL at very high values or ignore it during changes.

Example:If the TTL is set to 24 hours and you update your MX records, it may take a full day before global DNS servers recognize the new configuration. Emails could still route to the old server, causing delays or delivery failures.

Tip: When updating MX records, set TTL to a moderate value like 3600 seconds (1 hour). Once changes propagate successfully, you can adjust TTL back to your preferred setting.

4. Entering Incorrect Hostnames or Priorities

A small typo in the mail server hostname or using the wrong priority number can prevent emails from reaching your domain.

Example: Entering mail.google.cm instead of mail.google.com will block all Gmail deliveries. Similarly, assigning equal priority to multiple MX records without understanding failover can lead to inconsistent routing.

Tip: Always copy values directly from your email provider’s documentation and double-check priority numbers.

5. Not Testing After Configuration

Some users assume that saving MX records is enough. Without testing, errors may go unnoticed until emails bounce.

Tip: Send test emails from multiple external accounts (Gmail, Outlook, Yahoo, etc.) to ensure messages arrive correctly. Check spam folders and verify backup servers work by temporarily disabling the primary server if safe.

FAQs

How long do MX records take to propagate?

MX records typically take 24-48 hours to fully propagate across DNS servers worldwide. However, you can often see changes within a few hours using online DNS checking tools.

Can I have multiple MX records?

Yes, you can and should have multiple MX records for redundancy. Use different priority values (e.g., 10 for primary, 20 for backup) to ensure email delivery continues if your primary mail server fails.

What happens if my MX record is wrong?

If your MX record is misconfigured, incoming emails will bounce back to the sender with an error message like "550 Mail delivery failed" or be delayed indefinitely. Outgoing emails are typically not affected by MX record issues.

Do MX records affect email deliverability?

Yes, correct MX records are essential for email deliverability. Without proper MX configuration, receiving servers cannot accept emails for your domain. This directly impacts your sender reputation and email delivery success rate.

Conclusion

MX records are the foundation of email delivery. Even a small misconfiguration can lead to lost emails, failed communication, and damaged sender reputation. By setting up your MX records correctly, verifying DNS propagation, and aligning with authentication protocols, you can ensure reliable and secure email delivery.

Start using Aurora SendCloud today to monitor, optimize, and protect your email infrastructure with real-time insights and intelligent delivery tools.

Related Articles

How Gmail (Gemini) and Apple Mail (Apple Intelligence) Use AI to Read?
Email Delivery
May 27, 2026
7 min read

How Gmail (Gemini) and Apple Mail (Apple Intelligence) Use AI to Read?

Explain how AI summaries work in Gmail and Apple Mail, the key differences between their approaches (pre-open vs post-open), the risks for email senders, and actionable strategies to optimize emails for AI-driven inbox experiences.

How Spam Filters Work: ISP Email Filtering & Inbox Placement Guide
Email Delivery
Jul 2, 2026
16 min read

How Spam Filters Work: ISP Email Filtering & Inbox Placement Guide

Technical guide on how spam filters work. Learn ISP filtering mechanisms, reputation scoring, and AI-powered detection for better deliverability.

Why Gmail Blocks Emails and How to Fix Deliverability Issues
Email Delivery
Nov 28, 2025
5 min read

Why Gmail Blocks Emails and How to Fix Deliverability Issues

Explain the technical and behavioral reasons Gmail blocks or filters emails. Provide actionable strategies to improve sender reputation and inbox placement. Establish expertise in Gmail-specific email deliverability best practices.

Top 6 Transactional Emails Every SaaS Company Should Perfect in 2026
Email Delivery
Nov 27, 2025
10 min read

Top 6 Transactional Emails Every SaaS Company Should Perfect in 2026

Discover the 6 essential SaaS transactional emails for onboarding, retention, and revenue growth.

What Is the Difference Between Email Delivery And Email Deliverability
Email Delivery
Nov 13, 2025
10 min read

What Is the Difference Between Email Delivery And Email Deliverability

Learn the difference between email delivery and email deliverability and how to increase email deliverability to get a better ROI.

Blast Email vs Bulk Email: Differences & Personalization
Email Delivery
Apr 27, 2026
7 min read

Blast Email vs Bulk Email: Differences & Personalization

A clear comparison between blast email and bulk email, with actionable strategies for personalization and 2026 best practices to improve engagement and deliverability.