Setting Up MX Records for Gmail (Google Workspace)
Google's MX Records
Steps to Configure Google MX Records
Setting Up MX Records for Outlook (Microsoft 365)
Microsoft 365 MX Record
Steps to Configure Microsoft 365 MX Records
Verifying MX Record Configuration
Methods to Verify MX Records:
Troubleshooting Common Issues
Emails Not Being Received?
Incorrect DNS Settings?
Email Still Not Working?
Wrapping UP
Related Tutorials
MX (Mail Exchange) records are a type of DNS record that directs email traffic for your domain. Configuring MX records correctly makes sure that emails sent to your domain go to the right mail server.
This guide will walk you through setting up MX records for different email services, including Gmail (Google Workspace) and Outlook (Microsoft 365). Whether you are a beginner setting up email for the first time or an expert looking to optimize settings, we'll cover every detail you need.
Prerequisites
Before configuring your MX records, let's make sure you have the following in order:
Access to Your DNS Hosting Provider: This is usually where you registered your domain or a dedicated DNS service.
The Correct MX Record Values: Your email provider will supply the exact MX records you need to enter. Using incorrect values can prevent email delivery.
Administrative Access to Your Email Hosting Service: If you're setting up email for a company or team, you may need admin credentials to verify the domain and complete setup steps.
General Steps to Update MX Records
Regardless of your email provider, the process of updating MX records follows these general steps:
1. Log in to Your DNS Hosting Provider
Navigate to the website of your domain registrar or DNS provider.
Sign in with your account credentials.
2. Locate the DNS Settings
Find the section labeled DNS Management, DNS Settings, or Name Server Settings.
Some providers list DNS records under Advanced Settings or Domain Settings.
3. Find or Add MX Records
If your domain has existing MX records, review them to make sure they are correct.
If switching email providers, delete old MX records to avoid conflicts.
Add new MX records according to your email service provider's specifications.
4. Save Changes and Wait for Propagation
DNS changes do not take effect immediately. They can take from a few minutes to 24 hours to fully propagate across the internet.
Setting Up MX Records for Gmail (Google Workspace)
If you are using Google Workspace (formerly G Suite), configure your domain with Google's MX records.
Google's MX Records
Google requires five MX records, each with different priorities. Enter them exactly as shown:
Priority
Mail Server
1
ASPMX.L.GOOGLE.COM
5
ALT1.ASPMX.L.GOOGLE.COM
5
ALT2.ASPMX.L.GOOGLE.COM
10
ALT3.ASPMX.L.GOOGLE.COM
10
ALT4.ASPMX.L.GOOGLE.COM
Steps to Configure Google MX Records
Access Your DNS Provider's Settings: Log in to your domain registrar or DNS provider.
Locate the MX Records Section: Find where MX records are listed under your DNS settings.
Delete Old MX Records: If any pre-existing MX records are present, remove them.
Add Each Google MX Record: Enter each record one by one, setting the correct priority values.
Save Changes and Verify Setup: Save the new records and check propagation using Google Admin Toolbox.
Complete Domain Verification: In the Google Admin Console, go to Domains > Manage Domains and confirm that verification is complete.
Setting Up MX Records for Outlook (Microsoft 365)
For users with a Microsoft 365 subscription, configure your domain with Microsoft's MX records.
Microsoft 365 MX Record
Microsoft uses a single MX record for each domain, formatted as follows:
Priority
Mail Server
0
[YourDomain]-mail.protection.outlook.com
(Replace [YourDomain] with your actual domain name.)
Steps to Configure Microsoft 365 MX Records
Log in to Your DNS Provider: Access your domain settings through your registrar or DNS host.
Navigate to the MX Records Section: Find the existing MX records.
Remove Existing MX Records: If switching from another provider, delete old records.
Add Microsoft's MX Record: Enter the mail server address provided by Microsoft and set the priority to 0.
Save and Verify: Save your settings and check propagation using tools like MXToolbox.
Confirm in Microsoft Admin Center: Log in to the Microsoft 365 Admin Center, go to Settings > Domains, and verify that your domain is properly set up.
Verifying MX Record Configuration
Once MX records are updated, verify them to make sure email routing is correct.
Methods to Verify MX Records:
Use MXToolbox (MXToolbox.com) to check MX records for your domain.
Check via Command Line:
For Windows: Open Command Prompt and type nslookup -type=mx yourdomain.com
For macOS/Linux: Open Terminal and type dig mx yourdomain.com
Confirm in Email Admin Panel: Both Google and Microsoft provide domain verification steps within their admin dashboards.
Troubleshooting Common Issues
Emails Not Being Received?
If you're not receiving emails, here are a few things to check:
Allow Time for DNS Propagation – When you update MX records, changes don't take effect instantly. It can take up to 24 hours for DNS updates to fully propagate across the internet. During this time, email delivery may be inconsistent.
Remove Old MX Records – If outdated MX records are still in place, they could interfere with email routing. Double-check your DNS settings and delete any unnecessary MX records to prevent conflicts.
Check for Typos – Even a small mistake in the mail server address can cause issues. Make sure the MX records match exactly what your email provider has provided.
Review Firewall and Security Settings – Some firewall rules or email security settings may block email ports, such as SMTP (port 25, 587, or 465). Ensure these ports are open and not being restricted by your hosting provider or network administrator.
Incorrect DNS Settings?
If emails aren't working as expected, your DNS settings might need adjusting:
Confirm You're Editing the Correct Domain – If your website has multiple domains or subdomains, ensure you're modifying the right one in your DNS settings.
Check Formatting Requirements – Some DNS providers require MX records to end with a trailing dot (.). For example, if using Google's mail servers, the correct format is ASPMX.L.GOOGLE.COM. rather than ASPMX.L.GOOGLE.COM (without the dot). Missing this detail could cause validation errors.
Email Still Not Working?
If you've reviewed the settings above and emails are still not coming through:
Check for Additional Required Records – Many email providers require SPF, DKIM, and DMARC records to authenticate outgoing messages and improve email deliverability. Missing these records can sometimes lead to rejected emails or messages landing in spam folders.
Reach Out for Support – If you've confirmed your MX records are correct but issues persist, your email provider may need to investigate further. Contact their support team for guidance—they can check server logs and identify any potential configuration issues.
Wrapping UP
Setting up MX records is a key step in configuring your email service. Whether you're using Gmail or Outlook, following the correct process helps keep email communication running smoothly. If you run into problems, use verification tools and double-check your settings. Managing DNS properly prevents disruptions and keeps your email system reliable.