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
- 1Audit the redirect chain and remove the circular reference.
- 2Replace redirect= with include: where appropriate, or consolidate SPF records into a single authoritative record.
Code examples
Detect the loop
dig +short TXT example.com | grep v=spf1
dig +short TXT redirecttarget.com | grep v=spf1
# Trace until you find the circular referenceReferences
Detected automatically by VulnRadar. The check id is email-spf-redirect-loop, stable across every scan so you can filter or diff on it.
More email checks
- LowDMARC Forensic Report URI (ruf=) Missing
- MediumDMARC Aggregate Report URI (rua=) Missing
- MediumMTA-STS (SMTP Strict Transport Security)
- LowTLS-RPT Record Missing rua= Reporting URI
- HighSPF Exceeds 10 DNS Lookup Limit
- LowDMARC pct= Below 100
- MediumDMARC Policy Set to Monitor-Only (p=none)
- MediumMTA-STS Policy File Missing
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.