SPF Mechanisms Explained

Free SPF mechanism reference: every mechanism in RFC 7208 (include, a, mx, ptr, exists, ip4, ip6, all) explained with syntax and lookup cost.

MechanismSyntaxDNS LookupWhat it matches
includeinclude:domain.comYesThe SPF record of domain.com (recursive)
aa[:domain] [/cidr]YesA records of domain (or current domain)
mxmx[:domain] [/cidr]YesMX hosts of domain, then their A records
ptrptr[:domain]Yes (deprecated)Reverse DNS lookup of the sender IP
ip4ip4:1.2.3.0/24NoIPv4 address or range
ip6ip6:2001:db8::/32NoIPv6 address or range
existsexists:domain.comYesA record exists at the given domain
allallNoMatches everything (always last)

Technical details

An SPF mechanism is a single evaluation rule inside a v=spf1 TXT record defined in RFC 7208 that determines whether a sending IP is authorized to send email for a domain.

SPF mechanisms are evaluated left to right, and the first mechanism that matches the connecting IP address determines the result (pass, fail, softfail, or neutral).

The 10-DNS-lookup limit in RFC 7208 caps the total number of mechanisms that trigger DNS queries (include, a, mx, ptr, and exists) to prevent denial-of-service amplification.

Frequently asked questions

How many SPF mechanisms can I have?+

You can have unlimited non-DNS mechanisms (ip4, ip6, all). DNS-querying mechanisms (include, a, mx, ptr, exists) are capped at 10 total.

What happens if I use two all mechanisms?+

Only the first all mechanism is evaluated. The second is ignored. RFC 7208 requires all to be the last mechanism.

Does include: recursive counting apply to nested includes?+

Yes. Each include: triggers a new SPF evaluation of the target domain, and its own DNS-querying mechanisms count against your total of 10.

Check your domain with our free tools: SPF checker, DMARC checker, DKIM checker.

Last verified: 2026-10-28