Email security

Google Workspace SPF Record: Setup, Syntax and Troubleshooting in 2026

One wrong SPF record can send your Google Workspace mail to spam — or let spoofers send as you. Here is the exact setup, step by step.

Cysoro Security TeamPublished · 7 min read
v=spf1 include:_spf.google.com~allSPF: PASS ✓TXT record • one per domainEMAIL SECURITYGoogle WorkspaceSPF recordSetup, syntax and fixes
Quick answer

A Google Workspace SPF record is a DNS TXT record that lists the servers allowed to send mail for your domain. If you send only through Google Workspace, the record is v=spf1 include:_spf.google.com ~all. Add it as a TXT record at your domain host, keep exactly one SPF record per domain, and then set up DKIM and DMARC as well, because SPF alone does not stop spoofing of the visible From address.

Key takeaways

  • Google Workspace only: use v=spf1 include:_spf.google.com ~all as a single DNS TXT record.
  • Keep exactly one SPF record per domain and stay under the 10 DNS lookup limit in RFC 7208.
  • SPF checks the envelope sender, not the visible From address — add DKIM and DMARC to stop spoofing.

Your Google Workspace mail is being marked as spam, or a customer asks why a spoofed invoice arrived "from" your domain. In both cases, the first thing to check is your SPF record — a single line of text in DNS that tells the world which servers may send mail as you.

What is a Google Workspace SPF record?

A Google Workspace SPF record is a DNS TXT record that lists Google's mail servers as authorized senders for your domain. SPF helps prevent your outgoing email from being marked as spam by receiving servers, which check the record to verify that messages came from authorized servers.

SPF stands for Sender Policy Framework, defined in RFC 7208. The domain owner publishes a TXT record listing authorized sending hosts and IP addresses; receivers compare the connecting server's IP against that list. If you send only through Google Workspace, Google's published record is: v=spf1 include:_spf.google.com ~all

That one line is the whole record for the simple case. The complexity comes when you also send through Mailchimp, Salesforce, Shopify, Amazon SES or another service — each one must be added to the same single record.

How SPF is checked1. You send mailvia Google2. Receiver asks DNSTXT record foryour domain3. Compare IPis the senderin the list?4. Pass / failpass, softfailor failv=spf1 include:_spf.google.com ~allv=spf1 = version • include: = authorized sender • ~all = soft fail for the restSPF checks the envelope sender (Return-Path), not the From address you see.
SPF in four steps: publish the list, receivers check it, unlisted senders fail. Illustration by Cysoro.

How do you set up an SPF record for Google Workspace?

Setup takes three steps: identify all your senders, build the single record, and add it at your domain host. You do not need to do anything in the Google Admin console to set up SPF.

Step 1: Identify all your email senders

Your SPF record should include the domains or IP addresses of all servers that send mail for your organization. In simple cases, all mail is sent using Google Workspace only. In other cases, senders may include web servers, on-premise mail servers, outbound gateways, contact-form services and any third-party provider that sends mail for your domain.

Ask your website admin and each third-party service for their SPF include value before you build the record. A sender you forget will start failing SPF and landing in spam.

Step 2: Determine your SPF record

If you use only Google Workspace, copy this line: v=spf1 include:_spf.google.com ~all

If you use common senders alongside Google Workspace, Google publishes these combinations:

SendersSPF record
Google Workspace onlyv=spf1 include:_spf.google.com ~all
Google Workspace + Amazon SESv=spf1 include:_spf.google.com include:amazonses.com ~all
Google Workspace + GoDaddyv=spf1 include:_spf.google.com include:secureserver.net ~all
Google Workspace + Mailchimpv=spf1 include:_spf.google.com include:servers.mcsv.net ~all
Google Workspace + Microsoft 365v=spf1 include:_spf.google.com include:spf.protection.outlook.com ~all
Google Workspace + Salesforcev=spf1 include:_spf.google.com include:_spf.salesforce.com ~all
Google Workspace + Shopifyv=spf1 include:_spf.google.com include:shops.shopify.com ~all
Google Workspace + Zendeskv=spf1 include:_spf.google.com include:mail.zendesk.com ~all

