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.
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.
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.
An MX record consists of two key components – mail server address (or simply “host”) and priority.
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.
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:
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.
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.
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:
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:
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:
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.