Skip to main content
Google Workspace SPF record: the exact value and how many lookups it uses
Email Authentication

Google Workspace SPF record: the exact value and how many lookups it uses

The Google Workspace SPF record is v=spf1 include:_spf.google.com ~all. See the host, the TTL, and how Google's include uses 4 of the 10 lookups SPF allows.

Brain Lucas
Brain Lucas
Author

Publish one TXT record at your domain host. Use the valuev=spf1 include:_spf.google.com ~allas Google Workspace Admin Help documents for domains that send only through Google Workspace.

Google's SPF record includes 4 of the 10 DNS lookups SPF allows. Google says the record can take up to 48 hours to start working.

What you need before you edit DNS

Have three things ready before you start.

  • Login access to the DNS records at your domain host.

  • A written list of every service that sends mail from your domain.

  • A Gmail address that can receive a test message.

This page covers Google Workspace domains, new or old, with one mailbox or many. A domain that sends only through Microsoft 365 is not covered.

The record you build here applies to outgoing mail. Incoming mail depends on your Google Workspace MX records.

Read what your domain publishes now

Read what your domain publishes before you change anything. Google documents these Check MX steps, which list SPF names under Effective SPF Address Ranges.

A domain that already uses Google's include shows four names in that list.

Steps:

  1. Go to the Google Admin Toolbox Check MX tool.

  2. Enter your domain name.

  3. Click Run Checks!

  4. When the test finishes, click Effective SPF Address Ranges.

Confirm: Look for _spf.google.com, _netblocks.google.com, _netblocks2.google.com and _netblocks3.google.com.

Google's page shows IP addresses after the last three. A missing name shows the record needs the next two sections.

Remove the wrong records before you add the right one

Three faults can sit in a record you already published. Each has a short fix.

Two SPF records on one domain

The About SPF page from Google says: "Each domain can have one SPF record."

RFC 7208 section 4.5 returns PERMFAIL when a domain publishes more than one.

Steps:

  1. Copy every include: term from each SPF record.

  2. Delete all but one record.

  3. Paste the copied terms into the record you kept.

Confirm: Your DNS editor lists one TXT value that starts with v=spf1.

A record at the wrong host

The host field sets where a record applies. For the root domain, Google's setup page says to enter the @ symbol. An older thread with 24 replies on Akamai Community shows the fault.

The poster entered the record under the namemail125, so it covered only that host. One reply said to leave the name blank for the root domain.

Steps:

  1. Open the TXT record you added for SPF.

  2. Set the host to @.

  3. Leave the name blank if your host rejects @.

Confirm: Check MX records; Google's four names for your root domain after the change spreads.

Quotes and the wrong ending symbol

Google's setup page says some domains need quotes around the record string. Read your host's help page first. In the thread above, one reply said the host adds the quotes itself.

The troubleshooting page from Google says to end with ~all. It warns against a hyphen or a question mark.

Steps:

  1. Read your host's help page and note whether it wants quotes.

  2. Type the value as shown in this guide, ending in ~all.

Confirm: The value in your DNS editor ends in ~all.

Publish the correct record

Google's setup table gives four fields for the record: type, host, value, and TTL.

Your host may label the fields differently.

Steps:

  1. Open the DNS records for your domain at your domain host.

  2. Add a record with the type TXT.

  3. Enter @ as the host.

  4. Paste v=spf1 include:_spf.google.com ~all as the value.

  5. Set the TTL to 1 hour or 3600 seconds. Keep the current value if your host will not let you change it.

  6. Save the record.

Confirm: Your DNS editor shows one TXT record with this value.

Add other senders without passing the lookup limit

Google words the limit three ways. The setup page says up to 10 include tags. The troubleshooting page says 10 DNS lookups, nested ones included.

The About SPF page says no more than 10 references to other domains or servers. The RFC counts lookups in section 4.6.4, and a record over 10 returns permerror.

Count Google's share first

Google's part takes four of the ten lookups. The table counts the four names in the Check MX lists, one lookup for each include.

Name in the Check MX list

How it is counted

Lookups used so far

_spf.google.com

The include in your record

1

_netblocks.google.com

An include inside Google's record

2

_netblocks2.google.com

An include inside Google's record

3

_netblocks3.google.com

An include inside Google's record

4

Google can change its record, so run Check MX on the day you publish.

The limit is 10 lookups. Google's part uses 4, so 6 are left for other senders.

Add each sender and recount

Example: a domain sends through Google Workspace, Zendesk, and Shopify. Google's setup table lists an include for each sender.

  • Google Workspace: 4 lookups.

  • Zendeskinclude:mail.zendesk.com: at least 1 lookup.

  • Shopifyinclude:shops.shopify.com: at least 1 lookup.

