SPF flattening
SPF Flattening: When It Helps and When It Bites
Flattening trades a lookup problem for a maintenance problem. When that trade is worth making, and when pruning is better.
Aplanador de SPFPruébelo en su propio dominio primero. Gratis, sin cuenta.Why flatten SPF?
SPF is limited to 10 DNS lookups when it is evaluated. Each include: (for Google, a CRM, an ESP, etc.) can consume several. Cross the limit and SPF returns permerror and fails, even though your record looks correct.
What flattening does
Flattening resolves the include: mechanisms down to their underlying IP addresses, so your record uses ip4:/ip6: entries instead of chained lookups. That keeps you safely under the limit.
The trade-off
Flattened records must be kept in sync: if a provider changes its sending IPs, your hardcoded list goes stale. Re-check periodically, or only flatten the includes that are stable.
When not to flatten
Flattening a large provider such as Google or Microsoft is the riskiest kind, because their IP ranges change without warning and the resulting record can be enormous. Pruning is usually the better first move: remove the vendors that no longer send for you, and you often drop back under 10 without touching the stable includes.
Keeping a flattened record fresh
A flattened record is a snapshot with an expiry date nobody writes down. Re-resolve the includes you flattened on a schedule and compare the IP list, because the failure mode is silent: mail from a newly added provider IP simply stops passing SPF, with no error anywhere in your own systems.
Check yours now
Resolve your current record with the free SPF flattener to see the real lookup count and what flattening would produce. If pruning turns out to be the better fix, rebuild the record from your actual senders with the free SPF record generator, and SPF record setup covers the rest.
Preguntas frecuentes
What is the SPF 10 lookup limit?
When SPF is evaluated it may perform at most 10 DNS lookups. Exceeding this causes a permerror, which means SPF fails for your domain.
Is flattening safe?
It is safe as long as you keep the resulting IP list up to date. If a sender changes IPs, a flattened record can go stale and start failing legitimate mail.
How do I know I am over the limit?
Validate your SPF record. If it reports a permerror or "too many DNS lookups", you are over 10 and should flatten or remove unused includes.
Is the flattener free?
Yes, flattening your SPF record here is free.
How often should I re-flatten?
Whenever a provider announces an IP change, and on a regular schedule otherwise. The failure is silent, so nothing tells you the list went stale except mail quietly failing SPF.
Will flattening break my mail?
Not immediately. It breaks later, if a provider adds an IP that your frozen list does not contain. That is why pruning unused includes is the safer fix when it gets you under the limit.
Más guías
- SPFSPF Record Setup Guide
- DKIMDKIM Record Setup Guide
- DMARCDMARC Record Setup Guide
- email headersReading Email Headers
Estas herramientas responden la pregunta una vez. El monitoreo continuo vuelve a revisar su dominio cada 6 horas y le avisa cuando la respuesta cambie, desde $14/mes. Precios
