SPF Authentication Failed: The Fix for Each Error Message
SPF fails when the sending IP is not in your record, the record needs over 10 DNS lookups, or there are two records. Find your error, paste the fix.
Cristian Frunze · Dec 02, 2026 · 18 min read
- spf authentication failed
- spf verification failed
- spf authentication failed for ip
- spf permerror too many dns lookups
- spf softfail vs fail
- spf lookup limit
- spf record fix

"SPF authentication failed" means the receiving server looked up the SPF record on your bounce (Return-Path) domain and couldn't match it to the server that delivered your message: either that server isn't listed, or the record couldn't be read. The word after spf= in the message header says which. fail or softfail: a sender is missing from your record. permerror: the record itself is broken (two records, more than 10 DNS lookups or a syntax error). none: there's no record. temperror: your DNS didn't answer in time.
The fixes don't overlap, and the wrong one makes things worse. Add one more include to a record that already sits at 10 lookups and a single failing tool becomes every message from your domain failing. So this guide goes error by error: the text you see, the cause, the check and the record to publish instead.
On 21 November 2026 we also measured what 20 common sending services cost against the 10-lookup limit, because some guides still print old numbers. Every provider record and every Google, Microsoft and RFC rule quoted here was checked that day. Keep our free SPF checker open as you read. Enter your domain and it draws every include, counts the lookups and gives you a fixed record to paste.
What does "SPF authentication failed" mean?
SPF (Sender Policy Framework) is a single TXT record on your domain. It begins with v=spf1, then names every server permitted to send mail as that domain. When your message arrives, the receiving server takes the domain from the envelope sender (the Return-Path, or MAIL FROM), fetches its SPF record and compares the connecting IP with it.
Two details explain most of the confusing failures:
- SPF judges the Return-Path domain. The From address your reader sees plays no part. If a tool sends with its own bounce address, the check runs against the tool's domain. Your record never comes into it.
- SPF only sees the last hop. If anything relays the message on the way (a forwarder, a security gateway, a mailing list), the IP that gets checked belongs to that relay.
"SPF verification failed", "SPF check failed" and "SPF authentication failed for IP 198.51.100.23" are all the same check, worded differently by different mail servers. Ignore the wording and read the result code.
| Result | What happened | What to do |
|---|---|---|
pass | The IP is on the record | Nothing |
fail | The IP isn't listed and the record ends in -all | Add the missing sender |
softfail | The IP isn't listed and the record ends in ~all | Add the missing sender |
neutral | The record makes no claim about this IP, usually because it ends in ?all | Replace ?all with ~all |
none | The domain has no SPF record | Publish one |
permerror | The record can't be evaluated: two records, over 10 lookups, over 2 void lookups, a syntax error or an include pointing at a name with no SPF record | Fix the record itself |
temperror | A DNS query failed or timed out | Check your DNS host, then retry |
For DMARC, only pass counts. A softfail, a neutral and a permerror all leave DMARC depending on DKIM alone.
Where do you find the exact error?
There are two places to look: the header of a message that was delivered, or the bounce of one that wasn't.
- Gmail: open a message you sent to a Gmail address, click the three-dot menu and choose Show original. Find the
Authentication-Resultsline. It holdsspf=with the result, the sending IP, andsmtp.mailfrom=with the domain that was checked. - Outlook: open the message source or message details (the menu name differs by app) and look for the same
Authentication-Resultsline, or aReceived-SPFline. - A bounce: copy the three-part code, such as
550 5.7.26, and the sentence after it.
If you'd rather not read a raw header, paste it into our email header analyzer. It lays out every hop with the SPF, DKIM, DMARC and ARC results.
Before you touch DNS, copy the smtp.mailfrom domain and the sending IP from that line. That domain is the one whose record you edit, and it isn't always your main domain. Plenty of SPF fixes go nowhere because someone edited the record on the wrong name.
Which error do you have? The text, the cause and the fix
The result word gets you most of the way. The surrounding text and the bounce codes narrow it down. Gmail's wording below comes from Google's SMTP error reference, checked on 21 November 2026. A permerror points to the sections on lookups, two records and other errors, and a temperror to the temperror section.
| The text you see | What it means | Section below |
|---|---|---|
spf=fail with "does not designate 198.51.100.23 as permitted sender" | The sending IP isn't in your record, and the record ends in -all | The sender isn't in your record |
spf=softfail with "domain of transitioning ..." | Same cause, and the record ends in ~all | The sender isn't in your record |
spf=neutral with "best guess record" | Gmail couldn't use an SPF record for the domain (missing, broken, or DNS trouble) and fell back to a guess | Publish or repair the record, for example with the SPF generator |
Gmail 550 5.7.26 saying the MAIL FROM domain "has an SPF record with a hard fail policy (-all) but it fails to pass SPF checks" | Gmail refused the message because SPF failed and your record says -all | The sender isn't in your record, then Softfail vs fail |
Gmail 421 4.7.27 or 550 5.7.27, "SPF authentication didn't pass" | Gmail requires bulk senders to pass SPF, and this message didn't | Read the header for the result word |
Gmail 421 4.7.26 or 550 5.7.26, "the sender is unauthenticated" | Neither SPF nor DKIM passed | Fix SPF, and sign with DKIM |
Gmail 451 4.7.24 or 550 5.7.24, "one or more suspicious entries" | Gmail objects to something in the record itself | Other errors |
Microsoft 550 5.7.23 | Microsoft 365 points to an SPF problem in your own organization | The sender isn't in your record |
Fail or softfail: the sender isn't in your record
Cause. A server used your domain as its Return-Path, and your record doesn't list that server. In sales and outbound teams it's nearly always one of these:
- A new tool went live (a CRM, a help desk, a billing system) and nobody added its include.
- Someone typed a provider's IPs into the record by hand, and the provider has since moved to new ranges.
- The domain moved to a new mailbox provider and the record still names the old one.
- Microsoft 365 rated the outgoing message as spam. Microsoft sends those through its High Risk Delivery Pool and says mail sent that way won't pass SPF at the destination. That's a content or volume problem, and no DNS change fixes it.
Check. Take the IP from the header and see who owns it with our ASN lookup. Then run the smtp.mailfrom domain through the SPF checker and see whether any include in the tree covers that IP. If the owner is a service you use, its include is missing. If you don't recognize the owner, SPF did its job: someone else is sending as you.
Fix. Add the service's include to the record you already have. Never publish a second record next to it.
Before: v=spf1 include:_spf.google.com ~all
After: v=spf1 include:_spf.google.com include:_spf.salesforce.com ~all
Two checks before you save. First, the lookup budget in the next section: Salesforce's include cost 2 lookups when we measured it, not 1. Second, whether the tool needs to be in your record at all.
Does your cold email tool need an include?
Usually not. Most cold email tools connect to your Google or Microsoft inboxes and send through them. The message leaves Google's or Microsoft's servers, so include:_spf.google.com or include:spf.protection.outlook.com already covers it. Adding the tool's own include spends lookups and lets more servers pass as you, for no gain.
A tool belongs in your record only when it sends from its own servers and puts your domain in the Return-Path. If it uses its own bounce domain, receivers never consult your record for its mail, and an include for it does nothing.
"Too many DNS lookups": your record needs more than 10
Cause. RFC 7208 limits one SPF check to 10 terms that trigger a DNS query: include, a, mx, ptr, exists and the redirect modifier. Includes nested inside your includes count too. ip4, ip6 and all are free. Past 10, the receiver must return permerror (RFC 7208, section 4.6.4).
The painful part is the blast radius. A permerror doesn't hit only the tool you added last. SPF stops working for every message from the domain, your main inboxes included.
Check. The SPF checker counts the whole tree and shows what each include costs. Under 10 is fine. At 9 or 10 there's no room for the next tool.
What common senders cost, measured on 21 November 2026
Lookup costs change whenever a provider edits its own record, and old numbers stick around. Two of the guides we read for this article still say Google Workspace costs 3 or 4 lookups. We ran 20 common includes through the same engine our SPF checker uses, on 21 November 2026, through Cloudflare's public resolver. Each cost is the include itself plus everything nested under it.
| Service | Include | Lookups |
|---|---|---|
| Google Workspace | _spf.google.com | 1 |
| Microsoft 365 | spf.protection.outlook.com | 1 |
| Amazon SES | amazonses.com | 1 |
| Postmark | spf.mtasv.net | 1 |
| Mailchimp | servers.mcsv.net | 1 |
| Mailchimp Transactional | spf.mandrillapp.com | 1 |
| Brevo | spf.brevo.com | 1 |
| Mailjet | spf.mailjet.com | 1 |
| Zendesk | mail.zendesk.com | 1 |
| Intercom | mail.intercom.io | 1 |
| Fastmail | spf.messagingengine.com | 1 |
| Zoho Mail | zohomail.com | 2 |
| SendGrid | sendgrid.net | 2 |
| Salesforce | _spf.salesforce.com | 2 |
| SparkPost | _spf.sparkpostmail.com | 2 |
| Atlassian | _spf.atlassian.net | 2 |
| GoDaddy Email | secureserver.net | 3 |
| Mailgun | mailgun.org | 5 |
| Freshdesk | email.freshdesk.com | 7 |
| HubSpot (a generic name one guide gives) | mail.hubspot.net | No SPF record: permerror |
Google and Microsoft publish their IP ranges directly, so each costs a single lookup. Freshdesk's record pulls in SendGrid plus four more includes of its own, so it spends 7 of your 10 alone. Providers edit these records without notice: check your own before you add anything.
A worked example: one include too many
Take a company domain that sends through Google Workspace, Salesforce and Freshdesk:
v=spf1 include:_spf.google.com include:_spf.salesforce.com include:email.freshdesk.com ~all
That's 1 + 2 + 7 = 10 lookups. It passes, with nothing to spare. Then the product team adds Mailgun for app notifications:
v=spf1 include:_spf.google.com include:_spf.salesforce.com include:email.freshdesk.com include:mailgun.org ~all
Now the record needs 15. Every receiver that enforces the limit returns permerror, and every email from the domain loses SPF: the sales team's Gmail, the support replies, the invoices. The DNS panel looks perfectly normal.
Here are the fixes in the order we'd try them, with what each does to the count:
| Fix | Lookups after | Trade-off |
|---|---|---|
Send Mailgun mail from a subdomain such as mg.example.com, with its own record (v=spf1 include:mailgun.org ~all) | 10 on the root, 5 on the subdomain | The root still has no spare lookups |
| Remove an include for a tool that no longer sends, or that uses its own Return-Path | 15 minus that tool's cost | You have to confirm what each tool actually does |
| Flatten the record with our SPF flattener | 6 | 99 IPv4 ranges need 5 extra records, and the ranges go stale when providers change IPs |
We'd pick the subdomain. It's permanent, and every subdomain gets its own budget of 10. Flattening is a snapshot of today's IPs, and here it can't reach 1: Salesforce's include uses a macro tied to the sending IP, so it stays a lookup. If you flatten, re-run it monthly and whenever a provider announces new ranges, or mail from any range added later fails SPF. When the SPF checker finds a record over 10, its suggested fix is this flattened version, extra records included.
Two SPF records on one domain
Cause. A domain name can have one SPF record. If the lookup comes back with two v=spf1 TXT records, the result is permerror (RFC 7208, section 4.5). The receiver doesn't choose the better one. It uses neither.
This usually starts with a setup wizard. A tool says "add this SPF record", and someone adds it next to the existing one instead of merging the two. Mailbox migrations do it too, when the old provider's record is left in place.
Check. Look up the domain's TXT records with our DNS lookup tool or dig +short TXT example.com. Count only the values that start with v=spf1. Other TXT records, like a site verification string, don't matter.
Fix. Move every mechanism into one record, keep a single all at the end, and delete the other record.
Published today, as two TXT records:
v=spf1 include:servers.mcsv.net -all
v=spf1 include:_spf.google.com ~all
Publish instead, as one TXT record:
v=spf1 include:_spf.google.com include:servers.mcsv.net ~all
The SPF checker writes the merged record for you when it finds more than one. One more trap: some DNS panels still list a record type called SPF. Don't use it. RFC 7208 dropped that type, and SPF must be published as a TXT record (section 3.1).
Softfail vs fail: which one should your record use?
About the message itself, both say the same thing: the IP isn't on your list. The difference is the instruction to the receiver. -all (fail) asks it to reject the message. ~all (softfail) asks it to accept the message but treat it as suspect. DMARC counts both as SPF not passing.
The difference shows up at Gmail. Its error reference has a block just for this case: 550 5.7.26, sent when the MAIL FROM domain's record says -all and the message fails SPF. With ~all the message isn't refused for that reason, and DKIM still gets a chance to carry DMARC. That matters for forwarded mail, which fails SPF by design but often keeps a valid DKIM signature.
Our rule:
- Domains that send mail, cold email domains included:
~all. Pair it with DKIM signed on your own domain and a DMARC record. Google's own SPF troubleshooting page tells Workspace admins to use the tilde. - Domains that never send mail:
v=spf1 -all. Nothing should pass as them, so say so. - Moving a sending domain to
-all: only once your DMARC reports show no legitimate source failing.
A softfail is not a free pass. Gmail requires bulk senders to pass SPF, and its 5.7.27 errors rate-limit or block mail that doesn't, whatever the qualifier. ~all decides how hard a failure lands, not whether it counts as one.
The other two endings are worse than either. +all authorizes every IP address that exists, and ?all gives receivers no instruction. The SPF checker rewrites both to ~all.
Other errors that break SPF
No record at all: spf=none
none means the checked name has no TXT record starting with v=spf1. Before you write one, make sure you looked at the right name. A record covers only the exact name it sits on (RFC 7208, section 3), so a record on example.com does nothing for mail whose smtp.mailfrom is bounce.example.com. Tools that send from a bounce subdomain need the record on that subdomain.
If the name really has none, list every service that sends with it as the Return-Path and build one record with the SPF generator, which keeps it under 10 lookups. A domain that sends only through Google Workspace needs nothing more than v=spf1 include:_spf.google.com ~all.
An include that points at nothing
An include should point at another domain's SPF record. If that name has no SPF record, RFC 7208 says the whole check returns permerror (section 5.2). A single typo in an include name takes SPF down for every message.
We hit a live example while measuring. One of the guides we read lists include:mail.hubspot.net for HubSpot. On 21 November 2026 that name returned no TXT record at all, from both Cloudflare's and Google's public resolvers, so a record built from that advice fails with permerror. Use the include your own HubSpot account gives you instead.
A related limit: RFC 7208 tells receivers to allow at most 2 void lookups, meaning queries that come back empty or with "no such domain". The third is a permerror. Includes for vendors you dropped years ago are the usual source. The SPF checker counts void lookups and gives you the record without the dead includes.
Syntax errors
One bad character can break the whole record. The common ones:
- The record doesn't begin with exactly
v=spf1(a leading space,v=spf2, orspf1on its own). - Two terms run together with no space, or a misspelled term such as
incldue:oripv4:. - Characters a word processor or chat app swaps in on its own, such as
“instead of", or a non-breaking space between terms. - Terms placed after
all. Receivers never evaluate them (section 5.1), so an include sitting there does nothing. ptr, which the RFC says not to use. It's slow and spends lookups.
A record that's too long
One string inside a TXT record holds at most 255 characters. Longer records are split into several strings in the same TXT record, and receivers join them with no space added, so break between terms and keep the space inside a string. The RFC also suggests keeping the whole answer under about 450 bytes, since oversized answers can be silently ignored (sections 3.3 and 3.4).
Temperror: DNS that doesn't answer
A temperror means a lookup failed or timed out partway through the check (the RFC suggests receivers allow at least 20 seconds). A one-off clears on the next attempt. If it repeats, your DNS host or one of your includes is slow or failing. Our DNS lookup asks four public resolvers for the same record, so you see at once whether they agree.
Forwarding
When a recipient forwards your message, the forwarding server delivers it, and its IP is the one that gets checked. SPF fails, and that's expected. Don't add forwarders' IPs to your record. A DKIM signature still verifies after forwarding if nobody edits the message on the way, which is why every sending domain should sign with DKIM. Our DKIM checker finds the keys you publish.
DMARC fails even though SPF passed
An SPF pass helps DMARC only when the domain that passed belongs to the same organization as your From address. DMARC calls this alignment. Under its default relaxed setting, bounce.example.com counts for mail from [email protected], and a sending tool's own domain doesn't. Gmail flags the mismatch with a 5.7.32 error saying the From header isn't aligned. There are two ways out: set a custom Return-Path on your own domain in the tool's settings, if it has one, or have the tool sign DKIM with your domain. Our DMARC checker reads your DMARC record tag by tag, and the glossary entry on SPF covers the basics.
How do you know the fix worked?
A DNS change reaches a receiver once its cached copy of the old record expires, which depends on the record's TTL. Google tells Workspace admins to allow 24 to 48 hours for a change to take effect everywhere. Check in this order:
- Run the domain through the SPF checker. You want one record, 10 lookups or fewer, no void lookups and no syntax errors.
- Send a test message to a Gmail address and open Show original. You want
spf=passwithsmtp.mailfrom=on your domain. - Run the mail tester for a 10-point score across authentication, spam filters, blacklists, content and links, or the domain health check for SPF, DKIM, DMARC, MX and eight more checks graded A to F.
- If your DMARC record sends aggregate reports, drop the next one into the DMARC report analyzer. It shows which sources still fail.
How we keep SPF from failing on cold email domains
Most errors in this guide share one root cause: too many things sending as one domain. Outbound adds a second problem: cold email is spread over several sending domains, and a broken record on one of them fails quietly.
Here's how we set them up:
- Send cold email from separate domains, never the main one. The main domain keeps the CRM, the help desk and billing. Sending domains carry outbound only. Our sending domain generator finds close variants of your brand that are free to register.
- One include per sending domain. A sending domain on Google gets
v=spf1 include:_spf.google.com ~all. On Microsoft,v=spf1 include:spf.protection.outlook.com ~all. Each costs 1 lookup, as measured above. Nothing else needs to be in the record when your cold email tool sends through those inboxes. The same rule holds for SMTP inboxes: the sending service's include belongs in the record only if the service puts your domain in the Return-Path. - DKIM and DMARC on every sending domain. SPF alone breaks on forwarding, and Gmail's sender guidelines require SPF, DKIM and DMARC from anyone sending more than 5,000 messages a day to Gmail accounts.
- Recheck after every DNS change. Run the SPF checker on the domain you touched the same day, not when replies dry up.
- Watch the records, not only the results. Bounces and spam placement are late signals. Kenso Delivery runs blacklist, bounce and DNS monitoring on your sending domains.
FAQ
Is "SPF verification failed" the same as "SPF authentication failed"?
Yes. Different mail servers and tools word the same check differently. What matters is the result word (fail, softfail, permerror and so on) and the domain that was checked.
Does an SPF failure mean my email was rejected?
Not always. A fail against a -all record can be refused outright, as Gmail's 550 5.7.26 shows. A softfail is usually delivered, but it counts against the message, and DMARC then depends on DKIM alone.
My record looks right. Why does SPF still fail?
Usually it's one of four things outside the record you edited: the message was forwarded, a tool used its own Return-Path, Microsoft 365 sent it through its High Risk Delivery Pool, or the record you fixed sits on a different name from the one in smtp.mailfrom.
If DKIM passes, does SPF still matter?
For anyone sending in volume, yes. Gmail accepts SPF or DKIM from small senders, but requires SPF, DKIM and DMARC from anyone sending more than 5,000 messages a day to Gmail accounts, and its 5.7.27 errors block bulk mail that fails SPF.


