How to set up SPF, DKIM and DMARC for Google Workspace
Updated 10 November 2026 · 6 min read
Short answer
For Google Workspace, publish one TXT record at the root v=spf1 include:_spf.google.com ~all, generate a DKIM key in the Admin console (Apps → Google Workspace → Gmail → Authenticate email), publish it at google._domainkey, click Start authentication, then add v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com at _dmarc. Google says to wait 24–72 hours after turning on Gmail before generating the DKIM key, and up to 48 hours for SPF and DKIM to start working.
The four records, ready to paste
| Type | Host / Name | Value | Notes |
|---|---|---|---|
| MX | @ | smtp.google.com (priority 1) | Google's single MX for new setups; replies need it |
| TXT | @ | v=spf1 include:_spf.google.com ~all | Merge into an existing v=spf1 record if there is one |
| TXT | google._domainkey | v=DKIM1; k=rsa; p=MIIBIj… (from the Admin console) | Generated per domain; 2048-bit if your DNS host allows it |
| TXT | _dmarc | v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com | Start at p=none, tighten later |
Step by step
- 1
Verify the domain and add MX
Add the domain in the Admin console, publish the verification TXT record, and point MX at
smtp.google.com. Gmail must be on for the domain before DKIM can be generated. - 2
Publish SPF
At your DNS host add a TXT record with host
@and valuev=spf1 include:_spf.google.com ~all. Nothing changes in the Admin console. If the domain already has av=spf1record (from a website host, say), addinclude:_spf.google.comto that record instead of creating a second one. - 3
Wait, then generate the DKIM key
Google's help says to wait 24 to 72 hours after turning on Gmail before generating the key; doing it earlier is what causes the "DKIM record was not created" message. Then go to Apps → Google Workspace → Gmail → Authenticate email, pick the domain, choose Generate new record, keep the prefix
googleand choose 2048 bits. - 4
Publish DKIM, then Start authentication
Create the TXT record at
google._domainkeywith the full value Google shows. Only after it is live, click Start authentication. Google allows up to 48 hours before signing works. - 5
Add DMARC last
Google recommends turning on SPF and DKIM and allowing 48 hours before DMARC. Publish
v=DMARC1; p=none; rua=mailto:…at_dmarc, read the reports for a few weeks, then move top=quarantine.
Things that trip people up on Google Workspace
- Secondary domains and alias domains each need their own DKIM key. Signing for the primary domain does not cover mail sent as
you@otherdomain.com. - 1024 vs 2048 bits. Google recommends 2048. If your DNS host rejects the long value, either split it into two quoted strings in one record or fall back to 1024; see DKIM key too long for TXT.
- A prefix that is already used. If another service already publishes
google._domainkey, pick a different prefix such asgoogle2026when generating. - Old MX sets. Older guides list five
aspmxMX records. Those still work, but you do not need to add them next tosmtp.google.com. - ~all vs -all. Google's own page recommends
~all. Either is a valid SPF ending; DMARC treats both as an SPF fail. See ~all vs -all.
A worked example
Say the sending domain is getacme.com, it uses only Google Workspace, and reports should go to a mailbox on the same domain. The finished zone looks like this:
getacme.com. MX 1 smtp.google.com.
getacme.com. TXT "v=spf1 include:_spf.google.com ~all"
google._domainkey.getacme.com. TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqh..."
_dmarc.getacme.com. TXT "v=DMARC1; p=none; rua=mailto:dmarc@getacme.com"Check the result
Send a message to a Gmail address, open it and choose Show original: SPF, DKIM and DMARC should all say PASS. Run the domain through the free ReplyDak deliverability check: it reads MX, SPF, DKIM and DMARC live from public DNS, counts SPF lookups and checks the main blocklists, with no sign-up. If your DKIM selector is not a common one, type it into the optional selector box.
More setups and errors: SPF, DKIM and DMARC by provider, DNS host and error.
ReplyDak publishes these exact Google Workspace records on Cloudflare for every sending domain it sets up, and creates the mailboxes.
Domains, DNS, Google Workspace mailboxes and a safe warm-up ramp. $4.90 per mailbox a month, minimum 10 ($49 for 10). Microsoft 365 is coming soon.
FAQ
What is the SPF record for Google Workspace?
v=spf1 include:_spf.google.com ~all, published as a TXT record at the root (@) of the domain. If you also send from other services, add their includes to the same record.
Why does Google say the DKIM record was not created?
Usually because the key was generated too soon after Gmail was turned on. Google's help says to wait 24 to 72 hours first, then generate the key again.
What DKIM selector does Google Workspace use?
The default prefix is google, so the record lives at google._domainkey.yourdomain.com. You can choose another prefix when generating the key.
How long until Google Workspace DKIM works?
Google allows up to 48 hours after you publish the key and click Start authentication. Most domains sign within an hour or two.