Skip to the content

SPF Record Check

Look up the SPF record of a domain and have it explained term by term, with its includes followed and the DNS lookups counted.

The domain and the names its SPF record refers to are sent to Cloudflare's public DNS resolver, or to Google's if Cloudflare cannot be reached.

Share this tool:TwitterFacebookLinkedInWhatsAppEmail

What the check does

The TXT records of the domain are looked up, and the one that starts with v=spf1 is taken apart. Each term gets a line of explanation, the records behind include: and redirect= are fetched as well, and the DNS lookups are counted.

A receiving mail server reads an SPF record from left to right, and the first term that matches the sending server decides. A term is a mechanism with an optional sign in front of it:

SignResultWhat receivers do with it
+ or nonePassThe server is allowed
-FailThe server is not allowed; the mail is usually rejected
~Soft failProbably not allowed; the mail is accepted but treated as suspicious
?NeutralNothing: the record makes no statement

So v=spf1 mx include:_spf.example.net -all reads: the domain's own mail servers may send, so may everything that _spf.example.net allows, and nobody else.

The mistakes it looks for

  • More than one SPF record. Receivers do not combine them. Two records count as an error, and SPF fails for every message.
  • More than 10 DNS lookups. Every include, a, mx, ptr, exists and redirect costs one, in the included records too. Past ten, receivers stop with an error. It is what happens when one mail service after another is added.
  • +all, which allows the whole internet, and a record without any all, which leaves unknown servers undecided.
  • ptr, which the standard itself says not to use.

SPF looks at the envelope sender, not at the From line a person sees. Protection against forged From addresses takes DMARC on top of it.

The DNS lookup page asks for all record types of a name at once, and explains TTLs, DNSSEC and which resolver gives the answers.