Skip to content

Home Topics Email Authentication SPF

Email Authentication · SPF

SPF records not working? Troubleshooting guide

Short answer

When SPF records fails, check in this order: the DNS or platform configuration is published and resolves; the sending system is actually using it; the domain in headers aligns with what you published; and the receiver's verdict in Authentication-Results or bounce messages.

Symptoms#

  • Messages landing in spam despite previously good placement
  • Bounces mentioning policy, authentication, or reputation
  • Provider dashboards showing a drop in reputation or authentication pass rate

Diagnosis steps#

  1. Confirm the configuration is live: query DNS from an external resolver and check the sending platform's settings page.
  2. Send to a seed mailbox and read the full headers, especially Authentication-Results.
  3. Compare the domains in From, Return-Path, and DKIM d= for alignment.
  4. Check provider dashboards (Google Postmaster Tools, Microsoft SNDS) for reputation and error rates.
  5. Review recent changes: new vendors, DNS edits, list imports, volume spikes.

Likely causes#

  • Exceeding the 10-lookup limit, which causes a permerror and effectively disables SPF.
  • Publishing two SPF records on one domain; receivers treat this as a permanent failure.
  • Forgetting that SPF checks the Return-Path (envelope sender), not the visible From address, so forwarded mail often fails.
  • Using +all or leaving ?all in production, which authorizes everyone.

Fix and re-verify#

  1. Inventory every service that sends mail as your domain: your ESP, CRM, helpdesk, billing system, and internal mail server.
  2. Collect each vendor's SPF include mechanism (for example include:_spf.google.com) from their documentation.
  3. Publish one TXT record at the root of the domain starting with v=spf1, listing each include, then ending with ~all (softfail) while testing.
  4. Verify with a lookup tool that the record resolves and stays under 10 DNS lookups and 255 characters per string.
  5. Move to -all once DMARC reports confirm all legitimate sources pass.

Frequently asked questions#

Does SPF alone stop spoofing?

No. SPF validates the envelope sender, which spoofers can set to their own domain while forging the visible From. DMARC closes that gap by requiring alignment.

What does ~all versus -all mean?

~all is softfail: receivers mark but usually accept. -all is hardfail: receivers may reject. Start with ~all, graduate to -all once DMARC data is clean.

How do I fix 'too many DNS lookups'?

Remove unused includes, replace includes with ip4/ip6 mechanisms where vendors publish static ranges, or use an SPF flattening service.

Analyse your own setup

All analysers
Technical analysis

SPF record analyser

Parse an SPF record, count its DNS lookups, and find what will break it.

Runs in your browser
Technical analysis

DMARC record analyser

Grade a DMARC record on enforcement, not just syntax.

Runs in your browser
Technical analysis

Email header analyser

Read authentication, DMARC alignment, and hop-by-hop delays from raw headers.

Runs in your browser

Keep reading on SPF