A receiver may make at most ten DNS lookups while evaluating an SPF record. One more and the result is permerror — for every message, from every server, including the ones your record does list.
| Syntax | include, a, mx, ptr, exists, redirect |
| Limit | 10 terms that cause a DNS query |
| Counted | include, a, mx, ptr, exists, redirect — nested ones too |
| Not counted | ip4, ip6, all |
| Over the limit | permerror |
| Defined in | RFC 7208 §4.6.4 |
What it does
The limit protects receivers from records that would make them query DNS without end. Every include, a, mx, ptr and exists term counts, and so does redirect — in your record and in every record they lead to. ip4, ip6 and all are free.
An mx term can also look up at most ten mail server names, and ptr ten names, before the result is permerror.
Permerror is not a softfail: under DMARC the message has no SPF pass at all, and receivers that act on SPF errors may refuse it.
Examples
v=spf1 include:_spf.google.com include:spf.protection.outlook.com include:mailgun.org include:_spf.salesforce.com a mx ~all
Four services and a and mx: easily over ten once each include’s own lookups are counted.
See what your own SPF record says
Every term of your published record, read and explained — including this one.
Common mistakes
- Counting only the includes you see: the lookups inside them count too.
- Keeping a and mx terms “just in case” when your web server and inbound mail servers never send mail.
- Includes for services that do not need one because they use their own bounce domain.
What we recommend
Remove what you do not use first. Replace a and mx with ip4: when those addresses rarely change. Send marketing from a subdomain with its own SPF record. If you are still over, flatten the record — hosted SPF keeps a flattened copy up to date for you.
See how many lookups your record uses →
Hosted SPF: a flattened record kept up to date →
Questions
Is the limit ten includes?
No — ten lookups. One include can cost several on its own, because everything inside the included record counts.
Is it safe to flatten an SPF record by hand?
Only if you re-check it often. A flattened record lists the services’ addresses directly, and services change them without telling you; the first you would hear is mail failing. That is why hosted flattening re-checks hourly.
Sources
Checked on 25 September 2026 against these official sources: