All terms
Glossary · SPF details
SPF flattening
SPF flattening is the practice of resolving the domains in an include chain and writing their IP addresses (ip4, ip6) into the record directly, to reduce the number of DNS lookups.
By: Kemal Özleyen, Cybersecurity Engineer · Check Point Workspace Security Expert · Kinetik Bilişim
How it works
Flattening is not a mechanism defined in RFC 7208 but an operational workaround for the 10-lookup limit. ip4 and ip6 cause no lookups and do not count towards it (RFC 7208 §4.6.4).
The cost: when a provider changes its sending addresses, the flattened record goes stale and legitimate mail fails SPF. Flattening is therefore done either with a tool that keeps the record updated, or not at all. Removing unused includes and the ptr mechanism, which the RFC says not to use, is a safer first step (RFC 7208 §5.5).
Guide The SPF 10 DNS lookup limit
Related SPF 10 DNS lookup limit · SPF include · SPF
Source RFC 7208 §4.6.4 · RFC 7208 §5.5
Last updated: