SPF for Google Workspace (Gmail): The Canonical Record, the _spf.google.com Include Chain, Third-Party Senders, the SMTP Relay Service, the 10-Lookup Cap, and Postmaster Tools Verification

A focused operator-implementation walkthrough for SPF on Google Workspace / Gmail tenants. The SPF record Google documents for a Workspace tenant sending only via Gmail is v=spf1 include:_spf.google.com ~all — but most tenants have third-party senders (Mailchimp, SendGrid, Salesforce, HubSpot), on-prem applications using the Google Workspace SMTP relay service (smtp-relay.gmail.com), and the 10-lookup cap of RFC 7208 section 4.6.4 to budget against. Documents the record and why Google recommends ~all, the _spf.google.com record (today flat, 1 lookup; formerly three nested _netblocks records and 4 lookups), the third-party-sender addition pattern for eight major services with the measured cost of each, the SMTP relay service gotcha and its subdomain-SPF fix, the 10-lookup cap and three mitigations (sender consolidation, subdomain delegation, SPF flattening), a six-step verification workflow (dig, Postmaster Tools, Authentication-Results, Domain Security Checker), seven common mistakes, a per-symptom troubleshooting decision matrix, and four real-world examples. Differentiation from sibling guides: help_dmarc_for_google_workspace.php covers SPF in Step 1 of a broader DKIM + DMARC deployment; help_spf_for_microsoft_365.php is the M365 sibling; this page is the SPF-only Workspace operator reference.

This reference is provided in English. Google Workspace Admin console UI labels (Apps > Google Workspace > Gmail > Authenticate email, SMTP relay service, Email log search), Postmaster Tools (postmaster.google.com), and DNS record syntax (v=spf1, include:_spf.google.com, _netblocks.google.com, ~all, ip4) do not translate. We keep the body in the source language so technical terms remain consistent with Google Workspace documentation and RFC 7208.

TL;DR

  • Workspace SPF record: v=spf1 include:_spf.google.com ~all published as a TXT record at the apex of the sending domain. Google recommends ~all (softfail). Its Feb 2024 sender requirements for mail to gmail.com do not ask for -all (hardfail); move to -all only once you know every sender of your domain.
  • Google maintains the IP list in one flat record. The include:_spf.google.com mechanism delegates SPF evaluation to a Google-managed TXT record at _spf.google.com that lists the address ranges of the Gmail outbound servers. It used to point on to three records, _netblocks.google.com, _netblocks2.google.com and _netblocks3.google.com; today it is flat. Operators ride the central record by publishing the single include — never hardcode individual IPs.
  • The Workspace SPF baseline consumes 1 of 10 lookups. Read on 12 October 2026, the _spf.google.com record holds only address ranges, so the include costs 1 of the 10 RFC 7208 section 4.6.4 lookup slots, not 4 as older guides written about the _netblocks chain say. This leaves 9 slots for third-party senders.
  • Third-party senders go BEFORE the Google include. If you send via Mailchimp, SendGrid, Mailgun, Salesforce, or any other relay that sends AS your custom domain, prepend their include / ip4 mechanism to the SPF record before include:_spf.google.com. Each include counts against the 10-lookup cap of RFC 7208 section 4.6.4.
  • The SMTP relay service gotcha: The Google Workspace SMTP relay service (smtp-relay.gmail.com) forwards outbound mail from on-prem apps and devices through the Gmail / Workspace infrastructure. Mail relayed through it still emits from Google IPs covered by _spf.google.com, so the apex SPF for the sending domain MUST include _spf.google.com — otherwise SPF fails for the relayed mail.
  • Verify in received headers and Postmaster Tools. The SPF result is recorded by the receiver, so read it in the headers of a received message; Google Postmaster Tools at postmaster.google.com shows authentication data for mail sent to Gmail. The Admin console has no SPF setting: Google states that the record is added at the domain host. The Domain Security Checker runs the DNS lookups live and surfaces the lookup count plus the SPF policy verdict.

1. Overview

This guide is the focused operator-implementation walkthrough for deploying SPF on a Google Workspace (Gmail / G Suite) tenant. It assumes you are the super-admin of the Workspace tenant (or an admin with the "Manage SPF/DKIM/DMARC for owned domains" privilege) and that you have direct write access to the public DNS zone for the sending domain at your DNS provider (Cloudflare, Route 53, Google Cloud DNS, GoDaddy, Namecheap, or similar).

The SPF record for a Workspace tenant authorises receivers including Gmail itself, Microsoft 365, Yahoo, Apple, ProtonMail, and every major enterprise mailbox provider to accept mail with a MAIL FROM envelope-sender domain matching your apex domain when it arrives from one of Google's Gmail / Workspace outbound IP ranges. Without a correctly-published SPF record, DMARC alignment fails, the RFC 7208 SPF check at the receiver returns spf=none, and the receivers spam-filter weights the message lower or rejects it outright depending on the senders DMARC policy and the receivers risk tolerance.