Use the table as a guide and replace domains with the domains of your own senders. SPF records always start with v=spf1, use include: in front of each sender domain, and can have up to 10 include: tags in the lookup count — see the limit section below.

Step 3: Add the SPF record at your domain host

Sign in to your domain host, typically where you purchased your domain name, and go to the page where you update DNS TXT records. Add or update the TXT record with these values:

FieldValue to enter
TypeTXT
Host / Name@ for your main domain, or the subdomain name for a subdomain
ValueYour SPF record, for example v=spf1 include:_spf.google.com ~all
TTLLeave the default, or 3600 seconds

Some hosts require the value in quotes. If you use subdomains, add an SPF record for each subdomain that sends mail. If you set up SPF for more than one domain, complete the steps for each domain — each domain must have its own record. It can take up to 48 hours for SPF authentication to start working.

What does SPF syntax mean?

Every SPF record is a list of mechanisms, evaluated left to right, with the first match deciding the result. The qualifiers in front of a mechanism set the verdict when it matches.

PartMeaning
v=spf1Version tag, always first
include:domainCheck that domain's SPF record recursively; counts as a DNS lookup
ip4:192.0.2.0/24Authorize an IPv4 range; no DNS lookup
ip6:2001:db8::/32Authorize an IPv6 range; no DNS lookup
a / mxAuthorize the domain's A or MX hosts; each counts as a lookup
+allPass everything — never use this, it authorizes the whole internet
~allSoft fail: mark unlisted mail as spam (Google recommends this)
-allHard fail: reject unlisted mail (strongest, use only when the list is complete)
?allNeutral: no assertion about unlisted mail

RFC 7208 defines seven possible results: pass, fail, softfail, neutral, none (no record), temperror (temporary DNS error) and permerror (permanent error, for example multiple records or too many lookups). A PermError is the silent killer: many receivers treat it as a fail.

What is the 10 DNS lookup limit?

RFC 7208 imposes a hard limit: SPF evaluation must not cause more than 10 DNS mechanisms or modifiers that require lookups. Each include:, a, mx, ptr and exists: counts, and includes resolve recursively, so one include can consume several lookups.

Google's _spf.google.com include itself resolves to several lookups. Add Mailchimp, Salesforce, Zendesk and a few more, and a record that looks short can exceed 10 lookups and return PermError. That is why large senders flatten their SPF records — replacing includes with the actual IP ranges they resolve to — or move senders to a subdomain with its own SPF record.

Count lookups before you publish, with an SPF checker that shows the count. If you are over 10, remove senders you no longer use, use ip4: ranges instead of includes where the vendor publishes them, or split a service onto a subdomain such as mail.example.com with its own record.

How do you verify your SPF record works?

First, check the published record with the free SPF checker. It shows the record, flags duplicates and lookup errors, and confirms the syntax is valid. Fix the first error it reports, then re-check.

Second, send a test message from Google Workspace to an external address and inspect its headers. Look for Authentication-Results and spf=pass. In Gmail, open the message, click the three dots, then "Show original" to see the full headers.

Third, check the Google Admin console under Apps, then Gmail, then Authenticate email. Google shows the status of SPF, DKIM and DMARC for your domain. If SPF shows a warning, edit the existing TXT record to include _spf.google.com — do not add a second record.

How do you fix common SPF problems?

Most SPF failures come from a short list of mistakes. Work through them in order.

  • Two SPF records: merge them into one. Delete the second TXT record that starts with v=spf1.
  • Missing sender: a new marketing tool or form service was never added. Add its include and wait for DNS to propagate.
  • Too many lookups: flatten the record or move a sender to a subdomain, as described above.
  • Wrong host: the record was added to a subdomain instead of the root domain, or vice versa. The host should be @ for your main domain.
  • Forwarding breaks SPF: SPF breaks plain forwarding, because the forwarder's IP is not in your list. This is expected — DMARC alignment and DKIM survive forwarding better, which is another reason to set both up.
  • DNS not propagated: changes can take up to 48 hours. Wait, then re-test.
