CONSOLE
Loading
Understand why RFC 7208 enforces a strict 10-lookup limit on SPF evaluations. Learn how to diagnose PermError and safely merge marketing, transactional, and CRM sending hosts.
Under RFC 7208, an SPF validation check is limited to a maximum of 10 DNS lookups across all include, a, mx, ptr, and exists mechanisms. If resolving your SPF record triggers an 11th lookup, receiving mail servers return a PermError (permanent authentication failure) and send your emails to spam. To fix it, flatten nested includes, remove legacy vendors, and replace hostname lookups with static ip4: and ip6: CIDR blocks.
The Sender Policy Framework (RFC 7208) was designed in the early 2000s. To prevent attackers from creating malicious SPF records that could trap receiving mail servers in infinite recursive DNS query loops or Denial-of-Service (DoS) amplification attacks, the IETF strictly limited the total number of DNS resolutions to 10 lookups per evaluation.
Modern companies often use Google Workspace, Zendesk, Salesforce, HubSpot, and transactional relays simultaneously. Each vendor's include: directive frequently triggers 2 to 4 nested lookups, quickly surpassing the 10-lookup ceiling.
| Mechanism | Counts Against 10 Limit? | Example Syntax | DNS Impact |
|---|---|---|---|
include: |
YES (Counts) | include:_spf.google.com |
1 lookup + all recursive nested includes |
a / a: |
YES (Counts) | a:mail.yourdomain.com |
1 DNS A/AAAA query |
mx / mx: |
YES (Counts) | mx |
1 DNS MX query + subsequent A queries |
ip4: |
NO (Free) | ip4:198.51.100.0/24 |
Zero DNS lookups (static IP check) |
ip6: |
NO (Free) | ip6:2001:db8::/32 |
Zero DNS lookups (static IPv6 check) |
all |
NO (Free) | ~all or -all |
Zero DNS lookups (terminating directive) |
When a mail server encounters an 11th DNS query, the email header displays:
Authentication-Results: mx.google.com;
spf=permerror (google.com: domain of sender@yourdomain.com uses excessive DNS queries) smtp.mailfrom=sender@yourdomain.com;
dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=QUARANTINE)
SPF Flattening is the process of resolving all nested include: domains into their underlying ip4: and ip6: CIDR blocks, replacing dynamic includes with static IP mechanisms:
a and mx: If you don't send emails directly from your web host or apex domain MX, remove a mx to immediately free 2 lookups.# Optimized Production SPF Record
v=spf1 include:_spf.google.com include:_spf.photonrelay.com ~all
Use Photon Console's Deliverability Checker to calculate your exact SPF lookup count, detect nested includes, and verify DMARC alignment.
Trademark Notice & Nominative Fair Use: All third-party trademarks, logos, and service marks (SendGrid®, Mailgun®, Amazon SES®, Postmark®, Resend®, Brevo®, SMTP2Go®, SparkPost®) are property of their respective owners and used under 15 U.S.C. § 1115(b)(4).
Photon Console is independent and not affiliated with or endorsed by these providers. Pricing and plan details compiled from public sources as of November 2026. Read full legal disclaimer →