SPF Record Syntax: The Complete Reference (RFC 7208)

SPF Record Syntax: Mechanisms, Qualifiers, Modifiers, and Macros

SPF Record Syntax: The Complete Reference (RFC 7208)

SPF records follow a single shape: a DNS TXT record starting with v=spf1, followed by space-separated mechanisms and modifiers. This reference covers all eight mechanisms (all, include, a, mx, ptr, ip4, ip6, exists), the four qualifiers (+ - ~ ?), the two modifiers (redirect and exp), and the complete macro table. It details evaluation order, DNS lookup limits (10 per record), and placement rules, each with the relevant RFC 7208 section. A notable warning: the ptr mechanism is explicitly deprecated ('do not use') by the RFC, yet 1.4% of SPF-enabled domains still publish it.

The RFC itself concedes the name was 'poorly chosen': a -all inside an included record does not fail your outer record — a Fail, Softfail, or Neutral inside simply means 'no match here, keep going'.

More from this day

2026-08-03