How to Fix SPF PermError: Too Many DNS Lookups

Website layout sketches and a tablet arranged on a desk with teal and orange design swatches
Language: English | Español

To fix an SPF PermError caused by too many DNS lookups, identify every legitimate email sender, remove obsolete or duplicate SPF mechanisms, and reduce the total lookup-producing terms—including nested entries—to no more than 10. Do not publish a replacement record until you know which systems send forms, invoices, campaigns and employee email.

Confirm that the problem is really SPF PermError

Start with a failed message rather than an online score alone. Open the complete message headers or delivery report and look for spf=permerror, “too many lookups” or a similar permanent-error explanation. Record the sending platform, sending IP and envelope sender or Return-Path domain.

SPF evaluates the technical MAIL FROM domain, which may differ from the address customers see in the From field. Testing the wrong domain can lead to an unnecessary DNS change.

  • Send separate tests from employee mail, WordPress forms, the CRM, accounting software and campaign platforms.
  • Query the affected domain’s TXT records and locate every value beginning with v=spf1.
  • Confirm that the same domain does not publish multiple SPF records.
  • Save the current DNS value and TTL before editing anything.

Understand what consumes the lookup allowance

RFC 7208 requires SPF evaluators to limit lookup-producing terms to 10. The include, a, mx, ptr and exists mechanisms and the redirect modifier consume lookups. Nested records count toward the same limit. Direct ip4, ip6 and all terms do not.

This means an SPF record with only four visible include entries may still exceed the limit when those providers reference additional records. Google’s SPF troubleshooting guidance recommends checking nested lookups and removing inactive senders.

Use this implementation sequence

1. Build a sender inventory

List every service authorized to send for the domain: Google Workspace or Microsoft 365, website SMTP, marketing software, appointment systems, help desks, payroll, billing and monitoring tools. Confirm each one with an owner and a recent test.

2. Merge duplicate SPF records

A domain must not publish two competing SPF policies. Combine required sources into one syntactically valid record using each provider’s current instructions. Do not simply paste two complete records together, because each contains its own version marker and ending policy.

3. Remove stale and redundant mechanisms

Delete entries only after confirming that the associated service no longer sends. Check whether two entries authorize the same infrastructure, and avoid broad a or mx mechanisms unless they are genuinely necessary.

4. Separate sending streams when appropriate

Marketing or transactional platforms can sometimes use a dedicated subdomain with its own SPF policy. This works only when the provider supports a custom envelope-sender domain and the resulting SPF or DKIM identity aligns correctly for DMARC. Changing only the visible From address does not solve the lookup problem.

5. Treat SPF flattening cautiously

Flattening replaces provider references with IP addresses. Microsoft’s SPF documentation warns against flattening cloud services whose infrastructure changes frequently. Use it only for stable, documented ranges with an assigned maintenance process.

Common mistakes

  • Counting visible includes but ignoring their nested lookups.
  • Adding another SPF record instead of editing the existing one.
  • Removing a sender before testing forms, billing and automations.
  • Flattening dynamic provider addresses without ongoing monitoring.
  • Testing employee email while overlooking the website or CRM.
  • Assuming an SPF repair guarantees inbox placement.

What to verify after publishing

After the DNS change has propagated, send a labeled test from every active platform. Confirm that the business receives website leads and that recipients see the expected SPF, DKIM and DMARC results. Review bounce messages and DMARC aggregate reports for sources that were missed.

An SPF pass alone does not guarantee delivery. Reputation, complaint levels, message content, DKIM, DMARC alignment and recipient policies still matter.

If several vendors and automations share your domain, CyberTek Group can review the sending inventory, DNS policy and validation process through an IT and cybersecurity project. Find additional operational checklists in the CyberTek Group resource center.

Related ArticlesArtículos relacionados