Mastering MX Records: A-Z Setup Guide

Mastering MX Records: A-Z Setup Guide

Vladyslav Podoliako
May 09, 2023
Reading duration
10 min

With 347.3 billion emails sent every day, email outreach has become an indispensable tool for effective communication. Missed emails can result in missed opportunities, and that makes it imperative to ensure their seamless delivery.

The MX record configuration plays a vital role in its success. The MX records act as gatekeepers that direct emails to the right destination. It's just like mail carriers in a bustling city. Failure to set up your MX records correctly can cause your emails to get lost in transit.

The good news is that understanding and managing MX records doesn't have to be intimidating. With this comprehensive guide, you will be equipped to master MX records, monitor them, and understand their role in email deliverability.

So, buckle up and get ready to dive into the world of MX records.

The Article Walkthrough:

What Is a DNS MX Record for Email?

DNS MX (Domain Name System Mail Exchange) records are essential components that direct emails to the correct server. A domain name can have multiple MX records (just with different priorities), which play a crucial role in email deliverability.

The essential functions of MX records include:

  • Ensuring successful and safe sending and receiving of emails (make sure also to set up SPF record).
  • Delivering emails to the appropriate mail server (learn more about POP3 vs IMAP protocols).
  • Distributing mail evenly across multiple servers when needed and finding alternative routes when necessary.

In essence, properly configured MX records are fundamental for maintaining effective email communication and ensuring flawless deliverability.

How Do MX Records Work?

MX records work in tandem with SPF, DKIM, and DMARC records, authenticating the domain you send emails from. If you ask yourself "Why my emails are going to spam?" there are strong chances you miss one of these.

