Glossary

SPF

A DNS record listing which servers may send email for your domain.

In plain English A list you publish saying which services are allowed to send email for your domain. Mail from anywhere else looks suspicious.

SPF (Sender Policy Framework) is a DNSDNS The internet’s phone book. It turns a name people can remember, like example.com, into the number address computers use to find the server. More about DNS → record listing the servers allowed to send email for your domain. A receiving mail server checks whether the server that sent a message is on the list. If not, the message is more likely to be marked as spam or rejected.

What it looks like

SPF lives in a single TXT recordTXT record A domain setting that holds a line of text. Services use it to check you own the domain, and email uses it for SPF, DKIM and DMARC. More about TXT record → on the domain:

example.com.  TXT  "v=spf1 include:_spf.google.com ip4:203.0.113.25 -all"
PartMeaning
v=spf1This is an SPF record
include:_spf.google.comAlso allow whatever servers that domain’s SPF lists
ip4:203.0.113.25Allow this address
mxAllow the domain’s own MX servers
-allFail everything else; ~all is a softer “probably not”

The rules that trip people up

  • One record only. Two TXT records starting v=spf1 make SPF fail entirely. Merge them.
  • Ten lookups maximum. Every include, a, mx and redirect counts, including those inside included records. Exceed ten and SPF fails. Remove services you no longer use.
  • Forwarding breaks it. A forwarded message arrives from the forwarding server, which is not on your list. DKIM survives forwarding, which is why both matter.

SPF checks the hidden envelope sender, not the From address people see. DMARC connects the two. Check your record with dig TXT example.com +short, and see how to set up SPF, DKIM and DMARC.

Check any domain’s record with the free SPF, DKIM and DMARC checker.