Introduction
SPF ~all (softfail) and -all (hardfail) matter far less once DMARC is at enforcement, because DMARC only asks whether SPF passed and aligned. Softfail and fail are both "not pass". The real difference is outside DMARC: some receivers reject on SPF fail before DMARC runs, so -all can block mail that aligned DKIM would have passed.
This guide explains the four SPF qualifiers, what DMARC does with each result, where -all causes real damage, what Google, Microsoft and the UK guidance actually recommend, and a default an MSP can apply across a client portfolio. For SPF basics, start with the SPF guide.
Key takeaways
- RFC 7208 defines four qualifiers:
+pass,-fail,~softfail and?neutral. A mechanism without a qualifier means+. - For DMARC, only an aligned SPF
passcounts.failandsoftfaillead to the same DMARC outcome. - RFC 9989 warns that
-allcan get mail rejected early in the SMTP session, before DMARC is evaluated, even when aligned DKIM would have passed. - Google recommends
~allfor Workspace; Microsoft recommends-allfor Microsoft 365 domains. Both are valid with DMARC. - Never publish
+allor?allon a production domain. Domains that never send mail should publishv=spf1 -all.
What do the SPF qualifiers +, ?, ~ and – mean?
Each SPF mechanism can carry a qualifier that sets the result when it matches. RFC 7208, Section 4.6.2 defines + as pass, - as fail, ~ as softfail and ? as neutral, and the qualifier defaults to +. The all mechanism at the end matches everything left over.
| Ending | SPF result | RFC 7208 meaning (Section 2.6) | Recommended receiver handling |
|---|---|---|---|
+all |
pass | Any IP is authorised | None: the record authorises the whole internet |
?all |
neutral | Domain makes no assertion about the IP | Treat like none |
~all |
softfail | "a weak statement" that the host is probably not authorised | "SHOULD NOT reject the message based solely on this result" (Section 8.5) |
-all |
fail | "an explicit statement" that the client is not authorised | Disposition "is a matter of local policy"; rejection uses 550 (Section 8.4) |
If a record has no all and no redirect=, unmatched mail gets neutral, the same as ?all. In a typical record the qualifier is the only thing that differs:
example.com. TXT "v=spf1 include:spf.protection.outlook.com ~all"
example.com. TXT "v=spf1 include:spf.protection.outlook.com -all"
What is SPF and why does it matter for DMARC gives the short version of this difference; this page is the full answer.
How does DMARC treat softfail and hardfail?
The same way. DMARC passes a message when SPF or DKIM produces a pass for a domain aligned with the visible From domain, as defined in RFC 9989. A softfail is not a pass and a fail is not a pass, so with no aligned DKIM, both fail DMARC and the domain's policy applies.
Microsoft says the same in its SPF guidance: "DMARC treats -all (hard fail) and ~all (soft fail) as SPF failures." Once a client is at p=quarantine or p=reject, the DMARC policy, not the SPF qualifier, decides what happens to unauthenticated mail at receivers that apply DMARC.
You can see both results in aggregate reports. RFC 9990 allows none, pass, fail, softfail, policy, neutral, temperror and permerror in the SPF result field:
<auth_results>
<spf>
<domain>example.com</domain>
<scope>mfrom</scope>
<result>softfail</result>
</spf>
</auth_results>
Whether that row says softfail or fail, the <policy_evaluated><spf> value is fail either way. If SPF passes but DMARC still fails, that is an alignment problem, covered in why does DMARC fail when SPF passes.
What is the real risk of using -all?
Early rejection. SPF is checked during the SMTP transaction, often before the message body arrives. A receiver that rejects on SPF fail at that point never evaluates DKIM or DMARC, so a legitimate message with a valid, aligned DKIM signature can bounce purely because of -all. The 553 SPF domain authentication fail bounce from Symantec Email Security.cloud is a real example: it rejects on an SPF hard fail, while a softfail does not trigger it.
RFC 9989, Section 7.1, says this directly. It notes that SPF is designed to run early, that a domain owner publishing -all risks having mail with an aligned DKIM identifier rejected for the SPF failure alone, and that "messages rejected early in the SMTP transaction will never appear in aggregate DMARC reports". That last point matters to an MSP: you cannot fix what your reporting never sees.
The usual victim is forwarded mail. When a recipient's mailbox forwards to another provider, the forwarder's IP is not in your SPF record, so SPF fails at the next hop. RFC 7208, Section 10.2 acknowledges that SPF can "return 'fail' for mail that is ultimately legitimate", such as mail sent through an alias. DKIM normally survives forwarding, which is why DMARC can still pass. With ~all, receivers following Section 8.5 should not reject on SPF alone, so DKIM gets its chance. DMARC and email forwarding explains which forwarding setups break which checks.
Does -all give any extra protection with DMARC?
Only a little, and only in edge cases. Against a spoofer using your domain in the From header, an enforced DMARC policy already handles both results. Where -all adds something is at receivers that do not apply DMARC, and for mail that has no DKIM signature at all.
Microsoft makes this argument for its customers: "the DMARC policy is effectively ignored for SPF ~all failures if the messages don't also contain DKIM signatures. We recommend -all so DMARC can act on messages that fail SPF if the messages also lack DKIM signatures." That describes how Microsoft's own filtering behaves; it is not a rule in RFC 9989. If every legitimate source signs with aligned DKIM, the trade-off tilts back towards ~all.
What do Google, Microsoft and the NCSC recommend?
They disagree, which is a good sign that both endings are defensible. Google recommends ~all, Microsoft recommends -all, and the UK government guidance sets ~all as the minimum for sending domains and -all for domains that send no mail.
| Source | Recommendation | What they say |
|---|---|---|
| Google Workspace: Set up SPF | ~all |
"Google recommends you use ~all in your SPF record." Its SPF records overview warns that the fail qualifier "might cause more messages from your domain to be sent to spam" if the record is incomplete. |
| Microsoft Learn: Set up SPF | -all |
Recommended for Microsoft 365 domains "because we also recommend DKIM and DMARC". ?all is for testing and not recommended in production. |
| NCSC: Create and iterate an SPF record | No explicit rule | The page does not prescribe a qualifier; its example records end in ~all. |
| GOV.UK: Set up government email services securely | ~all minimum |
Publish SPF "using a minimum soft fail (~all) qualifier". |
| GOV.UK: Protect domains that don't send email | -all |
Non-sending domains publish v=spf1 -all. |
Both vendors pair their choice with DKIM and DMARC reporting, and that is the part that actually protects the domain. For UK public sector clients, ~all meets the GOV.UK minimum and -all exceeds it.
Should you ever use ?all or +all?
No, not on a domain in production. +all tells every receiver that any IP on the internet may send as the domain, so anyone can produce an SPF pass for your Return-Path. If the MAIL FROM domain aligns with the From domain, that pass also satisfies DMARC, which defeats the whole point.
?all is less dangerous but just as useless: neutral means the domain asserts nothing, and DMARC treats it as not passing. Microsoft reserves it for testing. If you inherit a client with either ending, fix it as part of onboarding, after checking aggregate reports for any sources that relied on it.
Which ending should an MSP use by default?
Use ~all on sending domains and v=spf1 -all on domains that never send. With aligned DKIM on every source and DMARC at enforcement, ~all loses no real protection and avoids early rejections of forwarded mail. Move to -all when a client's situation calls for it.
| Situation | Recommended ending | Why |
|---|---|---|
Sending domain, DMARC at p=quarantine or p=reject, aligned DKIM on all sources |
~all |
DMARC enforces; avoids SPF-only rejections of forwarded mail |
Sending domain still at p=none |
~all |
You are still discovering senders; a missed one should not bounce |
| Microsoft 365 tenant where you follow Microsoft's guidance | -all acceptable |
Microsoft's stated recommendation; confirm DKIM is enabled first |
| Important sources that cannot sign with aligned DKIM | -all worth considering |
DKIM cannot rescue them anyway, so SPF is their only signal |
| Client policy, insurer or auditor requires hardfail | -all |
Document the forwarding risk in the change ticket |
| Parked or non-sending domain | v=spf1 -all |
Nothing is authorised, so there is nothing to break |
| Non-sending subdomain with its own record | v=spf1 -all |
Same reasoning as a parked domain |
Parked domains need DMARC as well as SPF; should parked domains have a DMARC record gives the full record set. Whatever you choose, keep exactly one all in exactly one record. Multiple SPF records shows what happens when two records disagree, and SPF record best practices covers the rest of the record.
How do you change the qualifier safely?
Treat it as a DNS change with a rollback plan. Changing ~all to -all (or back) affects only mail that already fails SPF, so the risk sits with senders missing from the record and with forwarded mail.
- Check aggregate reports for sources with SPF
softfailthat should be passing. Each one is a sender that-allcould get rejected. - Confirm aligned DKIM on every legitimate source, so that DMARC can still pass when SPF fails.
- Lower the TTL on the SPF record a day ahead, so a rollback takes effect quickly.
- Change only the qualifier, leaving the mechanisms untouched, and confirm the live record with our SPF analyzer.
- Watch reports and bounces for a week. Remember that SMTP-stage rejections will not appear in aggregate data, so check bounce messages and helpdesk tickets too.
A DMARC platform such as DMARC AI shows SPF results per source for each client domain, which makes the first step a report filter rather than a manual trawl.
Frequently asked questions
Is ~all less secure than -all with DMARC enforced?
Not meaningfully. At p=quarantine or p=reject, DMARC fails mail that has neither an aligned SPF pass nor an aligned DKIM pass, whatever the qualifier. -all helps mainly at receivers that ignore DMARC and for unsigned mail, at the cost of possible early rejection of forwarded mail.
Does -all cause bounces on forwarded mail?
It can. Forwarded mail usually fails SPF because the forwarder's IP is not in your record. A receiver that rejects on SPF fail during the SMTP session will bounce it before checking DKIM. With ~all, RFC 7208 says receivers should not reject on that result alone.
Can I use -all if DMARC is still at p=none?
You can, but it is rarely wise. At p=none you are still finding senders, and any you missed will get SPF fail rather than softfail. Some receivers may reject that mail, and those rejections will not show up in your aggregate reports.
Should parked domains use ~all or -all?
-all. A domain that sends no mail should publish v=spf1 -all, together with a DMARC record at p=reject. Microsoft and GOV.UK both show this record for non-sending domains, and there is no legitimate mail that hardfail could break.
Final thoughts
The ~all versus -all debate matters less than it looks. Once DMARC is enforced, both endings fail DMARC in the same way, and the protection comes from aligned DKIM and a p=reject policy. Choose ~all for sending domains unless a client has a reason for hardfail, use v=spf1 -all on everything that does not send, and never leave +all or ?all in place.