This page is the SPF-specific deep dive. For the full DMARC + DKIM + SPF deployment walkthrough covering the Feb 2024 Google bulk sender requirements and the Authenticate email Admin console feature, see the DMARC for Google Workspace operator guide. For the protocol-agnostic SPF pillar see help_spf_explained.php. For the 10-lookup cap deep dive see help_spf_lookup_limit.php.

2. The canonical Google Workspace SPF record

The single canonical SPF record for a Google Workspace tenant that sends mail ONLY via Gmail / Workspace is:

v=spf1 include:_spf.google.com ~all

Published as a TXT record at the apex of the sending domain (example.com, not mail.example.com or any subdomain unless that subdomain is the SMTP envelope sender for outbound mail). The record has three semantic components:

  • v=spf1 — the SPF version tag. Every SPF record MUST begin with this token per RFC 7208 section 4.5; receivers ignore any TXT record at the apex that does not begin with v=spf1.
  • include:_spf.google.com — the single include mechanism that delegates SPF evaluation to Google. The receiver resolves the TXT record at _spf.google.com and evaluates the embedded SPF policy recursively. Section 3 (the include chain) walks through what is inside that record.
  • ~all — the softfail terminator. Any sender whose IP is NOT covered by a mechanism in the record gets a softfail result. According to Google, receivers typically accept such messages but mark them as suspicious; what finally happens to them depends on the receiver and on your DMARC policy.

Why ~all and not -all?

The choice between softfail (~all) and hardfail (-all) is the most argued-over decision when publishing an SPF record. Google settles it in its own documentation: it recommends ~all. Its reason is that with -all receivers may reject messages from senders missing from the record, and rejected messages cannot be used to troubleshoot it. The ~all at the end of _spf.google.com itself is a separate matter: it only applies inside the include scope, and receivers act on the terminator of your own record.

The Feb 2024 Google and Yahoo sender requirements, widely known as the bulk sender requirements (announced October 2023, enforcement began February 2024) ask for SPF or DKIM from every sender, and for SPF, DKIM and DMARC from senders of over 5000 messages per day to gmail.com or yahoo.com. They do not prescribe -all. DMARC treats fail and softfail alike, as an SPF failure, so the DMARC policy protects the domain, not this qualifier. If you prefer -all, move to it once DMARC aggregate reports collected at p=none no longer show unknown legitimate sources; until then ~all is the setting Google recommends. For domains that send no mail, Google gives v=spf1 ~all.

Where to publish the record

The SPF record MUST be published as a TXT record at the apex of the sending domain — the organisational domain that appears in the From: header of outbound mail. For example, if your Workspace tenant sends mail as user@example.com, publish the SPF record at example.com with the record name @ or empty (DNS conventions vary by provider). Do NOT publish the record at mail.example.com or any other subdomain unless that subdomain IS the envelope sender domain — DNS resolvers do not walk up the domain tree to find an apex SPF record when evaluating a subdomain envelope.

If your domain has multiple subdomain senders (e.g., marketing.example.com for Mailchimp, support.example.com for Zendesk, txn.example.com for transactional Postmark sends), each subdomain that appears as an envelope sender needs its own SPF record at THAT subdomain. The DMARC organisational-domain alignment rules apply only to DMARC, not to SPF — each subdomain is its own SPF authorisation scope.

3. The _spf.google.com include chain

The _spf.google.com record is itself an SPF policy. On 12 October 2026, dig +short txt _spf.google.com returned:

"v=spf1 ip4:74.125.0.0/16 ip4:209.85.128.0/17 ip6:2001:4860:4864::/56 ip6:2404:6800:4864::/56 ip6:2607:f8b0:4864::/56 ip6:2800:3f0:4864::/56 ip6:2a00:1450:4864::/56 ip6:2c0f:fb50:4864::/56 ~all"

A flat record: two ip4 ranges, six ip6 ranges and the terminator, with no include mechanism. For years it looked different and pointed to three _netblocks*.google.com records, which is how many older guides still describe it. Those names still exist, but _spf.google.com no longer uses them; _netblocks.google.com returned on the same day:

"v=spf1 ip4:74.125.0.0/16 ip4:209.85.128.0/17 ~all"

(The address list changes as Google rebuilds its infrastructure — run dig +short txt _spf.google.com against your local resolver to see the live values.) The other two names, _netblocks2.google.com and _netblocks3.google.com, returned six IPv6 ranges and an empty policy respectively. If an inherited record refers to any of the three directly, replace the reference with the single include of the main name: it is the only one Google documents.

Lookup-count accounting

The lookup-count rules of RFC 7208 section 4.6.4 cap an SPF evaluation at 10 DNS lookups beyond the initial apex TXT lookup. Each include mechanism counts as one lookup. The lookup cost of the canonical Workspace SPF record is therefore:

