Understanding how to set up MX records is crucial for email deliverability and overall functioning of your outreach campaigns.

In this article, you'll find out how to configure MX records for different domain and email providers, as well as see a real life domain's MX records example.

Let's crack on!

What is a DNS MX record for email?

A DNS MX record helps tell providers which mail servers accept incoming mail for your domain and where should they be routed to. Without MX records, you won't receive emails as they have no way in.

What type of information is contained in a dns MX record?

A dns MX record consist of priority/preference, hostname, and IP address.

The priority or preference indicate which mail server is going to be used if multiple MX records exist. As you can see, we have three here.  A mail server trying to send an email to you will always try the lowest number priority first!

If two or more MX records tie for lowest Preference value, then the sending mail server randomly picks one for the first delivery attempt.

A hostname and IP simply indicate to what domain emails will be sent to.

How do MX records work?

To understand what is a DNS MX record and its purpose, think about it as an address to your place. In order for your guests to come, they first need to know where are they going.

In a similar fashion, MX records allow other emails to know your "inbox address" and they continue to pass that information to all incoming messages.

MX records example

Here's an existing MX records example from lemlist:

MX records example

To find out your MX records and whether or not you have it set up, you can use this tool.

Guide: Check if you have MX records up and running

If you see this, everything is ok with your MX set up:

But if you see this, you need to set up your MX record:

Here’s how to setup MX records

We've organized all tutorials in two groups: Google and Microsoft Office. No matter which email service provider you use, we got you covered.

Google setup

  • General set up (all domain providers)
  • Google with Namecheap
  • Google with Cloudflare
  • Google with Bluehost

Microsoft Office setup

  • General set up (all domain providers)
  • Microsoft with Namecheap
  • Microsoft with Cloudflare
  • Microsoft with Bluehost

Google MX records setup example

If you're using Google... Gmail and GSuite/Google Workspace to be exact, you have an abundance of tutorials at your disposal.

We have a few of the most requested below.

How to set up MX records - for all domain providers

There are different settings for different hostings. For some you need to create MX records manually, in some cases you can do it much easier.

In order to find a better set up for your host - pick your host here and follow the steps there.

How to setup MX records on Google for Namecheap

Now we come to MX record. In most cases you'd need to delete and create MX record manually, but if you use Namecheap, you can do it with just a few clicks:

  1. Go to Advanced DNS settings
  2. Scroll to Mail Settings
  3. Choose "Gmail"
  4. Save it!

How to create a MX records for Google and Cloudflare

We'll need to create MX records manually:

  1. Log in to Cloudflare
  2. Go to Domain list and choose your domain
  3. Go to DNS
  4. Click on "Add new record"
  5. Choose MX record
  6. Put @ in "Name"
  7. Put ASPMX.L.GOOGLE.COM in Mail Server
  8. Choose priority = 1

You should also create 4 more MX records with "@" in Name but different Mail Servers and Priorities :

ALT1.ASPMX.L.GOOGLE.COM priority = 5

ALT2.ASPMX.L.GOOGLE.COM priority = 5

ALT3.ASPMX.L.GOOGLE.COM priority = 10

ALT4.ASPMX.L.GOOGLE.COM priority = 10

Save it!

Google (Gsuite) domain verification for Bluehost

We'll need to create MX records manually:

  1. Log in to Bluehost
  2. Go to Domain list and choose your domain
  3. Go to DNS
  4. Click on "Add new record"
  5. Choose MX record
  6. Put @ in "Name"
  7. Put ASPMX.L.GOOGLE.COM in Mail Server
  8. Choose priority = 1
setup MX records

You should also create 4 more MX records with "@" in Name but different Mail Servers and Priorities :

ALT1.ASPMX.L.GOOGLE.COM priority = 5

ALT2.ASPMX.L.GOOGLE.COM priority = 5

ALT3.ASPMX.L.GOOGLE.COM priority = 10

ALT4.ASPMX.L.GOOGLE.COM priority = 10

Save it!

Microsoft Office MX records setup example

If Microsoft Office 365 is your email provider choice, we got your back.

How to set up MX records - for all domain providers

During the initial set up, you'll be able to add DNS records. Just create records that Microsoft suggested

setup MX records

Don't do that if:

  1. You need custom DNS routing for your email, for example, to route traffic through an external spam filtering service
  2. You're already using ‎Exchange‎ on-premises as well as ‎Exchange Online‎ (also called a hybrid deployment)

How to set up MX records on Microsoft Office 365 for Namecheap

Now we come to MX record. In most cases you'd need to delete and create MX record manually, but if you use Namecheap, you can do it with just a few clicks:

  1. Go to Advanced DNS settings
  2. Scroll to Mail Settings
  3. Create MX record
  4. Save it!
how to setup MX records

You can take this MX record from Microsoft during your initial set up:

how to setup MX records

How to configure MX records for Microsoft Office 365 and Cloudflare

Now we come to MX record. In most cases you'd need to delete and create MX record manually, but if you use Namecheap, you can do it with just a few clicks:

  1. Go to Advanced DNS settings
  2. Scroll to Mail Settings
  3. Create MX record
  4. Save it!
how to setup MX records

You can take this MX record from Microsoft during your initial set up:

how to setup MX records

How to add MX records for for Microsoft Office 365 and Bluehost

Now we come to MX record. In most cases you'd need to delete and create MX record manually, but if you use Namecheap, you can do it with just a few clicks:

  1. Go to Advanced DNS settings
  2. Scroll to Mail Settings
  3. Create MX record
  4. Save it!
how to setup MX records

You can take this MX record from Microsoft during your initial set up:

how to setup MX records

Key takeaways

  • Setting up MX record means allowing for emails to come to your inbox in the first place
  • The setup of MX records is not difficult as long as you have a tutorial to follow - anybody can do it
  • Need a tutorial for a different domain provider? Go here
  • Can't figure out what is your domain host? Click here

☝️ Once you configure your MX records, job is not done. We have to set up DKIM next.

How-to: DKIM setup tutorials

Complete guide: How to audit of your email sending reputation