As a Google Workspace Administrator, it's important to have visibility and control over your email deliverability. You can set up Sender Policy Framework (SPF), DomainKeys Identified Mail (DKIM), and Domain-based Message Authentication, Reporting, and Conformance (DMARC) email authentication for your email servers to protect the messages your organization sends from being flagged as spam.
After configuring SPF, DKIM, and DMARC, the following happens when an email is sent from someone in your organization:
The recipient server looks up the SPF record and confirms that the sending server matches one in your allowed list.
The recipient server checks the DKIM signature in the message header using the DKIM key in your DNS configuration.
If the above checks pass, the recipient server delivers the message, otherwise the server follows the policy defined in your DMARC record and emails a daily report.
In this exercise, you’ll review your SPF records and DKIM status, and enable DMARC for your domain.
If you completed the Review your Domain Name System (DNS) records exercise in the Google Workspace User and Resource Management course, or the Review your MX records exercise in the Google Workspace Core Services course, you can skip part one of this exercise.
Part 1: View SPF records
Step 1
Sign in to your domain registrar. For instructions on how to do this, see the Review your Domain Name System (DNS) records exercise in the Google Workspace User and Resource Management course.
Step 2
Locate your DNS records. If you purchased your domain through Google, there should be an existing SPF record as shown in the table below. This specifies that Google servers only are allowed to send email on your behalf.
Step 3
If you did not purchase the domain as part of the sign up flow and the domain you are using is for training only, you can add the SPF record as shown above to your DNS records.
Step 4
You can check which IP addresses are covered by _spf.google.com using the Check MX utility. Perform the lookup and then click the Effective SPF Address Ranges link in the results. Try that now but remember it can take a while for DNS record changes to propagate.
-- --
Part 2: Set up DKIM
Step 1 - Check if DKIM is already set up
How you perform this check depends on whether you’re using Google Workspace. If you’re using Google Workspace, follow the instructions in this section. If you’re not using Google Workspace, check with your email and/or ISP (if your ISP is the domain that sends email). If you manage your own email, use one of the tools available on the internet.
Navigate to the Google Admin Toolbox at https://toolbox.googleapps.com/apps/checkmx/.
Enter your domain in the Domain name field.
Note: In some cases, you might need to enter your DKIM prefix selector, which uniquely identifies the DKIM key. The default is google.
Click Run Checks.
When the test finishes, check for one of these messages:
DKIM authentication DNS setup: A DKIM key is set up for the domain and selector. Skip Steps 2 and 3.
DKIM is not set up: There's no DKIM key for your domain with the prefix selector you entered. Continue to step 2 to set up a new key using the provided selector.
Step 2 - Generate a DKIM key pair
If you’re not already signed in, sign in to your domain as the Administrator at admin.google.com.
From the main menu, navigate to Apps, select Google Workspace, and then click Gmail.
Click Authenticate email, and ensure that STATUS is set to Authenticating email. It can take between 24 and 72 hours for DKIM to become fully activated.
Navigate back to your domain registrar. If you purchased your domain through Google, locate your google._domainkey TXT record in your DNS records. It should match the one shown in the Admin console. If you brought your own domain to Google Workspace, click GENERATE NEW RECORD, then click GENERATE in the dialog box that appears.
Copy the DKIM values shown in the Authenticate email window. You’ll add it at your domain provider in the next step:
Step 3 - Add the DKIM key to your domain
Once you’ve generated your DKIM key pair, add the public DKIM key to your domain by creating a DKIM TXT record.
For help with your domain sign-in information, settings, or TXT records, contact your domain provider. Google doesn't provide technical support for third-party domain providers.
To add the DKIM key from your Google Admin console to your domain provider's DNS records:
Go to the page where you update DNS TXT records for your domain. For help finding this page, check the documentation for your domain.
Add or update the TXT record with the type, host, value, and TTL from the previous step.
Save your changes.
If you use subdomains, check with your domain provider to find out how to add a TXT record for subdomains.
If you’re setting up DKIM for more than one domain, complete these steps for each domain. You must get a unique DKIM key from the Admin Console for each domain.
After adding a DKIM key, it can take up to 48 hours for DKIM authentication to start working.
Return to the Admin console, and click START AUTHENTICATION. When you turn on email signing, Gmail verifies you have a DKIM domain key. If the DKIM domain key is not found, Google Workspace displays a warning message so you should try again later.
-- --
Part 3: Set up DMARC
Step 1
From your domain registrar, locate your DNS records and add a DMARC TXT record as shown below. Replace yourdomain with your Google Workspace primary domain name, and admin-email with your administrator's email address.
The TXT record you added above tells receiving servers what to do if DMARC is triggered. Here, no action is taken on the message and a daily report is mailed to you as the Google Workspace administrator.
Step 2
To view the changes, open a new browser tab and visit https://toolbox.googleapps.com/apps/checkmx/
Step 3
Enter the name of your Google Workspace domain into the 'Domain name' field, and click RUN CHECKS!. If your changes are visible, you should see the two lines highlighted below in your query results. Changes might take a few minutes to appear.
Some domain providers limit TXT record length. If yours does, please refer to the Help Center article titled, “Verify your domain provider's TXT record character limits.”
Explore more about email security practices in the Google Workspace Admin Help Center.