Skip to content
FunnelGuard

Fix guide by FunnelsGuard

SPF too many lookups or multiple SPF records: how to fix

OPS-041Medium impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

SPF (Sender Policy Framework) is a DNS TXT record listing which servers may send email for your domain. Receiving mail servers read it and check the sending server against it.

Two rules cause most breakage. First, evaluating an SPF record may trigger at most 10 DNS lookups. Mechanisms such as include:, a, mx, ptr, exists: and the redirect= modifier each count, and so do the lookups nested inside included records. Second, a domain must have exactly one record starting with v=spf1. If a receiver finds two, or needs an eleventh lookup, the result is a permerror (permanent error), and SPF is treated as failed.

Why it costs you leads or sales

Email is part of your funnel. Form notifications to your sales inbox, auto-replies to new leads, order confirmations and nurture emails all depend on passing authentication. With an SPF permerror, mailbox providers are more likely to junk or reject those messages, especially when DKIM or DMARC are also weak. Nobody sees an error on the website, so leads simply seem to go quiet.

How a broken SPF record hides a lead
  1. Visitor submits formForm works and shows a thank-you page
  2. Website sends emailNotification or auto-reply leaves your server
  3. Receiver checks SPFMore than 10 lookups or two records: permerror
  4. Message in spam or rejectedSales team never sees the notification
  5. Lead goes coldNo follow-up within the hour

The form works and the lead submits, but the email step fails silently.

How to check if your site has it

Check your SPF record
  1. List your TXT records

    Run the command below, or use a DNS lookup tool. Count how many results start with v=spf1. More than one is a problem.

  2. Count the lookups

    Paste your domain into an SPF checker such as the one from MxToolbox, dmarcian or Kitterman's SPF validator. It expands every include and reports the total lookup count and any permerror.

  3. Check every sending service

    List each tool that sends mail from your domain: mailbox provider, newsletter tool, CRM, helpdesk, website form plugin, transactional service. Note which ones are in the record.

  4. Look at message headers

    Open a test email in Gmail, choose Show original, and look for spf=permerror in the Authentication-Results header.

List SPF records for a domainbash
dig +short TXT example.com | grep -i "v=spf1"

How to fix it

The fix has two parts: merge into one record, then reduce the lookups. Edit the record where your DNS is hosted (your registrar, Cloudflare, or your hosting provider), not in the website builder.

Merge and shrink your SPF record
  1. Copy every existing SPF record

    Save the full text of each v=spf1 record before you change anything.

  2. Merge into one record

    Combine all include: entries into a single TXT record with one v=spf1 at the start and one all mechanism at the end. Delete the extra records.

  3. Remove services you no longer use

    Old newsletter tools and trials are the most common cause of excess lookups. Remove their includes.

  4. Replace a, mx and ptr where possible

    Use ip4: and ip6: entries for servers you control. These do not count as lookups. Avoid ptr entirely.

  5. Move some senders to a subdomain

    Send marketing mail from a subdomain such as mail.example.com with its own SPF record. Each domain gets its own 10-lookup budget. Set the From address and the vendor's domain setup to match.

  6. Flatten only if you must

    Flattening replaces includes with raw IP addresses. It works, but vendors change their IPs, so a static flattened record can go stale. Use a flattening service that updates automatically, or review it regularly.

  7. Publish and re-test

    Save the record, wait for the TTL, then re-run the SPF checker until it shows one record and 10 or fewer lookups.

Example: two records merged into onetext
Before (two TXT records, invalid):
v=spf1 include:_spf.google.com ~all
v=spf1 include:sendgrid.net ~all

After (one TXT record):
v=spf1 include:_spf.google.com include:sendgrid.net ~all
Where to edit the record
  1. Edit DNS at your DNS host

    WordPress does not hold DNS. Edit the TXT record at your registrar, Cloudflare or host.

  2. Check SMTP plugins

    If you use an SMTP plugin such as WP Mail SMTP, make sure its provider's include is in the single SPF record.

SPF record before and after

Broken

  • Two TXT records starting with v=spf1
  • 12 DNS lookups after expanding includes
  • Receivers return permerror

Fixed

  • One merged v=spf1 record
  • 8 lookups after removing unused services
  • SPF passes for each legitimate sender

How to confirm it's fixed

Confirmation checklist
  • dig shows exactly one record starting with v=spf1
  • An SPF checker reports 10 or fewer lookups and no permerror
  • A test email from each sending tool shows spf=pass in Show original
  • Form notifications reach the inbox, not spam
  • The record ends with one all mechanism, such as ~all

How to prevent it happening again

Prevention habits
  • Before adding a vendor, edit the existing SPF record rather than creating a new one
  • Keep a list of every service that sends as your domain and who owns it
  • Remove includes when you cancel a tool
  • Use subdomains for bulk or marketing senders
  • Re-run an SPF checker every quarter and after any new email tool
  • Pair SPF with DKIM so mail still passes if SPF breaks
Lookups grow with each toolExample numbers
Lookups grow with each tool (example)Mailbox provider: 3 lookups; + Newsletter tool: 5 lookups; + CRM: 8 lookups; + Helpdesk: 11 lookups04835811Mailbox provider+ Newsletter tool+ CRM+ Helpdesklookups

Example: illustrative lookup counts as tools are added. The limit is 10.

How FunnelGuard handles this

FunnelGuard does not check SPF records today. Checking for too many lookups or duplicate SPF records is a possible future check, not a current feature.

What FunnelGuard does cover nearby: a robot visitor runs your real lead forms on a schedule and checks that test leads reach the inbox and CRM. If a test lead never arrives, you get one alert with a screenshot and a likely cause after a second-region re-check. That can show the symptom of an email problem, but it will not tell you SPF is the reason.

Questions people ask

What is the SPF 10 DNS lookup limit?

SPF allows at most 10 DNS lookups when a receiver evaluates your record. Mechanisms like include, a, mx, exists and redirect count, including those nested inside included records. Going over returns a permerror and SPF fails.

Can I have two SPF records on one domain?

No. A domain must publish only one TXT record starting with v=spf1. If receivers find two, they return a permerror. Merge them by combining all include and ip4 entries into one record.

Why is my SPF record failing with permerror?

The usual causes are more than 10 DNS lookups, two SPF records on the same domain, or a syntax error. Run your domain through an SPF checker to see which one applies.

How do I reduce the number of SPF lookups?

Remove includes for tools you no longer use, replace a and mx with ip4 entries, and move marketing senders to a subdomain with its own SPF record. Flattening to IP addresses also works but needs regular updating.

Do ip4 and ip6 entries count as DNS lookups?

No. The ip4 and ip6 mechanisms do not require a DNS lookup, so they do not count toward the limit of 10. The all mechanism does not count either.

Will too many SPF lookups send my form emails to spam?

It can. An SPF permerror counts as a failure, so receivers may junk or reject the message, especially if DKIM and DMARC are also missing or misaligned. Results vary by mailbox provider.

Does FunnelGuard check my SPF record?

No. FunnelGuard does not check SPF yet. It can run your lead form on a schedule and tell you if the test lead never reaches the inbox or CRM, but it does not diagnose SPF.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: site safety (Stage 26, daily): several SPF records or more than 10 lookups.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.