Set up DMARC, SPF and DKIM in Google Workspace

Written by Micronet AS · Updated

Short answer

How do I set up DMARC, SPF and DKIM in Google Workspace?

For a domain that only sends from Google Workspace: add the SPF record v=spf1 include:_spf.google.com ~all, create a 2048-bit DKIM key in the Admin console and add it as a TXT record at google._domainkey, turn on signing, and publish DMARC at _dmarc with p=none once SPF and DKIM have worked for 48 hours.

Google Workspace does not sign with your own domain until you have created a key and turned on signing. This guide follows the Google documentation for administrators.

Step 1: SPF

TXT record at company.comv=spf1 include:_spf.google.com ~all

Google recommends ~all in the SPF record. The domain can only have one SPF record. If other services send for the domain, you add them to the same record, before ~all.

Step 2: DKIM

  1. Open the Admin console and go to Apps, Google Workspace, Gmail, Authenticate email.
  2. Select the domain and click Generate New Record. Choose 2048 bits if your DNS provider supports it. The default selector is google.
  3. Add the key as a TXT record at google._domainkey at your DNS provider.
  4. Go back to the Admin console and click Start authentication.

Google states that it can take up to 48 hours for DKIM to start working after the record is added. On a brand new account you must wait 24 to 72 hours after Gmail was turned on before the key can be created.

A 2048-bit key is too long for one text string in DNS. Most providers split it themselves. If yours does not, the DNS record splitter splits it for you.

Step 3: DMARC

Google asks you to wait 48 hours after SPF and DKIM are set up before you publish DMARC.

TXT record at _dmarc.company.comv=DMARC1; p=none; rua=mailto:dmarc@company.com

The rollout Google recommends is p=none for a week while you read the reports daily, then quarantine for a small share of the email, and then gradually more. The method is in the guide to DMARC policy.

Check the setup

Use the SPF checker, the DKIM checker with the selector google and the DMARC checker. In Gmail you can also open an email you have sent, choose "Show original" and see whether SPF, DKIM and DMARC say PASS.

Do you want to show your logo in Gmail?

When DMARC is at quarantine or reject, you can set up BIMI. Gmail then requires a VMC or CMC certificate. See the guide to BIMI.

Sources

Questions and answers

Which DKIM selector does Google Workspace use?

The default is google, so the record is at google._domainkey.company.com. You can choose another name when you create the key, for example if the domain already has a key with that name.

Does Gmail send email without DKIM if I do not set it up?

The email is then signed with a Google domain and not with yours. Such a signature does not match the From address, so DMARC only passes if SPF does.

How long must I wait before DMARC?

Google recommends 48 hours from when SPF and DKIM are in place, so that both are in use before receivers start evaluating the email against your DMARC record.