SPF Validation Error: What Each Message Means and How to Fix It
An "SPF validation error" almost always means your SPF record is broken in a way that makes it fail for every message, a PermError. The four usual causes are: two SPF records on the same domain, more than 10 DNS lookups, a syntax mistake, or an include: that points to a domain without a valid SPF record. Fix it by keeping exactly one v=spf1 TXT record, cutting includes until the lookup count is 10 or fewer, and correcting the syntax. Then re-check.
How SPF is evaluated, briefly
A receiving server takes the domain in the envelope sender (the Return-Path), fetches its TXT record that starts with v=spf1, and walks through it left to right: ip4:, ip6:, a, mx, include:, exists:, then the all at the end. The result is pass, fail, softfail, neutral, none, TempError or PermError.
The important part: a PermError isn't a partial failure. The receiver can't evaluate your record at all, so no message gets an SPF pass. If DKIM is also missing or misaligned, DMARC fails too. Check your record with the SPF checker.
The errors, one by one
| Checker message | What it means | Fix |
|---|---|---|
| Multiple SPF records | Two or more TXT records start with v=spf1 |
Merge into one |
| Too many DNS lookups / exceeds 10 | Nested includes need more than 10 lookups | Remove or restructure includes |
| Invalid syntax / unknown mechanism | A typo or a non-SPF token | Correct the token |
| Include has no SPF record | An include: target returns nothing |
Fix or remove the include |
| Void lookups exceeded | More than 2 lookups returned nothing | Remove dead includes and a/mx on empty names |
| Record too long / string over 255 chars | One TXT string exceeds 255 characters | Split into quoted strings, or shorten |
+all used |
Anyone may send as you | Change to ~all or -all |
| No SPF record | Nothing published | Publish one with the SPF generator |
Multiple SPF records
This is the most frequent one. A new tool's setup guide says "add this SPF record", and someone adds a second TXT row instead of editing the first. RFC 7208 is clear: more than one v=spf1 record is a PermError.
Combine them. Take the mechanisms from both and put them in one record:
v=spf1 include:_spf.google.com include:sendgrid.net ~all
The SPF record merger does this from two pasted records, and combining services into one SPF record walks through the usual pairs. Other TXT records on the domain (site verification, DKIM on its own selector name) are fine; only records starting v=spf1 count.
Too many DNS lookups
SPF allows at most 10 mechanisms that need a DNS lookup: include, a, mx, exists, ptr and redirect. Lookups inside nested includes count. A record with five includes can easily exceed 10 because each provider's include pulls in more includes. ip4: and ip6: don't count.
Count yours with the SPF lookup counter. To get under the limit, in order of preference:
- Remove includes for services you no longer use. This is usually most of the fix.
- Drop
aandmxif those hosts don't send mail. - Move a sender to a subdomain with its own SPF (common for marketing and transactional mail).
- Flatten as a last resort with the SPF flattener, and recheck it regularly, because providers change their IPs.
The longer explanation is in SPF too many DNS lookups.
Syntax mistakes
Things checkers commonly catch:
includewithout a colon, or with a space:include: sendgrid.netip4:with a hostname instead of an address, or a malformed CIDR range- smart quotes pasted from a document
- the
v=spf1tag not at the start, or writtenv=spf2 - anything after
all, which is ignored and usually signals a mistake
Includes that point nowhere
If you include: a domain that has no SPF record (an old vendor, a typo), evaluation fails. Look up each include target on its own. Remove dead ones.
SPF passes but DMARC still fails
SPF can pass and still not help DMARC. DMARC needs SPF to pass and align: the Return-Path domain must match your From domain. Many third-party senders use their own bounce domain, so SPF passes for them, not for you. The fix there is DKIM signing on your domain, or a custom return-path where the provider supports it. See what is DMARC alignment and the DMARC checker.
A quick repair routine
- List every TXT record on the root domain. Delete all but one
v=spf1record after merging. - List every service that sends as your domain. Remove includes for any that don't.
- Count lookups. Get to 10 or fewer.
- End with
~all(with DMARC) or-all. - Re-check from a public resolver after the TTL passes.
- Send a test to a mailbox you control and read the
Authentication-Resultsheader with the email header analyzer.
After SPF: check the list
A broken SPF record makes good mail look forged. A fixed one removes that problem, and leaves the other big signal receivers watch: how many of your messages hit addresses that don't exist. Teams often discover their SPF error after a campaign goes badly, fix the DNS, then resend to the same list and wonder why results don't recover. If the list has dead mailboxes, the domain keeps paying for them.
Run the list through the verify page before the next send. Each address gets a live mailbox check; invalid ones are marked for removal, and catch-all addresses come back as risky, never guessed valid. For many sending domains at once, the bulk email authentication checker reads SPF, DKIM and DMARC together.
What it costs
- Pro, $39 a month: Unlimited email verification.*
- Starter, $9 a month: 2,500 emails a month.
- Free: the first 100 checks with a Google sign-in, no card.
*Fair use: the first 100,000 checks a month at full speed, then slower, never cut off.
The SPF checker, lookup counter, merger and flattener are free and need no sign-up. See pricing.
More reading: SPF, DKIM and DMARC explained, common SPF mistakes in 696 company domains.
Common questions
What is an SPF validation error?
It's a checker telling you your SPF record can't be evaluated correctly. Usually that's a PermError (a permanent problem with the record itself), such as two SPF records, more than 10 DNS lookups, or a syntax mistake. Receivers that hit a PermError don't get a pass from SPF.
Can I have two SPF records?
No. RFC 7208 says that if a domain publishes more than one SPF record, the result is a PermError. Combine every service into one v=spf1 record.
What does SPF PermError mean?
PermError means the record can't be interpreted: duplicate records, too many lookups, invalid syntax, or an include that fails. TempError, by contrast, is a temporary DNS failure and usually clears on its own.
How do I fix too many DNS lookups in SPF?
Remove includes for services you no longer use, move senders that sign with DKIM to a subdomain or rely on DKIM for alignment, and only then consider flattening. The limit is 10 lookups, counted across nested includes.
Should SPF end in -all or ~all?
Both are common. ~all (softfail) is the usual choice when you also publish DMARC, because DMARC decides the outcome. -all is stricter. Never use +all, which authorises the whole internet.
Check your list before you send
Real mailbox checks over SMTP, and nothing is sent to the address. Sign in with Google and your first 100 email checks are free, no card. Plans for bigger lists are on the pricing page.