Skip to main content
HighEmail

How to fix: SPF Redirect Loop

The SPF record contains a redirect= modifier that creates a circular reference back to the original domain, causing infinite recursion and a permerror.

Why it matters

A redirect loop causes permerror on every SPF check, making all mail from your domain unauthenticated and subject to rejection by strict DMARC policies.

The SPF redirect= modifier replaces the current domain's SPF policy with another domain's policy. If that domain's SPF record redirects back to the original domain (directly or via a chain), SPF evaluators detect the loop and return permerror.

How to fix it

  1. 1Audit the redirect chain and remove the circular reference.
  2. 2Replace redirect= with include: where appropriate, or consolidate SPF records into a single authoritative record.

Code examples

Detect the loop

bash
dig +short TXT example.com | grep v=spf1
dig +short TXT redirecttarget.com | grep v=spf1
# Trace until you find the circular reference

References

Detected automatically by VulnRadar. The check id is email-spf-redirect-loop, stable across every scan so you can filter or diff on it.

See every email check

Questions

How severe is SPF Redirect Loop?
VulnRadar rates this high severity in the email category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
Does VulnRadar check for this automatically?
Yes. It runs as part of every scan under the check id email-spf-redirect-loop, which stays the same between runs so you can filter, diff, or gate CI on it.

Missing a check?

The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.

Propose a checkHow a check is built

Scan your own site for spf redirect loop

VulnRadar runs this check and hundreds more against a URL in seconds. No agent to install, just paste a URL.

Or scan this site as a demoRead the docs

How to fix: SPF Redirect Loop | VulnRadar