SPF is one of three checks — use all threeSPFWas the sendingserver authorized?Checks envelope senderDKIMWas the messagesigned and unchanged?Digital signatureDMARCDoes it align withthe visible From?Policy: none → rejectSPF alone cannot stop From-address spoofing. DMARC aligned with DKIM can.
SPF, DKIM and DMARC each check a different thing. Illustration by Cysoro.

How does SPF compare with DKIM and DMARC?

SPF, DKIM and DMARC are three different checks, and Google recommends setting up all three. SPF checks whether the sending server was authorized, using the envelope sender.

DKIM adds a digital signature that proves the message was not altered in transit. DMARC ties them together: it checks whether SPF or DKIM aligns with the visible From domain, and tells receivers what to do when alignment fails.

Bulk senders are required by Google to set up SPF, DKIM and DMARC, under Google's email sender guidelines. Start DMARC at p=none, watch the reports, then tighten to quarantine and finally p=reject.

Our guide to what DMARC is walks through that path.

Our guide to what DKIM is covers key generation in Google Workspace.

Google publishes the exact SPF values in its Set up SPF help page.

The standard itself is RFC 7208, which defines the 10-lookup limit and the result codes.

The bottom line

For Google Workspace only, your SPF record is v=spf1 include:_spf.google.com ~all — one TXT record, at your domain host, with no second record and no more than 10 DNS lookups. Add every other sender to that same record, verify with an SPF checker, and then set up DKIM and DMARC.

Check your record now with the free SPF checker.

If you also need DKIM and DMARC, follow our DMARC setup guide next.

Frequently asked questions

What is the Google Workspace SPF record?

It is the DNS TXT record v=spf1 include:_spf.google.com ~all, which tells receiving servers that Google's mail servers are authorized to send mail for your domain. Google publishes this exact value in its Workspace Help documentation.

Where do I add the SPF record for Google Workspace?

At your domain host, where you bought your domain, not in the Google Admin console. Add a TXT record with host @ for your main domain and the SPF value as its content. DNS changes can take up to 48 hours to take effect.

Can I have more than one SPF record?

No. A domain must have exactly one SPF record. Two records cause a PermError, and many receivers will treat that as a failure. If you use several senders, combine all of them into the single record.

What does ~all mean in an SPF record?

The ~all tag is a soft fail: it tells receiving servers to mark mail from unlisted servers as spam, rather than rejecting it outright. Google recommends ~all. The stricter -all tells receivers to reject unlisted mail, which is stronger but riskier if you forgot a sender.

Why is my Google Workspace mail going to spam?

Common causes are a missing or duplicate SPF record, an SPF record that exceeds 10 DNS lookups, a missing DKIM key, no DMARC policy, or a new sender that was never added to the record. Check each record with an SPF checker and fix the first error it reports.

How do I check if my SPF record is working?

Use a free SPF checker or look at the Authentication-Results header in a received message for spf=pass. You can also use Cysoro's free SPF checker to see your published record and whether it is valid.

Do I need SPF if I bought my domain from Google?

You may not. If you bought your domain from a Google partner when you signed up for Google Workspace, SPF may already be set up by default. Check your published record first before adding another one.

Does SPF stop email spoofing?

Only partly. SPF checks the envelope sender, the Return-Path address, not the From address people see. An attacker can pass SPF with their own domain while spoofing your From address. DMARC, aligned with DKIM, is what stops visible From spoofing.

Sources

  1. Google Workspace Help — Set up SPF
  2. IETF — RFC 7208: Sender Policy Framework (SPF)
  3. Wikipedia — Sender Policy Framework
  4. Google — Email sender guidelines
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against Google Workspace Help on setting up SPF, Google's email sender guidelines, and RFC 7208, the SPF standard.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free