How to Set Up Google Workspace SPF in Cloudflare
Short answer
If Google Workspace is your only sender, add a TXT record at your domain’s root in Cloudflare with v=spf1 include:_spf.google.com ~all. If the domain already has an SPF record, edit that record to include Google after inventorying the services it already authorizes.
By Xpoudy ·
Enter the record in the authoritative zone
Go to the domain in Cloudflare and open DNS → Records. Confirm Cloudflare’s assigned nameservers are authoritative for the domain. Search the target hostname’s TXT records for a value beginning with v=spf1 before making a change.
| Field | Root domain example |
|---|---|
| Type | TXT |
| Name | @ |
| Content | v=spf1 include:_spf.google.com ~all |
| TTL | Auto |
Use the sending hostname as the Name when you actually need SPF on a subdomain. An SPF record at the root does not automatically cover an unrelated SPF hostname under it. TXT records used for site verification can coexist with SPF at the same hostname.
Handle another sender without creating a second SPF record
Identify each service authorized in the existing record, including any provider sending on behalf of the domain for invoices, forms or notifications. Merge Google’s mechanism into the current policy only when it belongs there. Keep a copy of the previous value and check lookup usage before saving. Preserve the existing policy choice unless the owner approves a change.
Verify DNS and a real message
Enter the sending domain in Xpoudy’s SPF Checker. Confirm one SPF record resolves and that Google is included. Then send a message to an inbox you control and check the SPF result and envelope domain in its headers. Your visible From domain may differ from the envelope domain. Use that evidence to confirm whether SPF also aligns for DMARC.