Free tool

SPF record checker

Enter a domain to look up its SPF record. The checker parses each mechanism, follows include: and redirect= all the way down, and counts DNS lookups against the limit of 10 that receivers enforce.

Paste a domain, an email address or a URL. Try , or .

What an SPF record is

SPF (Sender Policy Framework, RFC 7208) is a TXT record at the root of a domain that lists the servers allowed to send mail using that domain in the envelope sender, the address in MAIL FROM, which ends up in the Return-Path header. A receiving server looks it up, works through the mechanisms left to right, and stops at the first one that matches the connecting IP.

example.com.  TXT  "v=spf1 ip4:192.0.2.0/24 include:_spf.google.com ~all"

That record says: the 192.0.2.0/24 range may send, so may anything Google's SPF record allows, and everything else soft fails.

How to read the result

  • Mechanisms: each term in order, its qualifier, and what it matches. + (the default) is Pass, - is Fail, ~ is SoftFail and ? is Neutral.
  • DNS lookups: the total across the whole include tree. This is the number receivers count, not the number of terms you can see in your own record. include:_spf.google.com costs one; an include that contains three more includes costs four.
  • Void lookups: DNS queries that return no records or NXDOMAIN. RFC 7208 lets receivers fail the check after two. They usually come from an a, mx or include pointing at a name that no longer exists.
  • Includes: each include: and redirect= row shows the record it pulls in, the includes nested inside it, and how many lookups it costs.

Common failures and how to fix them

Too many DNS lookups. The usual cause is adding one include: per tool over the years.

v=spf1 include:_spf.google.com include:spf.protection.outlook.com include:sendgrid.net include:mailgun.org include:servers.mcsv.net include:_spf.salesforce.com include:mail.zendesk.com a mx ~all

Remove includes for services you no longer use. Replace a and mx with the ip4: ranges they resolve to, if those addresses are stable. Move bulk or marketing mail to a subdomain such as mail.example.com with its own SPF record. "SPF flattening" services replace includes with IP lists; they work, but the lists go stale whenever a provider changes its ranges, so prefer the other options first.

Two SPF records. This often happens when a new provider's setup guide says "add this TXT record" and the old one stays:

example.com.  TXT  "v=spf1 include:_spf.google.com ~all"
example.com.  TXT  "v=spf1 include:sendgrid.net ~all"

Merge them into one: v=spf1 include:_spf.google.com include:sendgrid.net ~all.

+all or ?all. +all passes every server on the internet. ?all is the same as having no policy. End the record with ~all or -all.

include= instead of include:. include=_spf.google.com is parsed as an unknown modifier and silently ignored, so Google's servers are not authorized. The checker flags this.

ptr. Deprecated by RFC 7208: it is slow, depends on reverse DNS you often do not control, and some receivers skip it. Replace it with ip4:/ip6: or an include:.

Long records split badly. A single TXT string holds at most 255 characters, so longer records are published as several strings. Receivers join them without adding a space. A split in the middle of a term is fine as long as the joined text is correct:

"v=spf1 ... ip4:62.253.2" "27.114 ip4:166.78.69.169 ~all"

joins to ip4:62.253.227.114. A split that drops or adds a character breaks the term. The checker shows the string lengths so you can see where the boundary falls.

SPF passes but mail still fails DMARC. SPF only checks the envelope sender. If your email service sends with Return-Path: bounces@esp-mail.net, SPF passes for esp-mail.net, not for you. Set up the provider's custom return-path (or bounce) domain so it aligns with your From domain, or rely on DKIM alignment.

Checking it end to end

DNS shows what you published, not what a receiver concluded. To see the verdict, send a message and read the Authentication-Results and Received-SPF headers on the receiving side. That shows which IP was checked, against which envelope domain, and the result.

Frequently asked questions

SPF Record Generator
Build an SPF record from your mail providers and see the lookup cost as you go.
DMARC Lookup
Read a DMARC policy in plain words and check that report addresses accept your reports.
DKIM Lookup
Fetch a DKIM key by selector, read its size and flags, or scan common selectors.