What counts
- Counts:
include:,a,mx,ptr,exists:andredirect=, and every one of those inside the records you include. - Doesn't count:
ip4:,ip6:andall.
The nesting is what catches people. An include looks like one lookup, but the record it points to can include others, and each of those counts too. Add a CRM, a helpdesk, a newsletter tool and an invoicing app, and you're past ten without noticing. The checker above walks the whole tree and gives you the real number.
Getting back under ten
- Remove what no longer sends. Old providers and tools you stopped using years ago are the usual first win. If you're not sure a service still sends, DMARC reports will tell you.
- Drop
a,mxandptr. They're often there by habit.ptris discouraged by the standard itself. If your own server sends mail, list its IP asip4:instead. - Move senders to a subdomain. Send newsletters from
news.example.comand give that subdomain its own SPF record. Each domain has its own limit of ten, and it keeps marketing mail's reputation apart from your team's. - Flatten, with care. Flattening replaces includes with the IP addresses they currently resolve to. It works, but providers change their IPs, so a flattened record has to be kept up to date by a service, not by hand.
A related limit: void lookups
A lookup that returns nothing (an include pointing at a name that no longer exists) is a void lookup. More than two and many receivers treat SPF as broken too. They usually come from a tool you stopped using, so the fix is the same: remove the include.