Tools SPF checker

SPF record checker

See your SPF record, every service it includes, and how close you are to the 10-lookup limit, with the corrected record when something's wrong.

What is SPF?

SPF (Sender Policy Framework) is a list, published in your DNS, of the servers allowed to send email for your domain. When Gmail or Outlook receive an email from you, they check whether it came from one of those servers.

Why it matters

Without SPF, or with a broken one, more of your email lands in spam, and it's easier for scammers to send email in your name. Gmail, Yahoo and Microsoft now require SPF or DKIM from every sender, and both from bulk senders.

What a good record looks like

One record, starting with v=spf1, listing each service that sends email for you, and ending with ~all or -all:

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

Common mistakes

  • Two SPF records. Only one is allowed; with two, both are ignored. Merge them into one.
  • More than 10 lookups. Each include costs at least one, and the includes inside it count too. Go over 10 and SPF stops working.
  • Adding services that don't need to be there. Mailchimp, Shopify, Klaviyo and others send from their own address; they only need DKIM.
  • Ending with +all, or a bare all, which allows anyone in the world to send as you.
  • Writing include= or ip4: with a server name. SPF ignores the whole record when one part is wrong.

Questions people ask

Do I need SPF if I have DKIM?
Yes, use both. DMARC passes if either one passes and matches your domain, so having both makes your email more reliable, for example when an email is forwarded.
What's the difference between ~all and -all?
~all says "probably not us", -all says "definitely not us". With a DMARC record in place, ~all is the usual, safe choice: DMARC then decides what happens.
Why is there a 10-lookup limit?
It stops SPF checks from overloading DNS servers. Every include, a, mx, exists and redirect costs a lookup, including the ones inside other includes. ip4 and ip6 are free.
Should I use an SPF flattening service?
Only as a last resort. Flattening replaces includes with lists of addresses, which go stale when your providers change their servers. Removing services you don't use is safer.