Add the three: 4 plus 1 plus 1 is at least 6. At most 4 lookups remain. Each of those includes can hold includes of its own, and each one counts too.

Run Check MX after you publish to read the real total.

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

That record is 85 characters. The cap on Google's About SPF page is 255. 255 minus 85 leaves 170.

Choose the ending after every sender passes

Three endings appear in SPF records, and Google's setup examples all end in ~all.

Ending

What the record says about unlisted senders

When to use it

~all

Softfail. RFC 7208 section 8.5 says receivers should not reject on softfail alone.

Start here. Google's examples and troubleshooting page use it.

-all

Fail. Receiving servers may reject messages from senders not in the record.

After every sender is listed and passing.

?all

Neutral.

Google's troubleshooting page says to use a tilde, not a question mark.

SPF is one of three records. The guide on email authentication protocols covers DKIM and DMARC.

Wait, then read the result in Gmail

How long to wait

Google gives two windows. The setup page says up to 48 hours for SPF to start working. The troubleshooting page says fixes take 24 to 48 hours to take effect worldwide. Test after the wait, not before.

Example: you fix a second record at 9:00, and the TTL is 3600 seconds. A resolver that cached the old record at 8:59 can serve it until 9:59.

Read the result in the message header

SPF reads the domain in Return-Path, not the From address your reader sees. Send the test directly, not through a forward. Google documents the Show original steps for Gmail on a computer.

The word after spf= is the SPF result.

Steps:

  1. Send a message from a Google Workspace address to a Gmail address you can open.

  2. From a browser, open Gmail and open the message.

  3. Next to Reply, click More and then Show original.

  4. Find Authentication-Results and read the word after spf=.

Confirm: The line reads spf=pass.

When the result is still wrong

The four states below come from error tables and SPF pages by Google.

What you see

Likely cause

Fix

spf=permerror or spf=temperror, or 451 4.7.24 or 550 5.7.24 with The SPF record of the sending domain has one or more suspicious entries.

Google's table does not name the entries. Rule out two records, over 10 lookups, a typo and your DNS host.

Merge to one record, recount lookups and retype the value.

spf=softfail, spf=fail or spf=neutral

A sender is missing from the record, or the message was forwarded.

Add the sender's include, recount lookups and send a direct test.

550 5.7.26 with has an SPF record with a hard fail policy (-all)

The record ends in -all , and the sending IP is not listed.

Add the sender, or return to ~all while you find it.

550 5.7.27 with This message was blocked because it didn't pass SPF authentication. or 421 4.7.27 with Your email has been rate limited because SPF authentication didn't pass for this message.

SPF failed for the sending IP.

Find the failing sender in the header, add it and retest.

If Gmail still blocks mail after SPF passes, read the message blocked in Gmail.

Other bounce codes are listed in SMTP error codes.

Where TrueEmailer fits in this setup

TrueEmailer configures SPF, DKIM, and DMARC together at setup for every domain it sends from. It does not touch the record you publish for Google Workspace.

The host, the lookup count, and the ending in this guide stay with you. So do forwarded mail results and the Gmail codes in the troubleshooting table.

  • Word count: The section adds about 59 words, so the article moves from 1,794 to about 1,853. That is over the 1,800 Mode B band, a one-off overage like your earlier addenda.

  • What it rests on: The paragraph uses only the one feature I have on file: SPF, DKIM, and DMARC configured at setup. Please confirm that is still true before you publish.

FAQ

Does the record cover my subdomains?

No. Google's Check MX steps note that the SPF record isn't automatically applied to subdomains. Ask your domain provider if you can add SPF records to subdomains. Then add one for each subdomain that sends mail.

What if my record is longer than 255 characters?

Google's About SPF page caps a record at 255 characters. It sets 512 bytes for the TXT record field. RFC 7208 section 3.3 joins several quoted strings in one TXT record without adding spaces.

Can forwarded mail fail SPF when my record is right?

Yes. Google's troubleshooting page says forwarded messages can fail SPF even with a correct setup. Send test messages directly, not through a forwarding rule.

Does a passing SPF record settle every Gmail rejection?

No. Gmail's error table also lists 421 4.7.32. Its text ends with isn't aligned with either the authenticated SPF or DKIM organizational domain.

The code points to a From domain that does not match the authenticated domain.

Change the ending last

Keep ~all until the Authentication-Results line shows spf=pass for every sender on your list. Google's About SPF page warns that hard fail messages cannot be used to troubleshoot the record.

Move to -all after that. A new sender needs a fresh lookup count before it goes into the record.

Steps verified on 23 November 2026 in Google Workspace Admin Help and Gmail Help against the official documentation.