Your emails go to spam or fail authentication. The cause may be an SPF record that exceeds the 10 DNS lookup limit. This is a common and easily fixable issue. This guide explains why SPF has too many lookups and how to fix it.
What SPF is
SPF (Sender Policy Framework) is a DNS record that lists servers allowed to send email for your domain.
Example:
v=spf1 include:_spf.google.com include:mailchimp.com ~all
Each include, a, mx, ptr or exists mechanism requires a DNS lookup. The limit is 10 lookups per SPF check.
Why the lookup limit matters
If SPF exceeds 10 lookups:
— SPF check fails;
— email may be rejected or marked as spam;
— authentication breaks;
— deliverability suffers.
This is common on domains that use many email services.
Reason 1: too many includes
The most common cause. Each include counts as a lookup. Nested includes also count.
What to check:
— how many includes are in SPF;
— are all needed;
— are there nested includes.
The fix: remove unused includes. Consolidate services where possible.
Use SPF checker to count lookups.
Reason 2: a and mx mechanisms
a and mx mechanisms count as lookups. They are often unnecessary.
What to check:
— are a or mx used;
— are they needed;
— can they be replaced with ip4 or ip6.
The fix: replace a and mx with explicit ip4 or ip6 where possible.
Reason 3: ptr mechanism
ptr is deprecated and counts as a lookup. It should be avoided.
What to check:
— is ptr used;
— can it be removed;
— are there alternatives.
The fix: remove ptr. Use ip4 or include instead.
Reason 4: nested includes
Includes can contain other includes, each counting toward the limit.
What to check:
— are there nested includes;
— how many lookups they add;
— can they be flattened.
The fix: flatten SPF by replacing includes with explicit IPs.
Reason 5: unused services
Old services may still be in SPF, adding lookups without being used.
What to check:
— which services are in SPF;
— are they still used;
— can they be removed.
The fix: remove unused services from SPF.
How to diagnose SPF lookup issues
A practical sequence:
— count lookups;
— check includes;
— check a, mx, ptr;
— check nested includes;
— check unused services;
— test after changes.
If SPF exceeds 10 lookups, flatten or remove mechanisms. For a broader audit, SEO audit can help verify SPF, DKIM and DMARC in one place.
How to fix SPF lookup issues
Fix steps:
— remove unused includes;
— replace a and mx with ip4/ip6;
— remove ptr;
— flatten nested includes;
— remove unused services;
— test after changes.
FAQ
Why does SPF have a lookup limit?
To prevent DNS abuse. The limit is 10 lookups per SPF check.
What happens if SPF exceeds 10 lookups?
SPF check fails, email may be rejected or marked as spam.
How do I count SPF lookups?
Use an SPF checker. It counts includes, a, mx, ptr and exists mechanisms.
What is SPF flattening?
Replacing includes with explicit IPs to reduce lookups.
Can I remove ptr?
Yes. ptr is deprecated and should be removed.
Does SPF affect SEO?
Indirectly. Email deliverability affects trust and communication, which can affect business.
How often should I check SPF?
After adding or removing email services, and periodically.
Can nested includes cause issues?
Yes. Each nested include counts toward the limit. Flatten if needed.
What if I cannot reduce lookups?
Use SPF flattening services or consolidate email providers.
Does SPF alone ensure deliverability?
No. DKIM and DMARC are also needed for best results.