Home
IT Hub

Configure MX Records for Google Workspace Email Setup

Google Drive
Reco Security Experts
Updated
January 13, 2025
January 13, 2025

How to Configure MX Records for Seamless Google Workspace Email

Once you have purchased a Google Workspace subscription for your organization and validated domain ownership, you need to proceed with further configuration. Usually, the next step is to create the necessary Domain Name System (DNS) records for your domain to be able to use the Google services. For the proper work of the email service, you need to create a Mail Exchange (MX) record and some TXT records (such as SPF, DKIM, and DMARC). In this article, we will review the process of creation of MX records.

What is an MX Record?

An MX record is a type of DNS record that specifies the mail server responsible for receiving emails on behalf of the domain. MX records ensure that incoming emails are directed to the correct servers, enabling email communication for businesses and individuals. As shown in the below image, when someone sends an email to an address like user@yourdomain.com, the sending email server queries the DNS for the MX record of yourdomain.com. The MX record provides the address of the mail server that should handle the email.

The image illustrates the transformation of email server address handling through the use of Mail Exchange (MX) DNS records, enabling proper routing of incoming emails.

How to Manage the Records

MX records are created and managed within the DNS settings of your domain (in an external DNS zone). These settings are typically accessed through your domain registrar (the website where you purchased the domain name for your company) or a third-party DNS provider. Examples of platforms where MX records are configured include GoDaddy, Namecheap, Cloudflare, and AWS Route 53.

MX Record Structure

An MX record consists of two key components – mail server address (or simply “host”) and priority.

  • Mail Server Address: The domain name of the mail server, typically represented by a fully qualified domain name (FQDN); in the case of Google Workspace, it is smtp.google.com.
  • Priority: A numeric value that determines the order in which mail servers are contacted. Lower numbers indicate higher priority. If the primary mail server (lowest priority value) is unavailable, the sending server tries the next highest priority MX record.

This image shows how traffic is distributed across several email servers based on the priority values of MX records, optimizing email delivery by directing traffic to the highest priority servers first.

The priority values can be used to control the email traffic in highly available deployments (e.g., email servers are located in more than one data center) or different hybrid scenarios.

MX Record for Google Workspace

Record Creation

For the most popular domain registrars, MX record creation instructions are available on the Google Workspace Admin Help Center.

In general, the process is similar for any registrar, you can configure the record by following these steps:

1. Access Your DNS Settings: Log in to your domain registrar or DNS hosting provider.

2. Locate the DNS Settings: Navigate to the DNS or domain management section.

3. Add New MX Records: Use the following Google Workspace MX record values:

Type Names Priority Host
MX Blank or @ (depends on the registrar’s requirements) 1 smtp.google.com

Many registrars also allow the time-to-live (TTL) property of the record to be specified. I would recommend using the default value of 3600 seconds.

4. Save Changes: Once the records are added, save your DNS settings.

The new record must be replicated on the DNS servers globally. In theory, it may take up to 48 hours (this timeframe is usually mentioned in different tutorials), but in practice, it takes no more than 30-60 min.

Validation of the Record in Google Admin Center

After creating the MX record, you should validate it in the Google Admin Center by following the steps:

1. Log in to the Google Admin Console.

2. Go to Apps >Google Workspace > Gmail.

The image shows the steps to navigate to the Gmail section in the Google Workspace Admin Console, where administrators can manage email settings and configurations.

3. Select the Setup option.

The screenshot illustrates selecting the "Setup" option under the Gmail section in the Google Workspace Admin Console, guiding users through the setup process for email configurations.

4. Review the records specified for each domain in the MX records section.

It shows the process of reviewing the MX record configuration in the Gmail section of the Google Workspace Admin Console to ensure the email setup is correct and operational.

Alternatively, go to Google’s MX Checker tool, enter the domain name, and select RUN CHECKS!

Above is the screenshot of the CheckMX tool interface in Google Admin Toolbox, which helps users verify the MX record configuration for their domain to ensure proper email routing.

MX Records for Hybrid Email Infrastructure

In some scenarios, Gmail is not the only service used to process email messages. In such cases, the MX records might need to be adjusted.

For example, if you have some on-premises solution used for receiving email messages before they are delivered to Google Workspace mailboxes (for example, for hygiene or journaling purposes), you need to use a different MX record. In such a scenario, the record must point to your on-premises service:

Type Names Priority Host
MX Blank or @ (depends on the registrar’s requirements) 1 gateway.yourdomain.com
A Email.yourdomain.com N/A <service's IP address>

The image illustrates the MX record configuration for a hybrid email deployment, where an on-premises system receives and processes email messages before forwarding them to Google Workspace for final delivery. 

Note the MX record depends on the A record that points FQDN to the proper IP address. In the case of Google Workspace, you don’t need to worry about it since Google takes care of it for you, but if you direct messages to your own service, you need to create the necessary A-record yourself.

Another possible scenario is a hybrid email infrastructure where part of the mailboxes is hosted in Google Workspace, and the other half is in an on-premises email server, such as Microsoft Exchange Server. For such a scenario, there is no need to alter the MX record; just use the regular one (that points to smtp.google.com) and configure the split delivery in the Google Workspace Admin console. Detailed instructions on how to do it can be found in the official knowledge base.

Finally, there is a possible scenario where you use another email service as a backup solution that will receive messages on behalf of your domain when Gmail services are unavailable. From my point of view, it is quite unnecessary since the Google Workspace Service Level Agreement guarantees 99.9% availability of the services (and usually it exceeds even 99.999%), but it is still used by some organizations. In this case, you need to create two MX records, one with a lower priority value for the primary receiver and another record for the backup service:

Type Names Priority Host
MX Blank or @ (depends on the registrar’s requirements) 1 smtp.google.com
MX Blank or @ (depends on the registrar’s requirements) 20 Email.yourdomain.com
A Email.yourdomain.com N/A <service’s IP address>

Troubleshoot MX Records

If you have issues with the deliverability of the incoming messages (while outgoing messages are delivered correctly), the most likely reason is MX record misconfiguration. To troubleshoot this problem, look for the following misconfigurations:

  • Conflict of the records. The issue is usually caused by the presence of legacy MX records that point to email services that are no longer in use. If you see any record other than the one created for Google Workspace – remove it to ensure proper message routing.

  • No MX record was found. Most likely caused by incorrect record syntax. Different domain registrars have different requirements – some need you to use @ sign in the record name, others don’t, some require using a dot at the end of the target FQDN, while others will treat it as a mistake. Ensure you created the record correctly, and if the problem persists, contact the registrar’s support team.

  • DNS propagation delay. It is possible that the new MX record isn’t replicated between all the necessary DNS servers globally, which can cause temporary email routing issues. In this case, all you can do is wait and periodically check the replication status using instruments like MX Toolbox.

Conclusion

By correctly setting up and managing MX records, you lay the foundation for reliable email communication. Whether you're exclusively using Google Workspace or a hybrid email solution, understanding the nuances of MX records ensures uninterrupted email delivery. Take the time to validate your configuration, and don’t hesitate to use the tools and resources available to troubleshoot and optimize your setup.

Explore More
See more articles from our Hub

Start Securing Your Entire SaaS Lifecycle

Request a demo