SPF Checker

Validate a domain's SPF record, count its DNS lookups and find errors.

FreeNo sign-upUses public DNS data
Loading tool…

An SPF (Sender Policy Framework) record is a DNS TXT record that lists which servers may send email for a domain. Receiving servers compare the sending server's IP with this list, so a correct SPF record is one of the three checks, with DKIM and DMARC, that stop others from sending mail as you.

What this checker tests

  • Exactly one record. Two or more SPF records cause a permanent error (PermError).
  • Syntax. Each mechanism and modifier must be valid under RFC 7208.
  • The 10-lookup limit. We follow every include and redirect and count the DNS lookups they cause.
  • The final rule. We flag +all, ?all or a missing all.
  • Deprecated parts. The ptr mechanism is slow and should not be used.

Reading an SPF record

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

v=spf1 marks it as SPF. include: pulls in your email provider's list. ip4: allows one address or range. ~all says every other server should soft-fail.

EndingMeaningUse it?
-allFail: not allowedYes, once you know all your senders
~allSoftFail: suspiciousYes, the common safe default
?allNeutral: no opinionNo, it protects nothing
+allPass: anyone may sendNever

The 10 DNS lookup limit

Receivers stop after 10 DNS lookups while evaluating SPF. Every include, a, mx, exists and redirect counts, including the ones nested inside your providers' records.

Going over the limit makes SPF fail for all your mail, not just some of it. It is the most common SPF problem for companies using many email services.

To cut lookups, remove services you no longer use. You can also replace an include with the provider's fixed ip4: ranges, but only if they promise those ranges will not change.

SPF alone is not enough

SPF checks the hidden envelope sender (Return-Path), not the From address people see. A scammer can pass SPF with their own domain and still show your name in From.

DMARC closes that gap by requiring SPF or DKIM to match the visible From domain. Check yours with the DMARC checker.

Frequently asked questions

Can a domain have two SPF records?

No. A domain must publish exactly one TXT record starting with v=spf1. If you have two, merge their mechanisms into one record and delete the other.

Should I use -all or ~all?

Start with ~all. Once DMARC reports show every legitimate sender passing, you can move to -all. With an enforced DMARC policy the practical difference is small.

How long until SPF changes work?

Usually minutes, but up to the TTL of the old record and sometimes 48 hours for caches to clear everywhere.

Does a domain that sends no email need SPF?

Yes. Publish v=spf1 -all so nobody can pass SPF while pretending to be that domain, and add a DMARC record with p=reject.