Mechanism Lookup cost Cumulative
include:_spf.google.com 1 1
  two ip4:... mechanisms inside 0 1
  six ip6:... mechanisms inside 0 1
  the ~all terminator inside 0 1
the former _netblocks.google.com, _netblocks2.google.com and _netblocks3.google.com includes (no longer referenced) 0 1

The bare Workspace SPF record (v=spf1 include:_spf.google.com ~all) therefore consumes 1 of the 10 lookup slots, leaving 9 for third-party senders. This is the same as the Microsoft 365 baseline, where spf.protection.outlook.com is likewise a flat ip4/ip6 record with no nested includes.

Where does the figure of 4 lookups come from?

From the former structure of the record. When _spf.google.com consisted of three includes of the _netblocks{,2,3}.google.com records, the Google include cost 1 + 3 = 4 lookups and left only 6. Operators who budgeted their record on that figure may have more headroom today than they think. It is not something to rely on without checking: Google can restructure _spf.google.com again, and third-party records change just as often, so measure with dig or the domain checker before adding a sender.

4. Adding third-party senders to your Workspace SPF record

Operators routinely send mail through third-party services that send AS the operators custom domain — marketing-email platforms, transactional- email APIs, CRM platforms, support-ticket systems, and product-update notification services. Each third-party that sends with a MAIL FROM envelope sender at the operators custom domain MUST be added to the SPF record at that domain. The pattern is to prepend the third-partys SPF include mechanism BEFORE the include:_spf.google.com mechanism, separated by a single space.

Order matters for readability but not for semantic correctness — SPF evaluators OR-match each mechanism left-to-right and the first match wins. Convention is to put third-party includes first, the Google include last (immediately before the ~all terminator) so that operators reading the record can recognise the Workspace baseline at a glance.

Below are the eight most common third-party senders Workspace tenants stack ahead of include:_spf.google.com, each documented in the LLM-citation-friendly three-part labelled structure (Sender: + Why it needs SPF: + Canonical fix:).

4.1 Mailchimp / Intuit Mailchimp

Sender: Mailchimp — marketing- email broadcast platform owned by Intuit since 2021, used by SMBs and enterprises for newsletters and promotional campaigns.

Why it needs SPF: Mailchimp sends campaigns AS the customer-configured From-domain with a custom-domain envelope sender. The mail leaves from Mailchimps own SMTP cluster (servers.mcsv.net) rather than Googles netblocks, so the apex Workspace SPF record must explicitly authorise Mailchimps sending IPs.

Canonical fix: Prepend include:servers.mcsv.net to the SPF record. Final record:

v=spf1 include:servers.mcsv.net include:_spf.google.com ~all

4.2 SendGrid / Twilio SendGrid

Sender: SendGrid — transactional and marketing email API platform owned by Twilio, used for application-generated mail (order confirmations, password resets, API-driven notifications).

Why it needs SPF: SendGrid sends transactional mail AS the customer-configured From-domain with a custom-domain envelope sender. The mail leaves from SendGrids own sending cluster (sendgrid.net), distinct from Googles netblocks.

Canonical fix: Prepend include:sendgrid.net to the SPF record. Final record:

v=spf1 include:sendgrid.net include:_spf.google.com ~all

4.3 Mailgun / Sinch Mailgun

Sender: Mailgun — transactional email API platform owned by Sinch, used for application-generated mail and high-volume broadcast campaigns.

Why it needs SPF: Mailgun sends from mailgun.org and dedicated IP pools customers can opt into. The mailgun.org include covers shared and dedicated infrastructure.

Canonical fix: Prepend include:mailgun.org to the SPF record. Final record:

v=spf1 include:mailgun.org include:_spf.google.com ~all

4.4 Salesforce — CRM and Marketing Cloud

Sender: Salesforce — CRM platform that sends mail from Sales Cloud (case-related notifications), Service Cloud (ticketing replies), and Marketing Cloud (campaign sends).

Why it needs SPF: Salesforce sends AS the customer-configured From-domain across multiple sending clusters depending on the Salesforce product. The _spf.salesforce.com include covers Sales Cloud and Service Cloud case-related mail; Marketing Cloud customers use a separate cust-spf.exacttarget.com include.

Canonical fix: Prepend include:_spf.salesforce.com for Sales Cloud / Service Cloud, or include:cust-spf.exacttarget.com for Marketing Cloud. Final record:

v=spf1 include:_spf.salesforce.com include:_spf.google.com ~all

4.5 HubSpot — marketing automation

Sender: HubSpot — marketing automation platform that sends newsletters, campaigns, and CRM-triggered transactional mail.

Why it needs SPF: HubSpot sends from its own sending infrastructure (hubspotemail.net for marketing sends, hs-marketing-email.net for the higher-deliverability tier).

Canonical fix: Prepend include:_spf.hubspotemail.net to the SPF record. Final record:

