schedule 14-min read

The Google Workspace SPF Record Explained

DMARC AI editorial team · Last updated

What v=spf1 include:_spf.google.com ~all means, how many DNS lookups it costs, how to add other senders in one record and what MSPs should check.

01

Introduction

The Google Workspace SPF record is v=spf1 include:_spf.google.com ~all, published as a single TXT record on the domain. It authorises Google's outbound mail servers to send for that domain and softfails everything else. If the domain also uses a newsletter platform, CRM or other sender, those go into the same record, never a second one.

This guide takes the record apart mechanism by mechanism, counts what it costs against the 10 DNS lookup limit in RFC 7208, and covers the parts Google's setup page leaves out: DMARC alignment, the SMTP relay service, send-as addresses, subdomains and a checklist for MSPs (managed service providers) running many Workspace tenants. For SPF fundamentals, start with the SPF guide.

02

Key takeaways

  • Google's recommended record for a Workspace-only domain is v=spf1 include:_spf.google.com ~all, and Google recommends ~all rather than -all.
  • When we queried it in November 2026, _spf.google.com contained only ip4 and ip6 mechanisms, so the include cost one DNS lookup. Recount it during every audit, because Google can change it.
  • Workspace mail uses the sender's own domain as the envelope sender, so an SPF pass is aligned for DMARC. DKIM still needs its own setup.
  • One domain, one SPF record. Every other sender is added to that record, and each sending subdomain needs a record of its own.
  • Mail relayed through smtp-relay.gmail.com leaves from Google's servers, so the device behind it does not need its own SPF entry.
03

What is the Google Workspace SPF record?

It is the TXT record Google tells you to publish if Workspace is your only sender. Google's Set up SPF page gives the exact value: "If you use only Google Workspace to send email, copy this line of text: v=spf1 include:_spf.google.com ~all". You publish it at your DNS host, not in the Admin console.

In zone file form, for a client domain:

clientco.co.uk.  3600  IN  TXT  "v=spf1 include:_spf.google.com ~all"

Google notes that "You don't need to do anything in your Google Admin console to set up SPF", and its troubleshooting page warns that it "can take up to 48 hours after adding an SPF record for SPF authentication to start working".

04

What does each part of v=spf1 include:_spf.google.com ~all mean?

The record has three terms: a version tag, one include mechanism and a closing all with the softfail qualifier. A receiver reads them left to right and stops at the first mechanism that matches the connecting IP address.

Term Type What it does DNS lookups
v=spf1 Version tag Marks the TXT record as SPF. It must come first, and a record without it is ignored as SPF. 0
include:_spf.google.com Mechanism Runs an SPF check against Google's published record. If the sending IP passes there, it passes here. 1, plus any lookups inside Google's record
~all Mechanism with ~ qualifier Matches every IP not listed earlier and returns softfail. 0

Two details are easy to misread. First, include does not copy Google's IP ranges into your record; it evaluates Google's record and uses the result. RFC 7208, Section 5.2 also says that if the included domain has no SPF record, the result is permerror, so a typo such as _spf.gogle.com breaks SPF for the whole domain. Second, the include name starts with an underscore. Records that drop it (include:spf.google.com) or point at gmail.com are common inherited mistakes.

05

How many DNS lookups does _spf.google.com use?

When we queried public resolvers in November 2026, the include cost exactly one lookup. _spf.google.com returned a flat record containing only ip4 and ip6 ranges and ~all, with no further includes. RFC 7208 counts include, a, mx, ptr, exists and redirect, but not ip4, ip6 or all.

The relevant rule is in RFC 7208, Section 4.6.4: implementations "MUST limit the total number of those terms to 10 during SPF evaluation", and they "SHOULD limit 'void lookups' to two". Exceeding 10 produces permerror, which means no SPF pass for any sender on the domain.

Some guides, and some older articles on this site, give Google a higher count. Google also still publishes separate _netblocks.google.com records, which helps explain why figures differ. The practical rule for an MSP: do not hard-code a number in your runbook. Check the live expansion with our SPF analyzer or DNS lookup tool each time you audit a client, because Google controls that record and can restructure it without notice.

Google's own help text phrases the limit loosely. Its SPF records overview says the record "shouldn't include more than 10 references to other domains or servers", while the troubleshooting page adds: "Be aware of nested lookups, which count toward the limit of 10 DNS lookups." The second wording is the accurate one. If the lookup count is already tight, SPF too many DNS lookups covers the fixes.

06

Should a Workspace domain use ~all or -all?

