You set up SPF.
You added includes for SendGrid, HubSpot, Mailchimp, ActiveCampaign, your mail provider, and a few others.
Then you checked SPF at mxtoolbox.com.
Result: "Fail. Too many DNS lookups (12 found, limit is 10)."
Emails are bouncing. SPF is broken. This is a common problem when you use multiple email services.
This post shows you what the 10-lookup limit is, why it exists, and how to fix it using SPF flattening.
What Is the SPF 10-Lookup Limit?
SPF (Sender Policy Framework) works by doing DNS lookups.
ISPs query your SPF record: "Can this IP send for yourdomain.com?"
Your SPF record says: "Let me check... SendGrid can, HubSpot can, Mailchimp can..."
Each "check" = 1 DNS lookup.
The limit: ISPs will follow maximum 10 DNS lookups per SPF record. After 10, they stop and reject the SPF as "too complex."
Result: SPF fails. Email bounces.
Why This Happens (Multiple Email Services)
You probably use multiple email services:
- HubSpot for CRM email
- Mailchimp for newsletter
- SendGrid for transactional emails
- Instantly or SmartLead for cold email
- Your mail server for regular email
- Maybe Zapier or Make.com for automation (which also send email)
Each service needs an SPF include:
`
v=spf1
include:sendgrid.net
include:hubspot.com
include:mailchimp.com
include:instantly.ai
include:smartlead.ai
include:your-mail-server.com
include:zapier.com
include:make.com
~all
`
That's 8 includes. Plus any A, MX, or IP records in your SPF (each counts as 1 lookup).
Example: include:sendgrid.net = 1 lookup. But sendgrid.net itself might reference other includes internally. Each one counts. Total: might be 2-3 lookups for just SendGrid.
You can easily hit 10+ lookups with just 3-4 email services.
How to Diagnose: Check Your SPF Lookup Count
- Go to mxtoolbox.com
- Click "SPF Record"
- Enter your domain
- Check the result
- MXToolbox will tell you: "X DNS lookups found" (X should be 10 or below)
If X is 11 or more: You have too many lookups.
MXToolbox also shows you where each lookup is coming from:
Example result:
`
Lookup 1: yourdomain.com (A record)
Lookup 2: sendgrid.net
Lookup 3: sendgrid.net → sendgrid-net.spf.protection.outlook.com → lookup 4
Lookup 4: (from sendgrid chain)
Lookup 5: hubspot.com
...
Total: 12 lookups (FAIL - limit is 10)
`
This tells you which service is consuming the most lookups.
Fix 1: Remove Unnecessary Email Services from SPF
If you have 8 email services but only 2 are actively sending, remove the unused ones.
How to identify unused services:
- Check your SPF record
- Ask yourself: Which services actually send email from yourdomain.com?
- Remove any that don't (or shouldn't)
Example:
- Using HubSpot CRM: Keep in SPF
- Using Mailchimp newsletter but didn't send in 6 months: Remove
- Using Zapier to send notifications: Keep
- Using old email service that's deprecated: Remove
The fix:
- Log into your domain registrar
- Find DNS/DNS Records
- Edit your SPF record
- Remove "include:service-i-dont-use.com"
- Save
- Wait 24 hours
- Re-check at mxtoolbox.com
Example before/after:
Before (12 lookups):
`
v=spf1 include:sendgrid.net include:hubspot.com include:mailchimp.com
include:instantly.ai include:smartlead.ai include:old-service.com
include:zapier.com include:make.com ~all
`
After (8 lookups):
`
v=spf1 include:sendgrid.net include:hubspot.com include:instantly.ai
include:smartlead.ai include:zapier.com include:make.com ~all
`
Removed: mailchimp.com, old-service.com
Result: Dropped from 12 to 8 lookups. SPF passes.
This fixes 30-40% of SPF lookup problems.
Fix 2: SPF Flattening (Complex, Usually Requires Professional Help)
If you have many email services and can't remove any, you need SPF flattening.
Flattening replaces include:service.com with the actual IP addresses that service uses.
Why this matters:
include:sendgrid.net= 1-2 lookups (depends on sendgrid's SPF structure)- Flattened = list of IPs with no includes = 0 additional lookups
Example:
Before (flattening):
`
v=spf1 include:sendgrid.net include:hubspot.com ~all
`
After (flattening):
`
v=spf1 ip4:192.0.2.1 ip4:192.0.2.2 ip4:192.0.2.3 ~all
`
The IPs are SendGrid's and HubSpot's actual sending IPs.
Downside of flattening:
- When SendGrid adds new IPs, you have to update your SPF manually
- Your domain host needs to do this, it's not automatic
- Requires quarterly or annual maintenance
Why not flatten everything:
- Too many IPs to list
- SPF record has size limits
- Becomes hard to manage
When to flatten:
- You have 1-2 high-volume email services
- You have control over those IPs (they're stable)
- You can maintain it quarterly
How to flatten (involves your domain host):
- Contact your domain registrar (GoDaddy, Namecheap, etc)
- Say: "I need SPF flattening for my domain. I have too many includes."
- Provide list of services: SendGrid, HubSpot, Instantly, etc
- They'll contact each service and get their IPs
- They'll replace includes with IP list
- They'll test and implement
- You'll get new SPF record to use
Cost: Usually free if you're a customer. Sometimes $25-50 if you're not.
Time: 1-2 weeks.
We handle SPF flattening for clients at enterprise scale. If you have 100+ inboxes and complex infrastructure, this becomes necessary.
Fix 3: Consolidate Email Services (Recommended)
Use fewer email services.
Instead of 8, use 3-4.
Example consolidation:
- Use Instantly (cold email) + HubSpot (CRM) + SendGrid (transactional)
- Remove: Mailchimp (use HubSpot newsletter), Zapier (use HubSpot automation)
- Result: Lookups drop from 12 to 6
This is the easiest fix.
Many companies use redundant services without realizing it.
Audit your email services:
- List every service that sends email from your domain
- Ask: Is this necessary?
- Consolidate where possible
- Remove truly unused ones
- Result: Fewer lookups
SPF Best Practices (Prevent the Problem)
Once you fix SPF, keep it under 10 lookups:
Rules:
- Use 3-4 primary email services max
- If adding new service, remove old one first
- Use service consolidation (e.g., HubSpot does CRM + email + SMS)
- Monitor SPF monthly (use mxtoolbox.com)
- Document which services you have and why
Maintenance:
- Monthly: Check SPF at mxtoolbox.com
- Quarterly: Audit email services (still need them all?)
- Annually: Review total lookups (should stay under 10)
Real Example: SPF Flattening at Scale
One enterprise client had 50+ inboxes across multiple domains.
Situation:
- 8 different email services sending
- 5 of them sending for each domain
- SPF lookups: 15-18 per domain
- Emails bouncing due to SPF fail
What we did:
- Identified which services were redundant (could consolidate)
- Consolidated from 8 services to 4
- Reduced lookups from 15+ to 8
For 2 core services (SendGrid and Instantly), did SPF flattening to get down to 6 lookups total.
Results:
- SPF: Now passes on all domains
- Bounce rate: Dropped from 8% to 2%
- Deliverability: Improved 60% → 82%
Total time: 20 hours of work (mostly consolidation planning, flattening, and testing).
Troubleshooting: SPF Still Failing After Fixes
If SPF still shows fail after removing services or flattening:
Check 1: Wait for DNS propagation
- Changes take 24-48 hours to fully propagate
- Wait 2 days, then re-check
Check 2: Syntax error
- Go to mxtoolbox.com and look for the error message
- If it says "Invalid syntax," your SPF record has a typo
- Correct the record in your domain registrar
Check 3: Mixed flattened and non-flattened
- Don't mix IP lists and includes in one record (causes confusion)
- Either flatten everything or use includes, not both
Check 4: Wrong domain
- Make sure you're checking the right domain
- If using subdomain (mail.yourdomain.com), check that domain, not main domain
FAQ
Q: How many lookups is acceptable?
A: Under 10. Ideally under 8 (gives you headroom to add 1-2 more services later).
Q: Do all ISPs enforce the 10-lookup limit?
A: Yes. It's in the SPF specification. Every ISP that checks SPF respects this limit.
Q: If I flatten SPF, do I still need regular updates?
A: Yes. When email services add new sending IPs (e.g., new data center), you update your SPF with new IPs. Your domain host handles this.
Q: Is SPF flattening permanent or temporary?
A: Permanent. Once flattened, you maintain the flattened record. You can unflatten it later if you want.
Q: What if I use an email service that doesn't publish IPs?
A: They should include instructions. If they don't, contact their support. All legitimate email services provide SPF includes or flattened IP lists.
Q: Can I use a subdomain for SPF to avoid the limit?
A: Yes. Use mail.yourdomain.com with its own SPF. You'll have main domain SPF + mail subdomain SPF (separate records, separate lookup limits).
Next Steps
- Check your SPF at mxtoolbox.com right now
- Note the lookup count
- If 10 or below: You're fine, no action needed
- If above 10:
- Identify unused email services in your SPF
- Remove 2-3 unused ones
- Wait 24-48 hours
- Re-check at mxtoolbox.com
- If still above 10:
- Contact your domain registrar
- Request SPF flattening
- They'll handle consolidating IPs
- Once under 10: SPF should pass and emails should stop bouncing
Most clients fix SPF lookup issues in 1-2 weeks by removing unused services.
If you're using 50+ domains or highly complex infrastructure, professional setup is worth it.
Check our packages: https://imisofts.com/cold-email-marketing#packages
Read next: DMARC Failing Fix | SPF DKIM DMARC Setup | Email Deliverability