To set up SPF, DKIM, and DMARC for a Google Workspace domain, you work through three steps: configuring SPF and DKIM, verifying an authentic message delivered to an outside mailbox, and establishing DMARC monitoring with an active report destination. A clean test validates only the specific route and identity tested, and Google is explicit that even correctly signed mail can still be rejected or placed in spam.
I checked the Google Workspace instructions in this guide against Google’s documentation on 10 September 2026.
Check prerequisites and current records
Before anything else, the intended domain must be verified in Google Workspace, Gmail must be active, and you need a working sending account. If onboarding is incomplete, pause and finish Google’s domain setup first. Generating a DKIM key requires a super administrator account, and Gmail settings require the Gmail Settings privilege; arrange DNS editing access separately (required administrator access).
Save your current SPF, DKIM, and DMARC records alongside the existing signing status. List the intended From addresses, your DNS provider’s naming rules, and all applications, gateways, or third-party platforms in use. Use a sender inventory to determine who sends for each domain. Also check whether working DKIM signing already exists before generating anything (check existing DKIM).
Google’s example record, v=spf1 include:_spf.google.com ~all, applies only when Workspace is the sole sender for that domain (Google-only SPF condition). If other senders exist, merge them into one combined policy. Do not replace an approved -all policy merely to match Google’s example.
Publish exactly one SPF policy on that DNS name, because multiple selected policies produce permerror (SPF record selection). The limit of ten DNS-querying terms applies recursively, through every nested include, so counting the visible include statements alone is not enough (SPF lookup limit). If your policy exceeds that budget, the chapter on staying under the SPF lookup limit walks through options.
Generating and publishing the Google Workspace DKIM key
If Gmail was enabled recently, wait 24–72 hours before generating a key (new Gmail prerequisite).
When you are ready, open Apps → Google Workspace → Gmail → Authenticate email, select the domain, and choose Generate New Record. Choose 2048 bits if your DNS host supports it; otherwise use the 1024-bit fallback. Google defaults to selector google; pick a distinct selector if that name is already occupied (domain and key settings).
Copy the complete generated hostname and TXT value and publish them in the correct DNS zone, following your host’s suffix rules, before activating signing (copy and publish the generated values). If your DNS host limits string lengths, split the value into quoted strings inside one TXT record (long TXT values). Then retrieve the published key and compare the assembled characters, including their order, with what the console shows (compare the public key).
Return to the selected domain, click Start authentication, and verify that the status changes to Authenticating email with DKIM (activate signing).
Google documents two potential delays:
- The DNS-update notice can remain for up to 48 hours even when publication is correct (persistent console notice).
- Authentication can take up to 48 hours after the key is added (authentication startup window).
Waiting out the clock does not prove signing works; you need to verify a fresh received message.
Verify authentication on a delivered test message
Send a test message from your address to an outside recipient. Google documents using an external Gmail or Workspace recipient; sending to yourself cannot confirm activation. Then view the recipient’s full original headers (received-message test).
Check the Authentication-Results header added by the receiving mail server. A plausible service name and pass text can be forged, so use only the results you can attribute to the known receiving service; if the provenance is unclear, ask the receiving administrator (forged results warning).
Record the visible From, SPF’s smtp.mailfrom, and DKIM’s header.d or d= along with selector s= (preserve authentication identifiers). Repeat this check for materially different routes, aliases and send-as identities, observing the envelope sender of each independently. For DMARC, either aligned SPF or aligned DKIM produces a pass; a pass for both is a useful setup target, but both need not align (DMARC pass condition).
| Observation | Next action |
|---|---|
| One expected SPF policy, matching DKIM TXT and a passing intended signing domain | Record this route’s evidence and continue to the monitoring prerequisites. |
| Multiple SPF policies or an omitted authorized sender | Stop expansion: reconcile the inventory into one valid policy and retest the affected senders. Resolve competing SPF policies |
| Missing or truncated key, or wrong hostname | Don’t activate DKIM yet: fix the DNS record to match the console value and verify it again. Repair DKIM publication |
| Published key but status remains Not authenticating | Complete Start authentication; if the issue persists, follow the troubleshooting steps instead of regenerating keys again and again. Complete activation |
| Failure on a route with a message-changing gateway | Pause expansion. With the gateway’s owner, investigate the actual modifications, preserve signed content where possible and retest the entire route. Include the gateway in SPF authorization. Gateway authentication checks |
What Google asks for before you publish DMARC
Review any existing DMARC policy first to preserve active protection. Set up a real mailbox, group, or service for aggregate reports; an external destination requires authorization (prepare the report recipient). Assign an owner who can parse and analyze aggregate reports (reporting capability). Google states that SPF and DKIM should authenticate messages for at least 48 hours before DMARC; that is provider guidance rather than an RFC timer, and waiting alone does not establish readiness (Google’s monitoring prerequisite).
Publish an initial monitoring policy with a working destination (publish a monitoring policy). A policy of p=none requests feedback without altering handling, and it never converts an underlying authentication failure into a pass (monitoring policy semantics).
A complete synthetic example
This example uses documentation-reserved names rather than live mail. Assume an active Workspace setup, DNS access for example.com, the sender ops@example.com, Workspace as the only sender for this SPF domain, no modifying gateway, and no existing DMARC policy.
Publish the Google SPF policy shown above. If the selector google is occupied, generate a 2048-bit key with selector ws202609. Publish the console’s entire actual generated value at ws202609._domainkey.example.com; no reusable sample key is supplied here. Verify the record and start authentication. A fresh external message could show:
From: ops@example.com
spf=pass smtp.mailfrom=ops@example.com
dkim=pass header.d=example.com header.s=ws202609
Prepare dmarc@example.com. Once checks succeed and Google’s prerequisite interval has passed, publish a TXT record at _dmarc.example.com:
v=DMARC1; p=none; rua=mailto:dmarc@example.com
A new received message with the same aligned results can now show dmarc=pass header.from=example.com. DMARC cannot claim a pass before this policy is published (applicable policy prerequisite).
Compare that with an unaligned route:
From: ops@example.com
spf=pass smtp.mailfrom=bounce@example.net
dkim=pass header.d=relay.example.net
dmarc=fail header.from=example.com
Those passes authenticate unrelated domains. Stop expanding that route, identify the sending system, and restore alignment. A fresh received message confirms recovery (aligned identifier requirement). If diagnosis stalls, see the runbook on why DMARC fails when SPF or DKIM appears to pass.
Continue monitoring aggregate reports to fix legitimate failing streams before considering enforcement (remediate legitimate mail). Mailbox providers are not required to send reports, so absence of data is not proof of coverage (reporting limitations).
Frequently asked questions
Can I use Google’s example SPF record as my whole policy?
Only when Google Workspace is the sole authorized sender for your domain. If other systems or third-party tools send mail under that address, merge them into a single record rather than overwriting existing mechanisms.
How long does Google Workspace DKIM take to start authenticating?
Up to 48 hours according to Google documentation, even after publishing DNS records correctly. DNS propagation notices can linger, so verify signing with a live external test message rather than trusting elapsed time.
Can I test DKIM by sending a message to myself?
No. A message to yourself cannot verify activation. Google documents using a Gmail or Workspace recipient; send to an outside inbox and open its full original message.
Do both SPF and DKIM have to align for DMARC to pass?
No. DMARC requires either aligned SPF or aligned DKIM to produce a pass. A pass for both is a useful setup target, but both need not align.
Do I have to wait 48 hours before publishing DMARC?
Google says SPF and DKIM should be authenticating messages for at least 48 hours before DMARC. That is provider guidance rather than an RFC timer, and waiting alone is not proof of readiness.