Use ~all unless the client has a specific reason for hardfail. Google states plainly: "Google recommends you use ~all in your SPF record." Its overview adds that a fail qualifier "might cause more messages from your domain to be sent to spam" if the record is incomplete.

With DMARC at enforcement, the difference shrinks. DMARC only asks whether SPF produced an aligned pass, and softfail and fail are both "not pass". The real risk of -all is early rejection of forwarded mail before DKIM and DMARC are evaluated, a risk RFC 9989 itself describes. The full comparison, including what Microsoft and GOV.UK recommend, is in SPF ~all vs -all with DMARC.

07

How do I add other senders to the Google SPF record?

Add them to the same record, before the all. Google's guidance is "Use the include: tag in front of each sender domain (or IP address) in your SPF record", and its troubleshooting page is explicit: "If you have more than one SPF record, consolidate all your SPF records into a single record."

A merged record for a client that also uses an email service provider (ESP) and a fixed on-premises IP might look like this. Replace the placeholder include with the exact value your provider documents:

clientco.co.uk.  3600  IN  TXT  "v=spf1 include:_spf.google.com include:_spf.esp.example ip4:198.51.100.25 ~all"

Rules for merging:

  1. Keep include:_spf.google.com once. Duplicating it wastes a lookup and adds nothing.
  2. Use ip4 or ip6 for fixed servers such as a scanner relay or a line-of-business application. They cost no lookups.
  3. Keep exactly one all, at the end. Anything after all is never evaluated.
  4. Check whether the ESP needs an include at all. Many ESPs send with their own bounce domain in the envelope, so your apex SPF record is never checked for that mail. An include there adds a lookup and gives no DMARC benefit. Aligned DKIM, or a custom return-path subdomain if the ESP supports one, is what makes that mail pass DMARC.
  5. Recount the lookups after every change.

If a client already has two v=spf1 records, SPF returns permerror for all mail. Multiple SPF records walks through the merge step by step.

08

Does SPF align with DMARC for mail sent from Google Workspace?

Yes, for normal user mail. When a Workspace user sends from their address on clientco.co.uk, the envelope sender (the SMTP MAIL FROM, shown as Return-Path) uses the same domain. SPF is checked against clientco.co.uk, and the pass aligns with the visible From domain, which is what DMARC requires.

You can confirm it in a received message. The Return-Path header and the smtp.mailfrom value in Authentication-Results should show the client's own domain. The email header analyzer shows both.

SPF alone is still not enough, for two reasons:

  • Forwarding breaks SPF. Once a recipient forwards the message, the forwarder's IP is not in your record. Only DKIM survives that hop.
  • DKIM needs its own setup. Google's Set up DKIM page lists the path as Menu > Apps > Google Workspace > Gmail > Authenticate email, with google as the default selector. Until the client's own key is active, messages may carry a Google-generated signature on a gappssmtp.com domain. That d= domain is not the client's domain, so it can never align for DMARC. What that header looks like and how to find affected tenants is covered in gappssmtp.com in email headers.

Check the d= tag in a sent message's DKIM-Signature header during onboarding. DMARC alignment explained covers how relaxed alignment compares the domains.

09

How does the SMTP relay service affect SPF?

Mail routed through the Workspace SMTP relay service leaves from Google's servers, so it is covered by include:_spf.google.com. The printer, scanner or application server behind the relay does not need its own ip4 entry, because receivers see Google's IP, not the device's.

Google's SMTP relay guide has devices point at smtp-relay.gmail.com on port 587. The setting lives under Menu > Apps > Google Workspace > Gmail > Routing. Two points matter for SPF and DMARC:

  • Allowed senders. The options are "Only registered Apps users in my domains", "Only addresses in my domains" and "Any addresses (not recommended)". The first two keep relayed mail on the client's own domains.
  • Envelope rewriting. Google says that "If the sender is not in one of your domains, the system changes the envelope sender from user@domain_you_don't_own to postmaster@your_domain." SPF is then checked against the client's domain, while the From header still shows the external domain, so that mail will not align for the external domain.

If a device sends directly to the internet instead of through the relay, its public IP needs an ip4 entry. Send a test message through the relay and check the headers for an aligned SPF and DKIM pass before relying on it.

10

What about Gmail send-as addresses and secondary domains?

Each domain that appears in the envelope needs its own SPF record. Google says "Each domain must have its own SPF record", so secondary domains and alias domains in a Workspace tenant need include:_spf.google.com too, not just the primary domain.

For "Send mail as" with an address on another provider, the SPF record that matters belongs to whichever server actually sends. If the user sends through the other provider's SMTP server, that provider's SPF applies. Google's send-as help page also says that from January 2027 Gmail will stop supporting "Send as" for third-party addresses such as Yahoo or Outlook. Workspace aliases and other Gmail addresses are not affected.

