How to fix: Multiple SPF records published
The domain publishes more than one TXT record beginning with v=spf1, which RFC 7208 forbids. Exactly one is allowed, and a domain with two or more is a permanent error.
Why it matters
A receiver that finds two SPF records does not merge them or pick one: it returns permerror and abandons SPF evaluation entirely. The domain is left with no working sender policy, so mail from any source clears the SPF stage, and DMARC alignment has only DKIM left to fall back on. A second SPF record is worse than having none, because it looks configured.
This almost always happens when a second service is onboarded and its setup guide says to add a TXT record: the record is added alongside the existing one rather than merged into it. The fix is a single record containing every include, which is also the point at which the ten-lookup limit starts to matter, so merging is a good moment to count the DNS-querying mechanisms.
How to fix it
- 1Merge every mechanism into one v=spf1 TXT record at the apex and delete the others.
- 2Count DNS-querying mechanisms while merging: include, a, mx, ptr, exists and redirect each cost one against a limit of ten.
- 3Re-check with a validator after merging, since exceeding the lookup limit produces the same permerror you were fixing.
Code examples
One merged record
example.com. IN TXT "v=spf1 include:_spf.google.com include:sendgrid.net ~all"Find the duplicates
dig +short TXT example.com | grep -c 'v=spf1'References
Detected automatically by VulnRadar. The check id is email-spf-multiple-records, 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
- HighSPF Redirect Loop
- LowDMARC pct= Below 100
- MediumDMARC Policy Set to Monitor-Only (p=none)
Questions
- How severe is Multiple SPF records published?
- VulnRadar rates this medium 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-multiple-records, which stays the same between runs so you can filter, diff, or gate CI on it.
- Which standards does Multiple SPF records published map to?
- It maps to CWE-16. In the OWASP Top 10 it falls under A05:2021.
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.