Email

Set up SPF, DKIM and DMARC for Google Workspace

In short. For Google Workspace, SPF and DMARC are records you publish at your domain's DNS host, and DKIM is generated in the Admin console, published in DNS, then started. Do SPF and DKIM first, wait about 48 hours, then add DMARC and tighten it in stages.

SPF lists the servers allowed to send for your domain, DKIM signs each message, and DMARC tells receivers what to do with mail that fails both. Google Workspace does not create a DMARC record for you: Google's help says DMARC is set up at your domain host, not in the Admin console.

Last verified: November 26, 2026, against Google Workspace's official help (checked November 12 and 13, 2026).

1. SPF

For a domain that sends only through Google Workspace, Google recommends this TXT record on the domain:

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

Add any other service that sends with your domain (CRM, newsletter, invoicing, website forms) to this same record. Keep one SPF per domain and stay under 10 DNS lookups.

2. DKIM in the Admin console

You need administrator rights on Gmail settings.

  1. In the Admin console open Menu > Apps > Google Workspace > Gmail, then Authenticate email.
  2. Choose your domain in Selected domain and click Generate new record.
  3. Choose a 2048-bit key if your DNS host accepts it (otherwise 1024), keep the default selector prefix google, then Generate.
  4. Copy the host name (google._domainkey) and the TXT value (it starts with v=DKIM1; k=rsa; p=).
  5. Add this TXT record at your DNS host.
  6. Back in the console, click Start authentication, and only after publishing the key.

Timing: the key can only be generated 24 to 72 hours after Gmail is activated, and DKIM can take up to 48 hours to work after the record is published. The message "You must update the DNS records for this domain" can stay for those 48 hours. These labels follow the French help, which Google flags as AI-translated, so the interface may use neighbouring terms.

3. DMARC at your DNS host

Google advises waiting 48 hours after setting up SPF and DKIM. Then add a TXT record at your DNS host: host _dmarc (some hosts want the full name; check the domain is not doubled), and the value:

v=DMARC1; p=none; rua=mailto:[email protected]

Create a Google group or a dedicated mailbox for the reports. Gmail does not support the ruf parameter (detailed failure reports), so there is no point adding it for Google. Google's recommended rollout then moves the policy up in stages, as below.

Then tighten DMARC step by step

Start with p=none and read the reports for one to two weeks. Once every legitimate sender passes, move to p=quarantine, then to p=reject after several clean weeks. Never publish quarantine or reject straight away: one forgotten sender, such as an invoicing tool, would have its mail sent to spam or refused. Google recommends the same staged rollout.

Common mistakes

  • Two SPF records on the same domain: SPF fails with an error. Merge them into one.
  • Two DMARC records on _dmarc: receivers ignore both.
  • More than 10 DNS lookups in SPF (each include: costs at least one; RFC 7208): SPF fails.
  • Typing the full name in the host field: _dmarc.yourdomain.com can become _dmarc.yourdomain.com.yourdomain.com. Enter only _dmarc, and check the result in the list.
  • Forgetting mailto: in the rua address.
  • Forgetting other senders (newsletter, invoicing, online shop): each must pass SPF or sign with DKIM for your domain.

Check that it works

Wait for the change to be visible (minutes to hours, sometimes up to 48 hours), then:

nslookup -type=TXT yourdomain.com
nslookup -type=TXT _dmarc.yourdomain.com

You should see one line starting with v=spf1 and one line starting with v=DMARC1. Our free tools read both and the DKIM key: use the SPF, DKIM and DMARC checkers linked above. For a full test, send an email to a Gmail address, open it, choose Show original: SPF, DKIM and DMARC should read PASS.

Free tool. SPF checker · DKIM checker · DMARC checker

Check your domain for free. AttackScout reads your public SPF, DKIM and DMARC records and tells you what to change. Run the free check

Frequently asked questions

Do I need all three at Google Workspace?

Gmail and Microsoft require SPF, DKIM and DMARC from senders of more than 5,000 messages a day, and a complete setup helps at every volume. DMARC only passes when SPF or DKIM passes with your own domain, so set SPF and DKIM first.

How long before it works?

Providers announce from a few minutes to 48 hours for DNS changes to be visible everywhere. Test after a short wait.

Should I start with p=reject?

No. Start with p=none, read the reports, then tighten.

Sources

Accessed on 11/26/2026.