It all starts with someone sending you an email.

  1. First, a sender hits send, and their email client passes the message onto an email server. 
  2. Next, the message transfer agent (MTA) sends a DNS query to identify your (the recipient's) MX record.
  3. The MX record does its thing, identifying the server and establishing an SMTP (Simple Mail Transfer Protocol) connection with the destination mail server.
  4. And finally, you receive an email.

1 Pict

However, it's not always that simple. The following scenarios might happen:

  1. If your MX records aren’t pointing to the correct location, you won’t receive emails.
  2. If all of your domain’s mail servers are down, there will be delays in receiving emails. 

But! Most emails will simply be queued and re-sent once your mail servers are back online.

When it comes to the number of email servers for an MX record, the more, the merrier. Why? Because having more MX records creates redundancy, the process of MX records pointing to other mail servers when one is down. It is a good thing to avoid delays. 

You can load-balance your email traffic across multiple servers. This boosts the chances of emails coming through to your inbox, as there are more destinations available.

The Structure of an MX Record: Hostname, Type, TTL, Priority, and Value

For the visual learners, here’s a Google MX record example below:

2 Pict

Now, let’s take a closer look at every component of the MX record.


This one’s easy. It’s the domain name of the mail server.

There are the following options to fill in Hostname in the MX record:

  1. Write your domain name (e.g.
  2. @
  3. Leave blank*
    *Your domain name will be automatically appended to your name if you leave it blank. For most MX record configurations, the name is left empty.


The “Type” field of an MX record, just like any other DNS record, denotes what it is.

TTL (Time To Live)

The “TTL” field represents how long it takes for changes to your MX record to take effect. It’s measured in seconds, and the industry standard is 3600, which tells servers to check every hour for an updated record (60 seconds is 1 minute, 1800 seconds is 30 minutes, etc.).

How can you choose the right one? The industry standard is 3600

However, if your systems have a static IP, the TTL should be 1800 or higher (note that a very high TTL can lead to downtime when you must switch your IPs fast). 

If your system has a dynamic IP, the TTL should be 1800 or less.

(Also, we recommend learning more about shared IP vs dedicated IP)


With MX records, the “Priority” field signifies the order in which emails should be delivered to mail servers. The mail server with the lowest value will first be used to have the email delivered. If the priority record is the same, mail flows evenly between them.

This helps balance the load of emails being received and increases the chances of deliverability, as discussed earlier.


Finally, the “Value” field of an MX record is the name of your mail server and the destination of incoming emails. Unlike other DNS records, the MX “Priority” field can be combined with the “Value” field.

Note! You should add the dot at the end of your custom domain name in this field. Otherwise, if it does not end with a dot, the domain name will be automatically appended to your value.

MX Records Setup: How To Configure MX Records

When it comes to MX record configuration, the process is similar for most email service providers. Let’s explore two of the most popular providers, Google and Microsoft Office, and explain how to set up MX records for them.

Gmail MX record setup

When setting up MX records in Google, simply follow the below steps.

  1. Head to, click “Domains” in the “Admin Console,", and then click “Manage Domains.” 
  2. Highlight a verified domain and select “Set up Google MX Records."
    Before moving on to step 3, ensure that MX records from other providers are deleted. This ensures mail only comes through to your Gmail address. The rule applies when entering new MS records for any email provider, not just Google.
  3. Next, log in to your DNS server (wherever you host your domain) and click the “DNS settings” link. 
  4. Click “Add Record”, select “MX” in the “Type” field, and enter the @ symbol in the “Name” field, which is a shortcut to your root domain.
  5. Copy your MX Server address from your Google Admin page, including the dot at the end of the MX record address. Keeping the dot is essential for Google, and failing to do so will mean your MX record settings won’t be properly updated.
  6. Paste your MX Server address into the “Mail Server” field, and select “auto” or enter 3600 into the TTL value, which is what Google recommends.
  7. Go back to Google Admin, and paste the priority value that corresponds to the MX server address you selected.
  8. Hit save, and you’re done!

Repeat this process for all other MX records, and you’ll have mastered the art of MX record setup for Gmail.

Microsoft Office MX record setup

Microsoft Office MX record configuration, next, which isn’t too dissimilar to Google and, honestly, all other providers.

  1. Kick things off by signing in to your Microsoft 365 admin center, and in settings, locate and click “Domains.”
  2. Open another tab and sign into your DNS hosting provider, and in settings, find the option for managing your DNS settings.
  3. To alter MX record settings, enter the MX record in your Microsoft 365 admin center for your domain, which must have the following values:
    Image4 (1)
    In this example MX record, “Priority” is 0 as there is only one email server for this particular domain. If you have more than one email server, you can duplicate the method with different “Priority” values. 
  4. To ensure a successful MX record setup, launch the command prompt by hitting the “Windows” button and “R” on your PC.
  5. Perform a "nslookup” query by typing nslookup in the dialogue box, and hitting enter.
  6. Type “set q=max” (without the quote marks), hit enter, and type in the name of your domain. If the command box looks like the one below, but with your domain name, call it a job well done.

Check your Microsoft Domain tab and your MX records will be updated with a green tick and “OK” by your domain. 

Creating an MX Record using Namecheap & cPanel

When it comes to MX record configuration for Namecheap and cPanel, the process is similar to Google and Microsoft. 

Let’s start with NameCheap.

  1. For MX record configuration with NameCheap, start by selecting the “Domain List” option from your left sidebar. 
  2. Next, click “Manage” on the domain you want to update, and head to “Advanced DNS Settings”.
  3. Finally, head to “Mail Settings” at the bottom of that page. 
  4. To set up an MX record using cPanel’s webmail service, select “Custom MX”.
  5. Add your details into the corresponding fields, with @ in "Host", and your email hosting provider in "Value" (following the format of “”), with “Priority” set at 10.

Click “Save all changes”, and you’re good to go. 

Setting up MX records in cPanel is just as simple, and the process starts when you:

  1. Access “Zone Editor” from the “Domains” section of your cPanel account. 
  2. Click your domain, and you’ll see all the DNS records listed for it.
  3. Hit the blue “add record” button and choose “MX” in the “Type” field.
  4. Once the box appears, select a low-priority value and a domain or subdomain you own.
  5. Next, you click the “Add Record” button.

It may take up to 30 minutes for things to start working, but you’re done!

Monitoring and Analyzing MX Records With Tools

There are lots of tools available for monitoring and analyzing MX records. Below are some of the most effective, and will help you ensure optimal email performance.


MXToolBox is an incredibly popular tool used across the world for keeping your MX records intact. It checks your MX records in priority order and alerts you to changes instantaneously. 

MXToolBox also has a range of diagnostic tools available, which can verify problems with your DNS records and help you rectify them.



Another popular tool is DNSChecker, which offers a huge range of functions for monitoring and optimizing your DNS records. When it comes to MX records, DNSChecker allows you to look up any MX record of any domain in an instant. 

It’ll give you information regarding the domain itself, IP addresses associated with that email server, and an IP blacklist checker that trawls anti-spam databases to check whether or not the IP in question is blacklisted (read more on blacklist outlook policies).

Troubleshooting Tips on MX-Related Issues

What to do if I keep having trouble with my email delivery?

  • Check how many MX records you have and what their priority is. For example, if your new ESP has higher priority (10, 20, and higher), emails will be delivered to domains with lower priority (5 or 0).
  • Make sure the MX records of the previous ESP have been removed.
  • Make sure the 'Local email delivery' option is not active in the website DNS configuration settings.
  • Update the Incoming and Outgoing Email server settings for email clients, such as Outlook/ Thunderbird/ iPhone/ Android mobile devices.
  • Opt for a Remote Email Server instead of Local Email Delivery in the website hosting settings because sometimes, ESPs send the messages locally if the website domain name and the email address are the same (as often happens with website contact forms).
  • Follow the instructions for your domain provider, as the terminology and requirements may differ. Otherwise, you punch in incorrect values, and your configuration of the MX records isn’t working.
  • Don’t make TTL values too big. Normally, the TTL doesn’t go over 24 hours (86400s). An hour (3600s) is an average TTL. If there’s no effect after 24 hours, check out the TTL and reconfigure the MX records again.
  • Make sure that you add the MX records to the provider where the Nameservers are pointed to avoid DNS Provider-Registrar conflict. First, find your domain’s ‘NameServer’ and see where it’s pointed. Then use that information when setting up the MX records.

Conclusion: What Matters Most Is Dedicated DNS Settings Monitoring

The world of MX record settings and DNS record settings can seem daunting, but it holds the key to unlocking the full potential of your campaigns. 

Embrace the power of efficient monitoring and witness the transformation it brings to your email deliverability. If you struggle to understand how to test email deliverability alone, with the expert guidance offered by Folderly's professional email deliverability consultants, you're not alone on this journey. These dedicated trailblazers in the field of email delivery empower you with in-depth domain analysis, cutting-edge authentication improvements, and forward-thinking strategies. 

Embark on this inspiring quest to harness the true power of DNS settings monitoring and elevate your campaigns to unprecedented heights. The future of email deliverability awaits—grasp it with dedication, passion, and the support of experts who share your vision.

Vladyslav Podoliako
Vladyslav Podoliako
Founder & CEO
Vlad is a Founder & CEO of Belkins and Folderly, a series entrepreneur and investor with over ten years of management expertise in companies with 100 million evaluation. Vlad has years of experience building and growing service companies and SaaS startups in SalesTech and MarTech. He is skilled in creating successful businesses from the ground up and building top-notch teams that drive all ventures to the top of their industries.

Also you may like