SPF hard fail vs softfail: which should you use?
In brief
SPF hard fail (-all) vs softfail (~all): what each qualifier means, why hard fail breaks forwarded mail, and why ~all plus DMARC is right for sending domains.

Use ~all (softfail) on domains that actively send email, and -all (hard fail) only on domains that send no email at all. Hard fail sounds more secure, but once DMARC is enforcing your policy, softfail gives you the same protection against spoofing without bouncing legitimate forwarded mail.
Here is how every SPF all qualifier compares:
| Qualifier | Name | Meaning | Typical receiver behavior |
|---|---|---|---|
-all | Hard fail | Unlisted senders are not authorized | May reject the message during delivery |
~all | Softfail | Unlisted senders are probably not authorized | Accept but treat as suspicious, often routed to spam |
?all | Neutral | No assertion about unlisted senders | Treated much like having no SPF policy |
+all | Pass | Every server is authorized | Never use this, it authorizes the entire internet |
The rest of this article explains what is behind that verdict: how mail servers actually interpret each qualifier, why forwarding breaks hard fail, and how DMARC changes the calculation entirely.
At a glance
Quick takeaways
- The
allmechanism always matches, so it belongs at the end of an SPF record. -allreturnsfailfor a client that did not match an earlier mechanism, and receivers may reject it outright.~allreturnssoftfail, which receivers may scrutinize but should not reject on that basis alone.- DMARC does not distinguish softfail from fail, so
~allcosts you nothing once DMARC is enforcing. - Forwarding is the reason hard fail loses legitimate mail that softfail keeps.
- On a sending domain
~allis the end state, not a step on the way to-all. - A domain that sends no mail should publish
v=spf1 -allwith DMARCp=reject.
What do ~all and -all mean in an SPF record?
The all mechanism sits at the end of an SPF record and tells receiving servers what to do with mail from senders that are not listed earlier in the record. The qualifier in front of all sets the verdict:
v=spf1 include:_spf.google.com ~allMail from anywhere other than Google's servers gets a softfail: probably not authorized, but do not block it outright.
v=spf1 include:_spf.google.com -allThe same unlisted mail gets a hard fail: not authorized, reject it.
Every other part of the record works identically. The only difference is how strongly you tell the world to treat unlisted senders. For a full breakdown of mechanisms and qualifiers, see the SPF record syntax guide and the terminal all mechanism.
How do mail servers treat softfail vs hard fail?
SPF produces a signal, and the receiving server decides the outcome. RFC 7208 defines the results this way:
- Fail (
-all) is an explicit statement that the client is not authorized to use the identity. Receivers are entitled to reject the message outright during the SMTP transaction. - Softfail (
~all) sits between neutral and fail: the domain believes the mail is probably unauthorized but is not certain. The RFC says receiving software SHOULD NOT reject a message based solely on a softfail, but MAY subject it to closer scrutiny than normal, which in practice often means the spam folder.
-all as a red light and ~all as a yellow light. One stops the message, the other says proceed with caution.
Note what SPF evaluates. SPF checks an SMTP identity, normally the envelope sender, not the address a person sees in their mail client. The SPF overview covers how that identity is chosen. The visible From domain is protected by DMARC alignment, usually with DKIM as the second authentication path.
What about ?all and +all?
?all and +all are the other two terminal qualifiers SPF defines. Neither belongs on a production sending domain:
?all(neutral) makes no assertion at all. Unlisted senders are neither authorized nor unauthorized, so receivers treat it roughly like having no SPF policy. Its only legitimate use is short-lived testing while you inventory senders.+all(pass) declares that every server on the internet is authorized to send as your domain. It actively helps spoofers and is treated by many filters as a spam signal in its own right. There is no good reason to publish it.
all mechanism and has no redirect, unmatched senders default to neutral. That is why a complete record should always end with an explicit ~all or -all.
Why does forwarding break SPF hard fail?
Forwarding breaks SPF hard fail because the forwarding server relays your message from its own IP address, which your SPF record does not list. SPF cannot tell that hop apart from a spoof, so it fails on mail you legitimately sent. Here is the sequence:
- When a recipient auto-forwards your email, say from a work address to Gmail, the forwarding server becomes the new sending server.
- That forwarding server is not in your SPF record, so SPF fails.
- With
-all, the receiver may reject the forwarded message on the SPF result alone. A legitimate email is lost. - With
~all, the message is accepted with suspicion, which gives DKIM and DMARC the chance to authenticate it properly.
Is ~all less secure than -all if you have DMARC?
No. With DMARC enforcing your policy, softfail and hard fail provide equivalent protection against spoofing. RFC 9989, the current DMARC specification that obsoletes RFC 7489, evaluates SPF as a pass or not a pass, plus alignment with the visible From domain. It does not distinguish a soft failure from a hard one:
- If either SPF or DKIM passes and aligns, the message passes DMARC.
- If neither does, your DMARC policy,
p=quarantineorp=reject, is applied.
~all is still quarantined or rejected by DMARC enforcement, exactly as it would be with -all. Meanwhile legitimate forwarded mail keeps its chance to pass through DKIM. The security backbone of modern email authentication is DMARC plus DKIM. SPF is a supporting signal, not the sole gatekeeper.
What does the industry recommend?
The industry recommendation for a domain that sends email is ~all. The DMARC and deliverability world leans that way and says so in public:
- Google Workspace recommends softfail outright. Its SPF documentation gives
v=spf1 include:_spf.google.com ~allas the record for a Workspace-only domain, and warns that with a hard fail qualifier "messages that fail the SPF check are more likely to be rejected by the receiving server, and you can't use those messages to troubleshoot your SPF record." - Al Iverson, of Spam Resource, answered the question directly. His general answer was
-all, but he added an update for anyone running DMARC: once your policy is atp=quarantineorp=reject, "~all(tilde all) is probably the better way to go," because SPF failures evaluated ahead of DMARC can cause rejections that never appear in your DMARC reporting at all. - RFC 7208 is the reason the two results behave differently in the first place, since it tells receivers not to reject on a softfail alone.
The notable dissent is Microsoft. Its Microsoft 365 SPF guidance recommends -all, on the grounds that "the DMARC policy is effectively ignored for SPF ~all failures if the messages don't also contain DKIM signatures." Read that condition carefully, because it is the whole argument: it applies to messages carrying no DKIM signature at all. The DMARC specification itself draws no distinction between softfail and fail, so this describes one receiver's behavior rather than the standard. Sign every sending service with DKIM, which you should do regardless, and the objection stops applying to your mail.
Which should you use: ~all or -all?
Whether you should use ~all or -all depends on what the domain does, not on which qualifier sounds stricter. Decide by the domain's job:
- The domain sends email (your primary domain): use
~all, enable DKIM on every sending service, and enforce DMARC atp=quarantineand thenp=reject. This blocks spoofing without sacrificing forwarded mail. - The domain sends no email (parked domains, web-only domains): publish the bare record
v=spf1 -allplus DMARCp=reject. Nothing legitimate can be lost, and spoofing is shut down completely. - You are still inventorying senders: use
~all, which is where a sending domain settles anyway. What the inventory changes is which senders you authorize, not the qualifier at the end.