11

Do subdomains need their own Google SPF record?

Yes, if they send mail. SPF records are not inherited, and Google says "If you use subdomains, you must add an SPF record for each subdomain." A subdomain that sends through Workspace gets its own include:_spf.google.com record.

mail.clientco.co.uk.  3600  IN  TXT  "v=spf1 include:_spf.google.com ~all"
noreply.clientco.co.uk.  3600  IN  TXT  "v=spf1 -all"

Subdomains that never send should publish v=spf1 -all. DMARC treats subdomains separately from SPF, through inheritance, the sp tag and the newer np tag. DMARC for subdomains explains how they interact.

12

What are the most common Google SPF record mistakes?

Most failures come from inherited records nobody has reviewed. These are the ones to check on every new Workspace client.

Mistake Example Effect Fix
Two SPF records Separate records for Google and an ESP permerror for all mail Merge into one record
Missing underscore include:spf.google.com Google's IPs not authorised Use include:_spf.google.com
Wrong include include:gmail.com Google's IPs not authorised Replace with the Workspace include
Text after all ~all include:_spf.esp.example Later terms never evaluated Move all to the end
Old MX-era terms a mx left over from a previous host Wasted lookups, possibly wrong IPs Remove if the old host no longer sends
+all or ?all v=spf1 include:_spf.google.com +all Any IP passes, or no assertion End with ~all
Too many lookups Seven includes on top of Google permerror once over 10 Remove dead senders, move to DKIM
No record on alias domain Secondary domain sends without SPF SPF none for that domain Publish the same record there
Quoting errors Quotation marks pasted into the value Invalid record Follow the DNS host's TXT format

Google lists the last one itself: "Typos, extra spaces, or the incorrect use of quotation marks can make the SPF record invalid." SPF record best practices covers the wider hygiene rules.

13

What should an MSP check across Workspace clients?

Run the same short audit for every Workspace tenant at onboarding and at each quarterly review. Most of it needs only DNS access.

  1. List every domain in the tenant, including secondary and alias domains, and confirm each sending domain has exactly one SPF record.
  2. Confirm the Google include is present and spelt include:_spf.google.com.
  3. Count lookups live rather than trusting a number in the runbook.
  4. Compare the record with DMARC aggregate reports. Each include should match a source you can see, and each legitimate source should pass SPF or aligned DKIM.
  5. Check DKIM in the Admin console for every domain, and the d= value in a test message.
  6. Review the SMTP relay setting and its allowed senders option.
  7. Publish v=spf1 -all on non-sending subdomains and parked domains.
  8. Record the reason for every include in the client's documentation, so the next engineer can remove dead ones safely.

The DMARC for Google Workspace implementation guide covers the full rollout, from DKIM to p=reject, and the DMARC onboarding checklist fits these checks into client onboarding.

14

Frequently asked questions

Is include:_spf.google.com the same for Gmail and Google Workspace?

Google publishes include:_spf.google.com for Workspace domains. A personal @gmail.com address does not need you to publish anything, because the domain is Google's. The record matters only when mail is sent with your own domain through Google, which is a Workspace setup.

Does Google Workspace need an SPF record if DKIM is set up?

Yes. Google's bulk sender rules require both SPF and DKIM, and SPF gives DMARC a second aligned path when DKIM fails, for example after a key problem. SPF without DKIM is weaker still, because forwarding breaks it. Publish both and let DMARC use whichever passes.

Can I use -all with Google Workspace?

You can, and DMARC will treat it the same as ~all. Google recommends ~all, and -all risks receivers rejecting forwarded mail before DKIM is checked. Use hardfail when a client policy or auditor requires it, and only after DKIM is enabled.

How do I check how many lookups my Google SPF record uses?

Paste the domain into an SPF checker that expands every include, such as our SPF analyzer. It counts each include, a, mx, ptr, exists and redirect, including nested ones. Stay well below 10 to leave room for the next sender a client signs up for.

15

Next steps

Pull the SPF record for each Workspace client, confirm there is one record with include:_spf.google.com and a single ~all, and count the lookups live. Then check DKIM, because SPF on its own does not survive forwarding. DMARC aggregate reports show which sources pass SPF for each client domain; DMARC AI processes those reports across client tenants and highlights sources that fail SPF or alignment. For clients on Microsoft 365 instead, see the Microsoft 365 SPF record explained.

Related articles

Related tools

Ready to Implement?

Get authenticated mail moving in minutes: start free, book a guided demo, or talk to the team about your stack.