What is SPF?

SPF, defined
SPF is a DNS record listing which servers may send mail using your domain in the envelope sender, letting a receiving host reject mail from anywhere else.

The record is a TXT entry starting v=spf1, followed by mechanisms naming who may send: include:_spf.google.com hands the decision to Google, ip4: names an address directly, and a or mx point at your existing records.

It ends with an all mechanism that decides the default. -all tells receivers to reject anything not listed; ~all asks them to accept it with suspicion. Start at ~all while you are still finding forgotten senders.

The check happens at the envelope level, against the MAIL FROM address, not the From header your recipient reads. That gap is exactly why DMARC was invented.

Ten DNS lookups is the hard ceiling for evaluating a record, and each include: can pull in more. Marketing platforms and helpdesks stack up quickly, and the eleventh lookup breaks the whole thing.

How ZapBounce reports it

SPF is about your sending, not about an address you asked us to check, so it appears in our free SPF checker rather than a verification response. The checker counts your lookups and shows which include chain spent them.

Counting to ten on a real-looking record

Suppose your record reads: v=spf1 include:_spf.google.com include:helpdesk.example include:newsletter.example include:billing.example ip4:198.51.100.7 ~all. It looks like four services and one address. Only the lookups count toward the limit, and they add up faster than the record suggests.

Google's include costs four, because that record itself includes three more. Say the helpdesk include nests two others, which makes three, the newsletter platform costs two and the billing tool costs two. That's eleven. The ip4 entry and the all at the end cost nothing, since neither needs a DNS query.

At eleven, a receiver following the standard stops and returns a permanent error, and your DMARC evaluation treats SPF as failed for every message, including the ones from Google that were listed first. Removing the billing include, and having that tool sign with DKIM instead, brings you back to nine.

Checking yours with one command

Run dig +short TXT yourdomain.com and look for the line starting v=spf1. You should find exactly one. Then run the same command against each include you see, and keep going until no new includes appear, tallying one for every include, a, mx, exists and redirect along the way.

There's a second, less known limit. The standard also caps lookups that return nothing at two, so an include pointing at a service you cancelled years ago, whose record has since been deleted, can break evaluation all by itself.

Be wary of flattening, which replaces includes with the raw IP ranges they resolve to. It fixes the count today. When the provider adds a range next month, your flattened record won't know, and some of your legitimate mail starts failing with nobody having touched DNS. If you flatten, you need something re-checking those ranges on a schedule.

SPF: common questions

Can I have two SPF records?

No. One TXT record per domain. Two produce a permerror, and receivers treat that as a failure rather than choosing the more generous one.

Should I use -all or ~all?

Move to -all once you are confident every legitimate sender is listed. Until then ~all avoids rejecting your own invoices and helpdesk replies.

Does SPF survive forwarding?

Usually not. The forwarding server sends from its own IP, which is not on your list. SRS rewriting or a DKIM signature covers that case.

See this on your own list

100 free checks a month, and the unknowns come back labeled.