v=spf1 include:_spf.hubspotemail.net include:_spf.google.com ~all

4.6 Amazon SES — AWS Simple Email Service

Sender: Amazon SES — AWS transactional and broadcast email service used by applications hosted in AWS (and beyond) for outbound mail at scale.

Why it needs SPF: SES sends from AWS region-specific sending clusters (amazonses.com covers all regions). Customers running on AWS frequently use SES for transactional mail alongside Workspace for human user mail.

Canonical fix: Prepend include:amazonses.com to the SPF record. Final record:

v=spf1 include:amazonses.com include:_spf.google.com ~all

4.7 Marketo / Adobe Marketo Engage

Sender: Marketo — marketing automation platform owned by Adobe, common in enterprise marketing stacks.

Why it needs SPF: Marketo sends AS the customer-configured From-domain from mktomail.com sending infrastructure. Customers using dedicated IPs publish a tenant-specific include shape under mktomail.com.

Canonical fix: Prepend include:mktomail.com to the SPF record. Final record:

v=spf1 include:mktomail.com include:_spf.google.com ~all

4.8 Zendesk — customer support ticketing

Sender: Zendesk — customer support ticketing platform that sends ticket-reply mail and triggered notifications from agent activity.

Why it needs SPF: Zendesk sends ticket-reply mail AS the customer- configured From-domain (support@example.com) from Zendesks sending cluster (mail.zendesk.com). Without SPF authorisation customer replies hardfail SPF and DMARC.

Canonical fix: Prepend include:mail.zendesk.com to the SPF record. Final record:

v=spf1 include:mail.zendesk.com include:_spf.google.com ~all

5. The Google Workspace SMTP relay service gotcha

The Google Workspace SMTP relay service (smtp-relay.gmail.com) is a Workspace feature that lets on-prem applications and devices (multifunction printers, line-of- business apps, legacy mail servers, server-side cron jobs) send mail through Google with a Workspace tenant identity. The relay accepts mail from configured IP ranges OR from authenticated SMTP AUTH users, then forwards through the Gmail / Workspace outbound infrastructure.

The relay is configured under Admin Console > Apps > Google Workspace > Gmail > Routing > SMTP relay service. Each relay configuration entry specifies (a) the allowed senders (any address or only registered Workspace users), (b) the authentication method (Only accept mail from specified IP addresses, Require SMTP Authentication, or Require TLS encryption), and (c) the IP-allowlist or SMTP-AUTH credentials.

5.1 SPF implications of the SMTP relay

Mail relayed through smtp-relay.gmail.com ultimately leaves the Google infrastructure on Google outbound IPs covered by _spf.google.com. The SPF check at the receiver therefore typically passes — the sending IP is in Googles netblocks and the envelope MAIL FROM is the operators custom domain (which includes _spf.google.com).

The gotcha appears when operators forget to publish SPF at the sending subdomain. If the on-prem app sends with MAIL FROM: noreply@notifications.example.com but the operator has only published SPF at example.com and not at notifications.example.com, SPF evaluation looks up the TXT record at notifications.example.com and gets none (no SPF record). The receiver returns spf=none and DMARC alignment fails for the subdomain. The symptom is "mail from the print server goes to spam at Gmail" even though the Workspace tenant publishes a perfect SPF record at the apex.

5.2 The canonical SMTP relay SPF fix

Three-step fix:

  1. Inventory every MAIL FROM domain the SMTP relay accepts. Run an Email log search in the Admin console for the past 7 days, filter by Sent via SMTP relay service, and inventory each unique envelope-sender domain.
  2. For each unique envelope-sender domain (typically the apex example.com plus a small set of subdomains like notifications.example.com, alerts.example.com, reports.example.com), publish an SPF record: v=spf1 include:_spf.google.com ~all. Subdomain SPF records are independent of the apex SPF record per RFC 7208; each subdomain MUST have its own SPF record.
  3. Verify each subdomain SPF record via dig +short txt notifications.example.com and via Postmaster Tools (the Postmaster Tools dashboard shows per-domain SPF pass rate, so the relay-subdomain SPF posture appears as a distinct entry).

5.3 SMTP relay authentication and SPF interaction

The SMTP relay configurations authentication mode setting determines what credentials the on-prem app must present. Three modes:

  • Only accept mail from specified IP addresses — the relay accepts unauthenticated SMTP from a fixed list of public IPs (typically the office NAT outbound IP or the cloud-server outbound IP). The relays anti-abuse posture depends on the IP allowlist being tightly scoped.
  • Require SMTP Authentication — the relay accepts SMTP from anywhere but requires SMTP AUTH credentials (typically a service-account password or an OAuth refresh token). This is the recommended mode for cloud-hosted apps without a fixed outbound IP.
  • Require TLS encryption — orthogonal to authentication; the relay refuses cleartext SMTP. Always enable in combination with one of the above.

