Opens in a new tab

SPF ~all vs -all: softfail, fail, neutral and pass

The all at the end of an SPF record matches every server, so the sign in front of it decides the answer for any server not listed before it: -all says fail, ~all says softfail, ?all says neutral, and +all says pass — which authorises the whole internet.

Syntax-all | ~all | ?all | +all
Counts as a DNS lookupNo
PositionLast: anything after all is never read
Without any allThe result for unlisted servers is neutral
Defined inRFC 7208 §5.1

What it does

SPF reads a record left to right and stops at the first mechanism that matches the sending server. all matches anything, so it only decides for servers nothing earlier matched. Its qualifier is the answer: – fail, ~ softfail, ? neutral, + (or no sign) pass.

What a receiver does with the answer is up to the receiver. Fail is a clear statement that the server is not allowed, and some receivers refuse such mail outright — Gmail’s 550 5.7.26 has a wording just for a -all failure. Softfail says “probably not”, and is usually accepted and scored rather than refused.

DMARC only counts a pass. For DMARC, fail and softfail are the same thing — SPF did not pass — and the message then depends on DKIM.

Examples

v=spf1 include:_spf.google.com ~all

Google Workspace’s servers pass; anything else softfails.

v=spf1 ip4:203.0.113.10 -all

One server passes; any other fails outright.

v=spf1 -all

No server may send with this domain as the bounce address — the right record for a domain that sends no mail.

See what your own SPF record says

Every term of your published record, read and explained — including this one.

Common mistakes

  • +all, which lets every server on the internet pass SPF for your domain.
  • Mechanisms after all, which are silently ignored.
  • Switching to -all before every service sending as the domain is in the record.

What we recommend

Use ~all while you are still finding your senders, and keep it if you rely on DKIM and DMARC to do the rejecting: a receiver that refuses on SPF fail can refuse forwarded mail before DKIM gets a chance to save it.

-all is right for a domain that sends no mail at all (v=spf1 -all), and a reasonable choice once every sender passes. Never use +all; ?all only as a brief step.

Build an SPF record →

Questions

Is -all more secure than ~all?

Not by much once DMARC is enforced. DMARC treats fail and softfail alike, and it is DMARC’s policy that decides what receivers do with forgeries. -all adds a signal for receivers that do not check DMARC.

Google says ~all and Microsoft says -all. Which is right?

Both work. Google Workspace’s setup guide uses ~all and Microsoft 365’s uses -all; either passes Google’s or Microsoft’s own mail. Choose by the reasoning above, not by provider.

Sources

Checked on 25 September 2026 against these official sources:

Know when your records change

Add your domain and we monitor its SPF, DKIM and DMARC every day, read the DMARC reports receivers send you, and email you when a record changes or a sender starts failing. Free for your first domain.

Create a free account