SPF 10 DNS Lookup Limit (SPF Lookup Limit)

Security Glossary - Email Authentication

Definition: The SPF specification (RFC 7208) limits SPF record evaluation to a maximum of 10 DNS lookups. Mechanisms that trigger lookups include 'include', 'a', 'mx', 'redirect', and 'exists'. Exceeding this limit causes a PermError result, which many receivers treat as an SPF failure, potentially causing email delivery problems.

Why SPF Lookup Limit Matters

As organizations add more email services (marketing platforms, CRM systems, support desks, transactional email), their SPF record grows with more include mechanisms. Each include requires at least one DNS lookup, and the included records often contain their own includes, consuming lookups quickly. A domain using Google Workspace (2 lookups), SendGrid (1), Mailchimp (1), and Salesforce (3) is already at 7 lookups before any other services.

When the 10-lookup limit is exceeded, SPF returns PermError for all email from the domain. This is worse than having no SPF record at all because a PermError explicitly signals that the SPF configuration is broken, and many receivers will reject or quarantine the email.

Solutions include SPF flattening (resolving includes to IP addresses and listing them directly), using a dedicated SPF management service, removing unused includes for services you no longer use, and using subdomains for different services (each subdomain gets its own 10-lookup limit).

Testing Your Configuration

A DNS health checker counts the DNS lookups in your SPF record and warns when you approach or exceed the 10-lookup limit. It also identifies nested lookups within included records. Run this check whenever you add a new email service.

Check DNS Health

Frequently Asked Questions

How do I reduce my SPF lookup count?
Remove includes for services you no longer use. Flatten includes by replacing them with ip4/ip6 mechanisms (but you must maintain the IPs manually). Use subdomains for different services. Consider an SPF management service that automatically flattens and maintains your record.
Do ip4 and ip6 mechanisms count toward the limit?
No. The ip4 and ip6 mechanisms do not require DNS lookups and do not count toward the 10-lookup limit. Only mechanisms that require DNS resolution (include, a, mx, redirect, exists) count. This is why SPF flattening works.
Disclaimer: DomainOptic provides automated informational scans only. Results do not constitute professional security advice, compliance certification, or a guarantee of security. Always verify findings independently.