Google Workspace
How to set up SPF, DKIM and DMARC for Google Workspace
Authenticate mail sent from your domain through Google Workspace: one SPF include, a DKIM key from the Admin console and a DMARC record.
Check your current setup:
Step by step, by protocol
SPF Google Workspace Setup: The TXT Record and How to Add It
The SPF record for Google Workspace is one TXT entry at your domain host. Exact value, the steps, how to confirm it passes and Google-specific problems.
Google DKIM: how to set up DKIM in Google Workspace
Set up Google DKIM: generate the key in the Admin console, publish the google._domainkey TXT record, then turn on signing and test it.
DMARC Google Workspace setup: add the record step by step
Set up DMARC for Google Workspace: one TXT record at _dmarc on your domain host, starting at p=none, then a staged move to enforcement.
Before you start
To set up SPF, DKIM and DMARC for Google Workspace, you publish three TXT records in your domain's DNS. You need access to your domain host, usually the company where you bought the domain. You also need a super administrator account in the Google Admin console, for DKIM only. Google says you don't need to do anything in the Admin console to set up SPF or DMARC.
Check what you already have before you change anything. Google says you might not need to set up SPF or DKIM if your domain already has them by default, or if you bought it from a Google partner when you signed up. The Email Security Score shows what your domain publishes today.
Allow time between steps. Google says SPF and DKIM can each take up to 48 hours to start working. If you turned on Gmail recently, you might have to wait 24 to 72 hours before the Admin console gives you a DKIM key.
How the three fit together
Each protocol answers one question for the server that receives your mail.
- SPF (Sender Policy Framework) lists the servers allowed to send for your domain.
- DKIM (DomainKeys Identified Mail) adds a signature to each message, which the receiver checks against a public key in your DNS.
- DMARC (Domain-based Message Authentication, Reporting, and Conformance) tells receivers what to do with mail that fails and sends you reports.
A message passes DMARC when SPF or DKIM passes and the authenticated domain aligns with your From address. By default, that means both belong to the same main domain, such as example.com.
For a first DMARC deployment, configure SPF and DKIM, allow Google’s 48-hour interval, then monitor with p=none. Preserve an established DMARC policy and its report addresses while authenticating Google Workspace.
Set up DKIM even when SPF already passes. Google says forwarded messages often fail SPF. RFC 9989 §7.4 says domains that publish p=reject must not rely solely on SPF to pass DMARC and must apply valid DKIM signatures.
SPF: list Google's servers
Publish one TXT record at the root of your domain, using @ as the host:
v=spf1 include:_spf.google.com ~all
Google’s SPF example covers Google-only MAIL FROM use. Add another provider’s include only if it uses this same domain as SMTP MAIL FROM. Services using a different bounce domain need authentication there; do not add every visible From service to apex SPF.
Google recommends ~all, which returns SPF softfail for unlisted servers. Receivers decide delivery; RFC 7208 says not to reject solely on softfail. -all returns SPF fail.
SPF allows 10 DNS lookups per check. Google does not document how many its include uses. On 2026-11-09, _spf.google.com resolved to a record with only IP ranges, so the include used one lookup. Count your total again whenever you add a sender.
The full procedure is in SPF on Google Workspace.
DKIM: sign with your own domain
DKIM starts in the Admin console. Go to Menu > Apps > Google Workspace > Gmail and click Authenticate email. Generate a key there, with 2048 bits if your domain host supports it or 1024 if it does not.
The default prefix selector is google, and Google recommends it for Google Workspace. That makes the record name google._domainkey on your domain. If your domain already uses a DKIM key with that prefix, enter another one.
The key sits under your own domain, so the signature carries your domain in its d= tag. That lets DKIM align with your From address and pass DMARC on its own.
The order matters. Publish the key at your domain host first. Once the record is visible in DNS, return to the Admin console and click Start authentication. Each domain needs its own key.
The full procedure is in DKIM on Google Workspace.
DMARC: publish a policy and read the reports
DMARC is one TXT record at _dmarc on your domain, added at your domain host. Some hosts add the domain name automatically, so confirm that the saved name is _dmarc.example.com. Start in monitoring mode:
Use this starter value only if no DMARC policy exists at this name. Otherwise edit the existing record, preserving its p=, alignment settings and report addresses; add your monitored rua destination there. Never create a second policy record.
v=DMARC1; p=none; rua=mailto:dmarc@example.com
Replace the address with your own. With p=none, you ask receivers to take no action based on DMARC, and they still send you reports. The rua tag names the mailbox for those aggregate reports, which usually arrive once a day as XML files in the format defined by RFC 9990. Use your DMARC Pulse reporting address as rua to turn them into a readable dashboard.
The full procedure is in DMARC on Google Workspace.
Move to enforcement in stages
If no DMARC policy exists, monitor at p=none while reviewing reports. Preserve an established policy, alignment and report destinations.
- After legitimate senders align, consider
p=quarantine, which requests suspicious treatment of failing mail; the receiver decides whether that means spam. - Review the results before separately considering
p=reject. It requests rejection but does not guarantee every receiver’s action. It is optional and needs a mailing-list and forwarding risk assessment.
Google's rollout page raises a pct value in stages up to 100. RFC 9989 removed pct because values other than 0 and 100 were usually not applied accurately. Its §4.7 no longer lists pct as a valid tag, and its registry marks pct as historic. Assume a receiver may apply your policy to all failing mail as soon as you publish it.
RFC 9989 §7.4 also says domains whose users might post to mailing lists should not publish p=reject. If you choose it anyway, the RFC says to publish p=none for at least a month, then p=quarantine for just as long.
Common problems
- Two SPF records. Google says each domain can have only one. If you created a new record for Google, merge everything into a single
v=spf1record. See how to fix multiple SPF records. - The status reads
Not authenticating. You added the key but did not finish setup. Open Authenticate email and click Start authentication. The status should change toAuthenticating email with DKIM. - The Admin console will not create a key. If you turned on Gmail less than 24 to 72 hours ago, Google says you might get an error that the DKIM record was not created. Wait and try again.
- The key does not fit at your domain host. Google says you can't enter a 2048-bit key as a single string when the TXT record limit is 255 characters. Split the key into several quoted strings, one after another, or use a 1024-bit key.
- Another service sending as your domain fails DMARC. Google says to confirm with the provider that SPF and DKIM are set up, to make the provider's envelope sender domain match yours and to add its sending servers to your SPF record.
- Messages bounce with
5.7.26. The bounce includesUnauthenticated email from domain-name is not accepted due to domain's DMARC policy. Check that the message passes SPF or DKIM and that the domain aligns. See the 550 5.7.26 error. - Mail sent to a Google Group shows "via". When the sender's domain publishes
p=quarantineorp=reject, Gmail shows the sender as'Sender Name' via Group-Name. Google does this so delivery through Groups does not trigger that domain's DMARC policy. The label cannot be removed. - Forwarded mail fails SPF. Google says this often happens and recommends always setting up DKIM as well. RFC 9989 §7.4 notes that DKIM signatures generally remain valid in these relays.