There is no industry migration date from ~all to -all, and no deliverability bonus waiting at the end of one. On a domain that sends mail, ~all is the end state rather than a stepping stone: the control you tighten over time is the DMARC policy, not the SPF qualifier. If you do change the record for any reason, keep the previous value and its TTL so you can roll back.
How do you implement ~all plus DMARC safely?
Implementing ~all plus DMARC safely means publishing softfail first, signing every sender with DKIM, and only then tightening the DMARC policy. Work the six steps in order:
- Publish SPF with softfail, listing every legitimate sending service:
v=spf1 include:_spf.google.com include:sendgrid.net ~allThis record is illustrative. Publish the mechanisms documented for your own senders, not the example values.
- Enable DKIM signing for every service that sends as your domain. This is what makes softfail safe, and what answers Microsoft's objection above.
- Publish a DMARC record starting at
p=none. The DMARC record generator builds one correctly. - Monitor aggregate reports until every legitimate source passes with alignment. Aggregate reports take a day or more to arrive. For an immediate read on a single stream, the email deliverability test grades one message you send and shows whether SPF and DKIM aligned.
- Move DMARC to
p=quarantine, thenp=reject. This is where the real anti-spoofing enforcement happens. - Keep the record current as you add new tools, and stay under SPF's limit of 10 DNS-querying terms.

You can validate the finished setup at any time with the SPF checker. Confirm there is one SPF record, the syntax is valid, all is last, and evaluation stays inside the 10-term limit.
Check the published SPF policy first
Run the domain through Palisade's SPF checker before you change the qualifier, then compare its DNS result against the evaluated identity and connecting IP from a delivered message. The checker reads the public record; it cannot reproduce a receiver's private disposition.
If repeated sender changes make the inventory hard to maintain, Palisade's DMARC Agent remediation guide documents how report findings become source-specific SPF, DKIM, and alignment work. Get started when recurring report-based sender monitoring is the remaining need.
Evidence
Sources and further reading
Questions readers ask
Frequently asked questions
What is an SPF softfail?
An SPF softfail is the ~all result: the sending server is not listed in the domain's SPF record, so the domain signals that the mail is probably not authorized but stops short of telling receivers to reject it. The message is still delivered, usually with extra scrutiny, which often means the spam folder. That deliver-but-distrust behavior is exactly why softfail pairs well with DMARC, because legitimate forwarded mail keeps flowing while DMARC handles enforcement.
What does spf=softfail in an email header mean?
It means the sending server was not listed in the domain's SPF record, and the record ends in ~all. The receiver accepted the message but flagged it as suspect. If it is your own mail, add the sending service to your SPF record.
Does ~all hurt deliverability compared to -all?
No. Mailbox providers judge your mail on authentication results, domain reputation, and engagement, not on which qualifier your SPF record ends with. Google's own Workspace guidance uses ~all in its recommended record.
Can I start with -all and loosen it later if problems appear?
You can, but it is backwards. The problems show up as silently bounced legitimate mail that you discover only after the damage is done, and hard fail rejections often never reach your DMARC reports at all. Starting with ~all and tightening enforcement at the DMARC layer reaches the same end state with visibility at every step.
Do I still need DKIM if my SPF is set up correctly?
Yes. SPF alone breaks on forwarding and does not survive mailing lists well, and DMARC needs at least one aligned pass. DKIM signatures travel with the message, which makes them the more resilient half of the pair. Set up both.
Does -all mean DMARC p=reject?
No. The SPF qualifier describes authorization for an SPF identity. DMARC policy and alignment govern the visible From domain, and the two are set independently.
Can a non-sending domain publish v=spf1 -all?
Yes, and it should. That record states that no SMTP client is authorized for the domain. Pair it with DMARC p=reject so the visible From domain is protected too.


Written by
Samuel ChenardCEO & Co-Founder, Palisade
Samuel Chenard is the CEO and co-founder of Palisade, agentic DMARC software for IT teams and MSPs, from one domain to thousands.
More from Samuel →


