Email Auth Check › Guides

SPF record syntax explained, with examples

An SPF record is one TXT record on your domain listing who may send mail using it.

v=spf1 include:_spf.google.com include:sendgrid.net ip4:203.0.113.5 ~all
PartMeaning
v=spf1Required first token.
include:Also allow whatever another domain’s SPF allows (your mail provider).
ip4: / ip6:Allow a specific address or range.
a / mxAllow the domain’s A or MX hosts.
~allSoftfail everything else (accept but mark).
-allFail everything else.
?all / +allNeutral / allow everyone. Avoid both, +all especially.

Examples

Google Workspace only: v=spf1 include:_spf.google.com ~all

Domain that never sends mail: v=spf1 -all

~all or -all?

With DMARC in place, receivers mostly act on the DMARC policy, so the difference matters less than people think. ~all is the common safe default; -all is fine once you’re sure every sender is listed.

See exactly what your domain’s SPF, DKIM and DMARC look like, free.

Check my domain

More guides