deliverability

How to set up MX records & what they are for (with examples)

lemlist team
Last Update
Jan 23, 2024
Reading Time
7 min.

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

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.

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 they should 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 indicates which mail server is going to be used if multiple MX records exist.

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 ‌a DNS MX record is 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 they are 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:

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 into two groups: Google and Microsoft Office. No matter which email service provider you use, we got you covered.

Google's 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 Workspace 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

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

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 the MX record. In most cases you'd need to delete and create an 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!

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

How to configure MX records for Microsoft Office 365 and Cloudflare

Now we come to the MX record. In most cases you'd need to delete and create an 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!

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

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

Now we come to the MX record. In most cases you'd need to delete and create an 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!

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

Key takeaways

  • Setting up your MX record means allowing for emails to come to your inbox in the first place
  • The setup of MX records isn't 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‌ is? Click here

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

lemlist team
Your source of actionable outreach tips and strategies that will help you get replies and grow your business.

What you should look at next

Receive weekly outreach tips in your inbox, sent to 210 000+ salespeople, marketers, founders, and entrepreneurs worldwide!

Subscribe to the lemlist newsletter
You've successfully subscribed to the lemlist newsletter!
Oops! Something went wrong while submitting the form.