How to set up SPF, DKIM, and DMARC in Google Workspace

Google Workspace needs three DNS records to protect your domain from spoofing and keep your own email out of spam folders. Here's how to add each one.

Updated

You'll need: a Google Workspace super admin account, and access to wherever your domain's DNS is hosted.

1. SPF

Google Workspace's SPF include is _spf.google.com. If Google is the only service that sends email for your domain:

v=spf1 include:_spf.google.com ~all

If other services also send as you, add their includes to this same record rather than creating a second one. See fixing SPF errors.

2. DKIM

Until you set up DKIM, Google signs your mail with a Google-owned domain, which doesn't match your From address and doesn't help you pass DMARC.

  1. In the Google Admin console, go to Apps > Google Workspace > Gmail > Authenticate email.
  2. Select your domain and click Generate new record. Choose a 2048-bit key if your DNS host supports it, and keep the default prefix, google.
  3. Add the TXT record Google shows, with the name google._domainkey and the long value starting v=DKIM1, at your DNS host.
  4. Wait for DNS to update (it can take up to 48 hours, usually much less), then click Start authentication.

3. DMARC

Add a TXT record named _dmarc:

v=DMARC1; p=none; rua=mailto:dmarc@yourbusiness.com

After a few weeks of reports showing your real email passing, move to p=quarantine and then p=reject. See moving off p=none.

4. Check the result

A Nightkeep report checks your SPF, DKIM (including Google's google selector), and DMARC records together and explains anything that's still missing.

On the Business and Complete plans, Nightkeep can also check your Google Workspace account security with read-only access, for a domain you've verified: who has 2-Step Verification, administrators, suspended and inactive accounts. It never reads email or files.

See how your domain does

Create a free account and get a report on your email security (SPF, DKIM, and DMARC), website certificate, domain registration, and website, graded A to F with plain-English fixes. It takes about ten seconds once you're signed up.

First report free. No credit card. Nothing to install.