How to set up MX records: A 12-minute guide with examples
Ivona
Last updated on: September 4, 2026
|17 min read
Haven’t set up your MX records yet?
Forget about creating the perfect campaign and booking meetings.
Without MX records, you won’t receive the replies. And without replies… well, your outreach pipeline grinds to a halt.
I’ve seen teams spend weeks perfecting their sequences and copy, only to realize their DNS was misconfigured. All that effort, zero replies landing in their inbox. It’s a painful mistake, and it’s completely avoidable.
In this guide, I’ll walk you through exactly how to set up MX records for your domain, across every major registrar (Namecheap, Cloudflare, Bluehost, GoDaddy, and AWS Route 53), for both Google Workspace and Microsoft 365.
What are MX records?
MX records tell sending servers where to route incoming email. More specifically, MX records specify the receiving email server for a domain.
For small businesses, your hosting or domain provider usually supplies MX records. You only need to worry about them when changing providers.
Here’s a more elaborate explanation of what MX records are.
Your domain is like your home address, but it doesn’t necessarily have a built-in mailbox (mail server).
Instead, you use a mail provider like Gmail to receive emails.
MX records tell the internet where to send your emails, directing them to the right mail server. Without MX records, incoming emails wouldn’t know where to go.
Why you need DNS MX records
DNS MX (Mail Exchange) records are essential for your cold outreach campaigns. Here’s why.
MX records tell other mail servers where to deliver emails sent to your domain. Without correct MX records, emails sent to your domain (e.g., sales@example.com) would not know where to go, leading to non-delivery. That’s the most basic function: routing incoming email to your mail server.
Setting up your MX records also helps maintain your outgoing email deliverability. Email servers use MX records to check if your domain can receive email. When set up right, it shows other mail servers that your domain is legitimate and trustworthy. If your MX records are missing or wrong, it can affect the deliverability of your outgoing emails. Your emails could end up in recipients’ spam folders or bounce back. Getting your DNS infrastructure right first protects your sender reputation before you ever hit “send” on a campaign. For a deeper look at protecting your outbound results, check out lemlist’s Deliverability Hub, which consolidates warmup health, bounce trends, and inbox-placement signals into one dashboard.
Setting up multiple MX records with different priorities adds redundancy to your email system. If the primary mail server is unavailable, the email can be routed to a secondary server. This redundancy ensures smooth, uninterrupted email outreach. You can monitor mailbox and domain health proactively so you catch issues before they affect your pipeline.
MX record example
Here’s what MX records look like:
And here’s an existing MX records example from lemlist:
What makes up an MX record
A DNS MX record consists of five parts: Hostname, Type, TTL, Priority/Preference, and Value.
Your hostname is your domain name. It and the associated IP indicate to what domain emails will be sent.
The type specifies the kind of DNS record being created. For MX (Mail Exchange) records, setting the type correctly ensures the record works as expected.
TTL (Time to Live) is the time (in seconds) that servers cache an MX record. It’s often set to Auto by default but can be adjusted (e.g., 3600 seconds = 1 hour).
Priority defines the order in which mail servers should attempt delivery. Lower numbers are tried first. If two records have the same priority, the sending mail server randomly selects one.
The value contains your provider’s email server address (MX address).
MX record priority: how routing works
When an email is sent to user@example.com, the sender’s mail server queries the DNS for the MX records of example.com.
Let’s say the DNS query returns both MX records (see example above):
The server will attempt to deliver the email to mail1.example.com first because it has the highest priority (lowest number).
If mail1.example.com is unavailable, the sending server will try mail2.example.com as a fallback.
Therefore, having multiple MX records for your domain is important if a receiving server experiences issues.
Check your existing records first
Before jumping into setting up your MX records, let’s check your domain’s existing DNS records.
You could already have your domain’s MX records set up without you knowing.
You can check your MX records with lemlist’s Deliverability Hub. Here’s how:
- On the lemlist dashboard, navigate to your Deliverability Hub
- Open the DNS health section
- In the user selector at the top, click the dropdown to choose which email account you want to check
- Select the user/email account you want to run the DNS health check for
- Click “Refresh checks” to force lemlist to re-check your current DNS configuration
- Check your results!
In this example, the domain is using Google email servers to receive emails.
lemlist’s Deliverability Hub also lets you review real-time warm-up health signals (Monitor deliverability with lemlist Deliverability Hub | lemlist Help Center) and sends alerts the moment a real trend emerges so you can fix it before it hits your pipeline (Email Deliverability Monitoring | lemlist). For more info on how to check your domain’s DNS records, visit: Check your DNS set up with lemlist.
lemlist has a free 14-day trial, no credit card required, cancel anytime, so you can test the DNS checks and other features. lemlist is rated 4.6/5 on G2 with over 2,000 reviews.
However, if all you need is a quick check if your MX records are in order, you can also use our Free Deliverability Setup Checker. It won’t show you the exact MX records but will tell you if they are “good” or not.
If the lookup tools show your domain doesn’t have MX records set up, it’s time to get to work in the next section:
How to set up MX records
We’ll now walk through setting up your MX records with Google Workspace and Microsoft Office 365, across every major registrar.
Let’s start with the big ol’ G:
Adding Google Workspace MX records
Where to set up?
You don’t set up your MX records on Google Workspace itself.
Instead, you have to take Google’s MX records and set them up on your domain registrar’s website (or hosting service).
The full setup is actually a two-step process: (1) add Google’s MX record in your domain registrar’s system, and (2) activate Gmail in the Google Admin console. (Set up MX records for Google Workspace) We’ll cover the registrar step first for each provider below, then the Gmail activation step.
Do I have to set up multiple MX records with different priorities?
Traditionally, yes. However, in April 2023, Google moved to a single MX record as the standard. If you started using Google Workspace before 2023, your domain might have different MX record values that start with “aspmx”. (Set up MX records for Google Workspace) The single-record setup (smtp.google.com) is now the default for all new domains and has been for over three years.
How to set up MX records for Google on Namecheap
On Namecheap, setting up your Google MX records only takes a few steps:
- Go to Advanced DNS settings
- Scroll to Mail Settings
- Choose “Gmail”
- Save it!
How to create MX records for Google and Cloudflare
On Cloudflare, you’ll need to create MX records manually:
- Log in to Cloudflare
- Go to Domain list and choose your domain
- Go to DNS
- Click on “Add new record”
- Choose MX record
- Put @ in “Name”
- Put SMTP.GOOGLE.COM in mail server. If you started using Workspace before 2023, use ASPMX.L.GOOGLE.COM * instead.
- Choose priority = 1
*Also add the following MX records for the backup servers:
ALT1.ASPMX.L.GOOGLE.COM
priority = 5
priority = 5
ALT2.ASPMX.L.GOOGLE.COM
priority = 5
priority = 5
ALT3.ASPMX.L.GOOGLE.COM
priority = 10
priority = 10
ALT4.ASPMX.L.GOOGLE.COM
priority = 10
priority = 10
How to add Google MX records to Bluehost
We’ll need to create MX records manually:
- Select your domain on the Domains tab
- Now select Advanced Tools, and click Manage
- Click Add Record
- Click on “Add new record”
- Choose MX record
- Put @ in “Name”
- Put SMTP.GOOGLE.COM in mail server. If you started using Workspace before 2023, use ASPMX.L.GOOGLE.COM * instead.
- Choose priority = 1
- Save it!
*Also add the following MX records for the backup servers:
ALT1.ASPMX.L.GOOGLE.COM
priority = 5
priority = 5
ALT2.ASPMX.L.GOOGLE.COM
priority = 5
priority = 5
ALT3.ASPMX.L.GOOGLE.COM
priority = 10
priority = 10
ALT4.ASPMX.L.GOOGLE.COM
priority = 10
priority = 10
Save it!
How to add Google MX records to GoDaddy
GoDaddy is one of the most popular registrars, so I want to make sure this one’s covered. On GoDaddy, select your domain to access the Domain Settings page, select DNS to view your DNS records, then select Add New Record and choose MX from the Type menu. (Add an MX record | Domains - GoDaddy Help US) Here are the full steps:
- Sign in to your GoDaddy Domain Portfolio
- Select the domain you want to configure
- Select DNS to view your DNS records
- Click “Add New Record” and select MX from the Type menu
- Leave the Name field as @ (or blank for the root domain)
- Enter SMTP.GOOGLE.COM as the Value. If you started using Workspace before 2023, use ASPMX.L.GOOGLE.COM instead.
- Set Priority to 1
- Leave TTL at the default (1 hour)
- Click Save
If your domain is using GoDaddy nameservers and it’s connected to one of their email services, GoDaddy will automatically add the required MX records for you. (Add an MX record | Domains - GoDaddy Help US) Otherwise, follow the manual steps above.
If you started using Workspace before 2023, also add the backup servers (ALT1, ALT2, ALT3, ALT4) with the same priorities listed in the Cloudflare and Bluehost sections above.
How to add Google MX records to AWS Route 53
If your domain is hosted on AWS Route 53, the process is a bit different from traditional registrars. To effectively route your email, keep the record set name blank when you create a root domain MX record in Route 53. (Receive email after you create an MX record in Route 53 | AWS re:Post) Don’t add the @ character, even though some DNS providers require it. (Receive email after you create an MX record in Route 53 | AWS re:Post)
Here’s the step-by-step:
- Sign in to the AWS Management Console and open Route 53
- Select “Hosted Zones” from the left navigation pane
- Click on the hosted zone for your domain
- Click “Create record”
- Leave the Record name blank (for the root domain)
- Select MX from the Record type dropdown
- In the Value field, enter: 1 smtp.google.com (or, for pre-2023 setups, enter each ASPMX record on its own line with its priority number)
- Set TTL to 3600
- Click “Create records”
One important note: AWS Route 53 often requires trailing dots for FQDNs (e.g., smtp.google.com.), while GoDaddy typically does not. (Guide to Adding TXT, MX, and CNAME Records in AWS Route 53 - Wyzard — The Signal-to-Revenue AI) Check whether your records need that trailing period.
Activate Gmail in the Google Admin console
This step is easy to miss, and I’ve seen people skip it and wonder why email still isn’t flowing. Adding the MX record to your registrar is only step one. Step two is to activate Gmail in the Google Admin console. (Set up MX records for Google Workspace)
Here’s how:
- Sign in to admin.google.com as an admin. Go to Menu > Account > Domains > Manage Domains. Click “Activate Gmail” for your domain and follow the on-screen steps. (How to Setup MX Records in Google Workspace)
- Remember: it can take up to 72 hours for new MX records to be recognized. (Set up MX records for Google Workspace)
Without this step, your MX records will exist at the registrar, but Google won’t actually accept and deliver the mail to your inbox.
How to set up Google MX records for all domain and hosting providers
This is a general step-by-step checklist for setting up your Google MX records for all providers.
Since there are different steps for different providers, the steps are not exact. However, they should help you configure your records either way.
In case you need additional information, check Google’s documentation on MX records.
1. Log in to Your Domain Registrar: Access the account where you registered your domain. Sometimes, you’ll find your domain’s DNS settings in your hosting provider’s account.
2. Locate the DNS Management Page: Find the section for managing DNS records, often labeled as “DNS Management,” “Name Server Management,” or similar.
3. Select the Domain: Choose the specific domain you want to configure.
4. Open the DNS Manager: Navigate to the DNS Manager or DNS Zone Editor, where you can add or edit DNS records.
5. Delete Existing MX Records (Optional but recommended): If there are any existing MX records that are different to the ones you want to add, delete them to avoid conflicts.
6. Add Google’s MX Records:
Started using Workspace after April 2023? Add only this server: SMTP.GOOGLE.COM. Put @ in “Name” and set the priority to one.
Started using Workspace before 2023? Add the records below:
Host/Domain | Type | Priority | Value | TTL |
|---|---|---|---|---|
@ | MX | 1 | 3600 | |
@ | MX | 5 | 3600 | |
@ | MX | 5 | 3600 | |
@ | MX | 10 | 3600 | |
@ | MX | 10 | 3600 |
7. Save the MX Records: Click “Save” or “Add Record” to update your DNS settings.
8. Activate Gmail in the Admin Console: Go to admin.google.com > Account > Domains > Manage Domains, and click “Activate Gmail” for your domain. This is a required step.
9. Wait for DNS Propagation: DNS changes can take anywhere from a few minutes to up to 72 hours to propagate globally.
10. Verify MX Record Setup: Use lemlist’s DNS checks or any other DNS lookup tool to verify that the MX records have been correctly added to your domain.
Note: For some domain registrars, Google will automatically set up the MX records for you.
Microsoft Office MX records setup example
If Microsoft Office 365 is your email provider choice, we’ve got your back, too.
The MX record to add will be provided by Microsoft. For full details on the required DNS records, see Microsoft’s official documentation on connecting your domain. Here’s how to find it:
- Log in to Office 365 and go to the Settings > Domains page
- The MX record to add is under Required DNS settings. The record follows this format: <MX token>.mail.protection.outlook.com.
Alternatively, it will also appear during the initial setup. ⬇️
When to Avoid Using Microsoft’s Default MX Record
In most cases, you should use the provided MX record. However, don’t use it if:
- You need custom DNS routing, for example, to route traffic through an external spam filtering service.
- You’re using both Exchange on-premises and Exchange Online (also called a hybrid deployment).
How to set up MX records on Microsoft Office 365 for Namecheap
- Go to Advanced DNS settings
- Scroll to Mail Settings
- Create MX record*
- Save it!
*You can take this MX record from Microsoft during your initial setup:
How to configure MX records for Microsoft Office 365 and Cloudflare
- Select your domain and go to DNS
- Click on Add Record
- Choose MX as the record’s type
- Add your Office 365 MX record*
- Save
*You can take this MX record from Microsoft during your initial setup:
How to add MX records for Microsoft Office 365 and Bluehost
- Select your domain on the Domains tab
- Now select Advanced Tools, and click Manage
- Click Add Record
- Choose MX record as the type
- Fill in the other information*
- Save it!
*You can take this MX record from Microsoft during your initial set-up:
How to add MX records for Microsoft Office 365 and GoDaddy
GoDaddy also supports Microsoft 365 setup directly. You can use Microsoft 365’s automatic verification: in the Microsoft 365 admin center, select Settings > Domains, select your domain, choose “Start setup,” click Continue, then click “Add DNS records” on the Add DNS records page, and sign in to your GoDaddy account to authorize. (Connect your DNS records at GoDaddy to Microsoft 365 - Microsoft 365 admin | Microsoft Learn)
If you prefer manual setup:
- Sign in to your GoDaddy Domain Portfolio
- Select your domain and click DNS
- Click “Add New Record” and choose MX from the Type menu
- Enter your Microsoft 365 MX record (the <MX token>.mail.protection.outlook.com value from your admin center)
- Set Priority to 0 or 1
- Save
For the full official guide, see GoDaddy’s “Add an MX record” documentation.
Troubleshooting your MX record setup
Even after following every step, things can go wrong. Here are the most common issues I see and how to fix them.
DNS propagation delays. After saving your MX records, changes can take anywhere from a few minutes to 72 hours to propagate globally. It typically takes about 15 minutes for DNS changes to take effect (Connect your DNS records at GoDaddy to Microsoft 365 - Microsoft 365 admin | Microsoft Learn), but be patient if it takes longer. Don’t keep re-editing the records during this window.
Conflicting MX records. If you switched email providers but left old MX records in place, mail can split between providers or bounce. Delete any MX records that don’t belong to your current email provider before adding new ones.
Domain not verified. Make sure your domain ownership is verified before you can set up Gmail (Set up MX records for Google Workspace) or Microsoft 365. Both Google and Microsoft require domain verification as a prerequisite.
Incorrect formatting. Double-check your entries and make sure you typed everything correctly, following your domain registrar’s preferred format. (Set up MX records for Google Workspace) Some registrars require a trailing period (smtp.google.com.) while others don’t.
Gmail not activated. Adding MX records at the registrar is only half the job for Google Workspace. If you skip the “Activate Gmail” step in the Admin console, mail won’t flow.
If your records still aren’t working after troubleshooting, use lemlist’s DNS health checks or a tool like MXToolbox to verify exactly what records are live on your domain.
How email communication works with MX records
DNS MX records play a critical role in the entire email communication process. To understand their importance, let’s look at how email communication works.
Email is a method of communication that uses electronic devices to send messages over computer networks. “Email” refers to both the delivery system and individual messages that are sent and received.
Here’s a step-by-step breakdown of what happens when you send an email:
- Email Creation. You write and send an email using an email client like Gmail.
- Initial Sending. The email client connects to your SMTP (Simple Mail Transfer Protocol) server to send the email.
- DNS Lookup. The sending SMTP server performs a DNS lookup for the recipient’s domain to find its MX records.
- MX Record Resolution. The DNS returns the MX records, which specify the mail server(s) responsible for receiving email for that domain, along with their priorities.
- Mail Delivery. The sending server connects to the highest-priority mail server and delivers the message. If that server is down, it falls back to the next priority.
That’s the full loop. Every time someone replies to your cold outreach, this exact process runs in reverse to get their response back to your inbox. Which is exactly why getting your MX records right is non-negotiable for outbound.
Over to you
MX records are one of those foundational pieces of email infrastructure that you set once and (mostly) forget about. But set them wrong, or skip a step like Gmail activation, and your entire outreach operation stalls before it starts.
Here’s the short version of what we covered: check your existing records, pick the right setup guide for your registrar and email provider, follow the steps, verify with a DNS lookup, and then activate your email service in the admin console.
If you want to check your full DNS setup (MX, SPF, DKIM, DMARC) in one place and keep an eye on deliverability as you scale your outreach, lemlist’s Deliverability Hub does all of that. Start your 14-day free trial, no credit card required, and see for yourself.
Product Marketing Manager