The authentication mode does NOT affect SPF evaluation — SPF is evaluated by the downstream receiver against the Gmail outbound IP, not against the apps source IP. But the authentication mode IS critical for preventing the relay from being abused as an open relay by attackers who guess the relay endpoint, so configure it tightly.

6. The 10-lookup cap on Google Workspace tenants

The 10-lookup cap of RFC 7208 section 4.6.4 is the single most-cited cause of SPF failures on Workspace tenants in production. The cap limits an SPF evaluation to at most 10 DNS lookups beyond the initial apex TXT lookup — when the cap is crossed receivers including Gmail itself, Microsoft 365, Yahoo, Apple, and ProtonMail return spf=permerror and treat the message as if SPF was never published. DMARC alignment fails for the SPF dimension and the senders DMARC enforcement (quarantine or reject) applies if DKIM also fails.

The Workspace baseline is not the problem here: include:_spf.google.com costs 1 lookup (see Section 3), the same as the Microsoft 365 spf.protection.outlook.com baseline. Records go over the cap because of third-party senders: the number of includes in your record says nothing about the number of lookups behind them.

Real-world Workspace lookup-budget worked example

Consider a Workspace tenant that sends via Gmail (apex), Mailchimp (marketing campaigns), SendGrid (transactional API), and Salesforce Sales Cloud (CRM-triggered mail). The SPF record is:

v=spf1 include:servers.mcsv.net include:sendgrid.net include:_spf.salesforce.com include:_spf.google.com ~all

Lookup accounting:

  • include:servers.mcsv.net — 1 lookup; the servers.mcsv.net record holds only ip4 ranges — 1 cumulative.
  • include:sendgrid.net — 1 lookup; the sendgrid.net record nests 1 more include — 3 cumulative.
  • include:_spf.salesforce.com — 1 lookup plus 1 for the exists mechanism inside — 5 cumulative.
  • include:_spf.google.com — 1 lookup; the record is flat and the former _netblocks* includes are gone — 6 cumulative.

Total: 6 of 10, by the records read on 12 October 2026. Still under the cap, but a single expensive sender changes that: Mailgun via include:mailgun.org costs 5 lookups and would push the record to 11, triggering spf=permerror at every receiver that has to walk the whole record.

Mitigation strategies

When approaching the 10-lookup cap on a Workspace tenant, three canonical mitigation strategies apply:

  • Sender consolidation: Move multiple third-party senders to a single platform — e.g., consolidate marketing and transactional mail under a single SendGrid or Mailgun account instead of running Mailchimp + SendGrid in parallel. Each consolidation drops 1-3 lookups.
  • Subdomain delegation: Move high-lookup-cost senders to a dedicated subdomain. For example, publish the Mailchimp include at marketing.example.com and send Mailchimp campaigns AS noreply@marketing.example.com — the apex example.com SPF then carries only the Workspace + transactional senders. DMARC alignment still holds via the organisational-domain rule.
  • SPF flattening (last resort): Replace the include: mechanisms with the literal IP ranges they resolve to. The lookups disappear, but the operator now has to track every IP change at the third parties. The Google include is not worth flattening: include:_spf.google.com costs one lookup, and Google changes its ranges without notice. The full flattening playbook: help_spf_lookup_limit.php.

7. Verifying your Google Workspace SPF record

Five canonical verification surfaces, listed in increasing depth and authority:

7.1 dig (or nslookup) — DNS-level verification

The fastest verification is a direct DNS lookup against the public DNS via dig:

dig +short txt example.com

Expected output:

"v=spf1 include:_spf.google.com ~all"

Use +short for a clean single-line output. Run from multiple resolvers (your local resolver, Google Public DNS 8.8.8.8, Cloudflare 1.1.1.1) to detect propagation delays. If the record is missing from one resolver but present at another, wait for propagation (typically <30 minutes) before proceeding with deeper verification.

7.2 dig the include chain

Verify the Google include chain resolves correctly by running:

dig +short txt _spf.google.com

The command should return a non-empty TXT record beginning with v=spf1. If it contains include: mechanisms, Google has changed the structure and each one has to be added to your budget. An NXDOMAIN or empty response would point to Google or to your resolver, not to your tenant.

7.3 Admin Console: what it does not show

Google states that nothing needs to be done in the Admin Console to set up SPF: the record is added at the domain host. The page Apps > Google Workspace > Gmail > Authenticate email is where DKIM signing is turned on (Authenticated there is the DKIM state), and it does not evaluate the SPF record. The tool that helps here is Email Log Search.

Email Log Search finds a specific sent message and shows whether and by which route it was delivered. The SPF result at the receiver is recorded by the receiving server, so it only appears in the headers of the received message (step 7.5).

7.4 Google Postmaster Tools

