SPF Flattening – Reduce Lookups & Stay Under 10
SPF flattening reduces the number of DNS lookups your record triggers by consolidating includes into a single record or a smaller set. Useful when you're near or over the 10-lookup limit.
How it works
Normally, each include: causes the receiver to look up another domain's SPF record, and that can chain. Flattening replaces those includes with a record that either lists IPs directly (ip4:/ip6:) or uses one or two includes that already aggregate the needed IPs, so total lookups stay under 10.
When to consider it
When your current SPF already exceeds 10 lookups or you're adding another ESP and would go over. Check your lookup count with a checker first; if you're under 10 and not planning more includes, you may not need flattening.
Common mistakes
- Using a flattened record that isn't updated when your ESP changes IPs.
- Flattening manually and then adding a new include, pushing lookups over 10 again.
- Assuming all ESPs support flattening; check with your provider.
Scan my SPF setup
See your SPF lookup count and whether flattening would help. No signup required.
FAQ
What is SPF flattening?
Flattening replaces multiple include: mechanisms with a single record that lists the resolved IP addresses (or a smaller set of includes). That reduces the number of DNS lookups during evaluation.
Who offers SPF flattening?
Some ESPs and third-party services offer flattening: they generate a record that stays under 10 lookups by inlining or consolidating what would otherwise be many includes.
Do I need to flatten if I have few includes?
Not necessarily. If your current record is under 10 lookups and you're not adding more providers, flattening may not be required. Use a checker to see your lookup count.
Can flattening break when my ESP changes IPs?
Yes. Flattened records are often static or updated periodically. If the ESP adds or changes IPs, the flattened record may need to be regenerated. Some services do this automatically.
Related reading
Read-only checks. We don't send email or modify DNS. How we check