// how to fix
SPF ~all or -all: which ending should you choose?
The end of your SPF record tells receivers what to do with unknown servers. Learn the difference between ~all and -all, and when to switch.
What it means
An SPF record lists the servers allowed to send email for your domain. Its last part, called the "all" mechanism, says what to do with every other server:
~all(soft fail): "other servers are probably not mine, treat the email with suspicion".-all(hard fail): "other servers are not allowed to send for me".?all(neutral): "I make no statement". It gives almost no protection.+all: "anyone can send for me". Never use it.
v=spf1 include:_spf.google.com ~all v=spf1 include:_spf.google.com -all
Why it matters
- With DMARC in place, the difference is small. Most large mailboxes, like Gmail and Outlook, use your DMARC policy to decide, not the SPF ending alone. An SPF fail or soft fail both count as "SPF did not pass" for DMARC.
- Without DMARC, some servers reject
-allfailures straight away, while they only mark~allfailures as suspicious. - If you forgot a sending service in your list,
-allcan get its emails rejected, especially when they are forwarded or have no DKIM. -alltells the world clearly that your list is complete, which helps protect your domain against spoofing.
How to check
- Use the Domain scanner: type your domain at
/domain-scannerto read your SPF record and its ending. - Send a test email: on the home page, copy your unique test address, send it a normal email from the mailbox or tool you want to check, then open the report. The SPF line shows "pass", "softfail" or "fail" for the server that sent it.
How to choose
Use ~all when
- You are setting things up and not yet sure every service is listed.
- Some of your emails are not signed with DKIM.
- Your emails are often forwarded (for example to university or old ISP addresses) and you have no DKIM to rescue them.
Use -all when
- You have listed every service that sends for you, and checked each one with a test email.
- All of them sign with DKIM on your domain.
- You have DMARC and its reports show no legitimate source failing.
- The domain sends no email at all: then use
v=spf1 -all.
How to switch safely
- Start with
~alland publish a DMARC record with aruaaddress to receive reports. - Read the reports for two to four weeks. Delivmail's paid dashboard includes DMARC monitoring that turns them into a readable list of senders.
- Add any missing service to SPF, and set up DKIM for it.
- Change the ending to
-allin your DNS provider. Edit the existing record; do not add a second SPF record. - Keep watching the reports for a few more weeks.
Remember: the real protection comes from DMARC with a quarantine or reject policy. The SPF ending is a detail compared with that.
Check that it is fixed
DNS changes are not instant. Most are visible within a few minutes, but some providers take up to 24 to 48 hours.
Run the Domain scanner again to see the new ending, then send a test email from each of your sending services. Each report should show SPF passing.
Check that it is fixed
DNS changes can take from a few minutes to a few hours. Then send a new test email or scan your domain again.
Related guides
- No SPF record on your domainYour domain does not say which servers may send email for it. Add one TXT record and receivers can tell your real emails from fakes.
- SPF error: too many DNS lookups (permerror)SPF allows at most 10 DNS lookups. Above that, the whole record breaks and receivers treat it as invalid. Here is how to slim it down.
- Several SPF records on one domainA domain must have only one SPF record. With two or more, SPF breaks for every email. Merge them into a single line.
- SPF fails: the sending server is not authorizedYour domain has an SPF record, but the server that sent your email is not in it. Find which service sent the email and add it.
- No DKIM signature on your emailsDKIM adds a digital signature that proves an email really comes from your domain. Turn it on in your email provider and publish its key in DNS.