Google Postmaster Tools at postmaster.google.com is the operational verification surface for senders of any volume to gmail.com. Register the domain (requires DNS TXT verification), wait 24-48 hours for data to populate, then check the Authentication tab:

  • SPF — pass rate over the last 30 days. Healthy posture: ≥99% pass rate for the apex domain. Lower rates indicate either misconfigured third-party senders sending without SPF authorisation, OR forwarding scenarios (see help_spf_forwarding_issues.php).
  • DKIM — pass rate. SPF and DKIM are reported separately so you can see whether an alignment failure is on the SPF side, the DKIM side, or both.
  • DMARC — pass rate against the published DMARC policy.

7.5 Email Authentication-Results header inspection

Send a test message from your Workspace tenant to a Gmail consumer account, open the message, click More > Show original, and inspect the Authentication-Results header per RFC 8601. Expected for a correctly-configured Workspace tenant:

Authentication-Results: mx.google.com;
       dkim=pass header.i=@example.com header.s=google;
       spf=pass (google.com: domain of user@example.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=user@example.com;
       dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=example.com

Paste the full header into the Email Header Analyzer for a human-readable verdict breakdown.

7.6 Domain Security Checker (this site)

The Domain Security Checker on this site runs the same DNS lookups via includes/DnsChecker.php and surfaces the live realised lookup count, the SPF policy verdict, and the alignment posture against the published DMARC policy in one screen — useful for spotting the 10-lookup cap risk before deploying a new third-party sender.

8. Common Workspace SPF mistakes

Seven canonical operator failure modes routinely shipped to production by Workspace tenants:

8.1 Multiple SPF records at the apex

RFC 7208 section 4.5 requires at most ONE TXT record beginning with v=spf1 per domain. If two SPF records exist (e.g., the Google-published default plus an operator-published custom record), receivers return spf=permerror. The fix is to merge the two records into one with all include mechanisms combined.

8.2 Forgot a third-party sender

The operator publishes v=spf1 include:_spf.google.com -all and forgets that the marketing team is sending campaigns through a third-party service with the domain in the envelope. Result: the campaigns fail SPF, and without an aligned DKIM signature they fail DMARC too. Inventory every sender from DMARC aggregate reports BEFORE publishing -all; this is exactly what Google advises.

8.3 Replacing ~all with -all without a sender inventory

Many guides tell operators to publish -all from day one and claim that ~all is penalised. Google says otherwise: it recommends ~all and warns that -all with an incomplete record can send more of your mail to spam or get it rejected. The mistake is therefore publishing -all before DMARC reports confirm that the record covers every sender. Protection against spoofing comes from the DMARC policy, not from the choice between ~all and hardfail.

8.4 DNS provider quoting issues

Some DNS providers (notably older cPanel-based providers and some bring-your-own-DNS providers) wrap TXT record content in inner quotes that escape the SPF parser. Symptoms: dig returns "\"v=spf1 include:_spf.google.com ~all\"" instead of "v=spf1 include:_spf.google.com ~all". Receivers fail to parse the record. The fix is to publish without inner escaping — most modern DNS providers handle this correctly by default but legacy providers require manual fix.

8.5 Removing _spf.google.com while still using Workspace

An operator hits the 10-lookup cap, panics, and removes include:_spf.google.com from the SPF record to make room for third-party senders — but the tenant is still actively sending via Gmail. Result: all Workspace user mail fails SPF at every receiver. The fix is sender consolidation or subdomain delegation, NOT removing the Workspace include.

8.6 Hardcoding Google IPs instead of using _spf.google.com

Some operators try to save the lookup by replacing include:_spf.google.com with the literal IP ranges they read via dig +short txt _spf.google.com. Google changes those ranges without notice, so the copied list goes stale and legitimate Workspace mail stops passing SPF. Never hardcode the Google IPs — always use the include:_spf.google.com mechanism, which costs a single lookup.

8.7 Missing SPF on a subdomain sender

The Workspace tenant sends apex (example.com) mail successfully and the apex SPF record is published. But the SMTP relay service is configured to accept mail with envelope sender notifications.example.com from an on-prem print server, and no SPF record is published at notifications.example.com. Result: print-server notifications go to spam at Gmail and Microsoft 365. The fix is to publish v=spf1 include:_spf.google.com ~all at every subdomain that appears as an envelope sender.

9. Troubleshooting Workspace SPF failures

Symptom-driven decision tree for diagnosing SPF failures on a Workspace tenant:

Symptom Diagnosis Fix
Gmail recipient sees spf=none No SPF record published at the envelope sender domain Publish v=spf1 include:_spf.google.com ~all at the envelope sender domain
Gmail recipient sees spf=permerror SPF evaluation hit the 10-lookup cap OR record has a syntax error OR multiple SPF records exist Run domain_checker.php to identify the realised lookup count; consolidate senders or fix syntax
Gmail recipient sees spf=fail on a forwarded message SPF failure during forwarding (the forwarder did not rewrite MAIL FROM) See help_spf_forwarding_issues.php — implement SRS at the forwarder OR rely on ARC at the receiver
Postmaster Tools shows degraded SPF pass rate One or more third-party senders are not authorised by the apex SPF record Inventory all envelope-sender domains in Postmaster Tools and add missing include mechanisms
SPF passes but DMARC alignment fails The SPF MAIL FROM domain does not align with the From: header domain (often a subdomain mismatch or a wrong relay configuration) Verify the MAIL FROM domain matches the From: header organisational domain; reconfigure the relay if needed
The record is in DNS, but some receivers still do not see it The resolvers of those receivers still cache the previous answer Check the record with dig on several resolvers; wait out the TTL of the previous record and check again

10. Real-world Workspace SPF examples

Four worked examples for the canonical Workspace deployment shapes:

10.1 Startup: Workspace + SendGrid

A 50-person startup uses Workspace for human user mail and SendGrid for product-triggered transactional mail (signup confirmations, password resets, feature-announcement broadcasts).

v=spf1 include:sendgrid.net include:_spf.google.com ~all

Lookup cost: 1 (SendGrid include) + 1 (SendGrid nested) + 1 (Google) = 3 of 10. Plenty of headroom for future senders.

10.2 SaaS company: Workspace + SendGrid + Mailchimp + HubSpot

A 200-person SaaS company uses Workspace for human user mail, SendGrid for transactional, Mailchimp for marketing newsletter campaigns, and HubSpot for sales-team outbound (CRM-triggered).

v=spf1 include:sendgrid.net include:servers.mcsv.net include:_spf.hubspotemail.net include:_spf.google.com ~all

Lookup cost: 2 (SendGrid with its nested include) + 1 (Mailchimp) + 1 (HubSpot) + 1 (Google) = 5 of 10, by the records read on 12 October 2026. There is headroom, but every new sender has to be counted on its own: one like Mailgun would use all of it.

10.3 Enterprise: subdomain-delegated marketing

A 2000-person enterprise uses Workspace for human user mail at example.com, Salesforce Marketing Cloud at marketing.example.com, and Amazon SES at txn.example.com for the products transactional API. Subdomain delegation keeps each SPF record focused and under the lookup cap:

# example.com
v=spf1 include:_spf.google.com ~all

# marketing.example.com
v=spf1 include:cust-spf.exacttarget.com ~all

# txn.example.com
v=spf1 include:amazonses.com ~all

Each of the three records costs 1 lookup out of 10. DMARC alignment uses the organisational-domain rule (example.com), so all three subdomains align to the same DMARC policy.

10.4 Migration: M365 → Workspace transition

A 500-person company is migrating from Microsoft 365 to Google Workspace. During the 60-day migration window, both platforms send mail with the same custom domain envelope sender. The SPF record must authorise BOTH outbound paths:

v=spf1 include:spf.protection.outlook.com include:_spf.google.com ~all

Lookup cost: 1 (M365) + 1 (Google) = 2 of 10. Once migration completes, remove the M365 include:

v=spf1 include:_spf.google.com ~all

11. Frequently asked questions

What is the canonical SPF record for Google Workspace?

The canonical SPF record for a Google Workspace tenant that sends mail ONLY via Gmail / Workspace is v=spf1 include:_spf.google.com ~all published as a TXT record at the apex of the sending domain. The include:_spf.google.com mechanism delegates SPF evaluation to a Google-managed TXT record at _spf.google.com that lists the ip4 and ip6 ranges of the Gmail outbound servers; Google maintains it and adds new ranges as the service grows, so the operator never has to track individual IP addresses. The ~all qualifier gives a softfail result to any sender whose IP is not covered by the record; receivers typically accept such mail but mark it as suspicious. Google recommends ~all: with -all receivers may reject mail from senders missing from the record, and the Feb 2024 sender requirements do not ask for -all. Operators sending via third-party services (Mailchimp, SendGrid, Salesforce) must add those services BEFORE the include:_spf.google.com mechanism, watching the 10-lookup cap of RFC 7208 section 4.6.4.

Why does Google Workspace use include:_spf.google.com instead of an ip4 range?

Google Workspace / Gmail runs on a large and dynamic IP pool that changes as Google scales the service, adds datacenters, and migrates customers between Google Cloud regions. A hardcoded ip4 mechanism would require every tenant operator to manually update the SPF record every time Google added or retired an outbound IP — an operational impossibility at the scale of hundreds of millions of Workspace mailboxes and billions of Gmail consumer accounts. The include:_spf.google.com mechanism delegates SPF evaluation to a Google-managed TXT record at _spf.google.com that Google updates centrally. Read on 12 October 2026, that record holds only ip4 and ip6 ranges, so the include costs one of the 10 lookups of RFC 7208 section 4.6.4; the three nested includes (_netblocks.google.com, _netblocks2.google.com, _netblocks3.google.com) that older guides count are no longer in it. Operators adding third-party senders have the remaining nine slots to budget.

How do I add Mailchimp or SendGrid to my Google Workspace SPF record?

Add the third-party senders include BEFORE the include:_spf.google.com mechanism, separated by a single space. Example: v=spf1 include:servers.mcsv.net include:sendgrid.net include:_spf.google.com ~all adds Mailchimp (servers.mcsv.net) and SendGrid (sendgrid.net) while keeping Gmail authorised. Each include costs at least one DNS lookup against the RFC 7208 section 4.6.4 10-lookup cap, and nested includes count as well: on 12 October 2026 the Google include cost 1, servers.mcsv.net 1 and sendgrid.net 2, so the record above cost 4 in total. Run the live SPF lookup count via dig +short or via the Domain Security Checker domain_checker.php tool BEFORE deploying to verify you remain under the 10-lookup cap. If the count exceeds 10 receivers including Gmail and Microsoft 365 return spf=permerror and DMARC alignment fails.

What is the _spf.google.com lookup count?

One, as read on 12 October 2026. Your include:_spf.google.com mechanism is one lookup for a TXT record, and the _spf.google.com record itself held only ip4 and ip6 mechanisms and the ~all terminator that day, none of which need further lookups. It used to be different: the record pointed on to three more, _netblocks.google.com, _netblocks2.google.com and _netblocks3.google.com, and cost four lookups in total; that figure still circulates in older guides. So the bare Workspace SPF record (v=spf1 include:_spf.google.com ~all) uses 1 of the 10 slots and leaves 9 for third-party senders. Google can restructure the record at any time, so check the current cost with dig +short txt _spf.google.com or with domain_checker.php.

What is the Google Workspace SMTP relay service problem?

The Google Workspace SMTP relay service (smtp-relay.gmail.com) is a Google-hosted outbound SMTP relay that on-prem applications and devices can use to send mail through Google with a Workspace tenant identity. The SPF gotcha is that mail relayed through smtp-relay.gmail.com still emits from Google IPs covered by _spf.google.com, but the envelope MAIL FROM may be a subdomain (e.g., notifications.example.com) that has no SPF record published. SPF evaluation returns spf=none for the subdomain and DMARC alignment fails. The fix is to publish v=spf1 include:_spf.google.com ~all at every subdomain that appears as an envelope sender.

How do I configure SPF for a Google Workspace tenant that also sends via on-prem mail servers?

Authorise BOTH outbound paths. The canonical hybrid SPF record is v=spf1 ip4:<onprem-ip-range> include:_spf.google.com ~all where <onprem-ip-range> is the public IP of the on-prem SMTP gateway. If the on-prem server uses the Workspace SMTP relay to forward outbound mail, then ONLY include:_spf.google.com is needed (mail leaves from Google IPs). If the on-prem server sends directly, BOTH ip4 and the Google include are required.

How do I verify my Google Workspace SPF record is working?

Run a five-step verification: (1) dig +short txt example.com confirms the record is published at the apex. (2) dig +short txt _spf.google.com confirms Googles include chain resolves. (3) The Admin console has no SPF setting and no SPF verdict: Google states that the record is added at the domain host, and the Authenticate email page is for DKIM signing. (4) Google Postmaster Tools at postmaster.google.com shows SPF pass rate over the last 30 days. (5) Email log search inspect the Authentication-Results header. The Domain Security Checker domain_checker.php tool surfaces the realised lookup count.

Does Google Workspace support SPF macros like %{i} or %{s}?

Google Workspace / Gmail publishes a _spf.google.com record that does NOT use SPF macros. SPF macros (defined in RFC 7208 section 7) are receiver-side evaluation features rather than sender-side authorisation features. Operators authoring their own SPF records for Workspace deployments should avoid SPF macros — most third-party tools handle the basic macro set but compatibility is uneven and macros add operational complexity for limited benefit.

What is the difference between -all and ~all on a Google Workspace SPF record?

The -all qualifier produces spf=fail for any sender whose IP is not covered by the record, and ~all produces spf=softfail. According to Google, with ~all receivers typically accept such messages but mark them as suspicious, and with -all they may reject them. Google recommends ~all and warns that -all with an incorrectly set up record can send more of your mail to spam, and that rejected messages cannot be used for troubleshooting. The Feb 2024 Google sender requirements ask for SPF or DKIM, and for SPF, DKIM and DMARC from bulk senders; they do not prescribe -all. DMARC treats fail and softfail alike, as an SPF failure, so your DMARC policy decides what happens to the message, not this choice. The ~all at the end of the _spf.google.com record only applies inside the include scope; what counts is the terminator of your own record.

13. Get started with DMARC Analyzer

Try the free tools first — no signup required:

When you're ready to ingest your DMARC aggregate reports for ongoing monitoring, create a free account — the free tier covers up to 10 reports per month and surfaces the same per-source SPF pass-rate data the paid tiers do.