Skip to main content
MediumEmailOWASP A07:2021CWE-290

How to fix: SPF Record (Sender Policy Framework)

No SPF record was found at the domain apex. SPF is one of three email authentication mechanisms (SPF, DKIM, DMARC) that prevent unauthorized senders from sending mail as your domain.

Why it matters

Without SPF, any server on the Internet can send email appearing to come from your domain. Phishing, business email compromise (BEC), and spam campaigns regularly exploit domains without SPF.

SPF (RFC 7208) publishes an allowlist of servers authorized to send email from your domain as a TXT record at the apex. When a receiving server gets mail claiming to be from your domain, it checks whether the sending server's IP is in your SPF record. Without SPF, this check cannot be performed.

How to fix it

  1. 1Publish a TXT record at the apex: v=spf1 <mechanisms> -all
  2. 2Include all services that send mail on your behalf (Google, SendGrid, etc.).
  3. 3Stay under the 10 DNS lookup limit.
  4. 4Use -all (hard fail) once all legitimate senders are included.

Code examples

DNS TXT

DNS
example.com. IN TXT "v=spf1 include:_spf.google.com include:sendgrid.net ip4:203.0.113.10 -all"

References

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

See every email check

Questions

How severe is SPF Record (Sender Policy Framework)?
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 spf-record, which stays the same between runs so you can filter, diff, or gate CI on it.
Which standards does SPF Record (Sender Policy Framework) map to?
It maps to CWE-290. In the OWASP Top 10 it falls under A07: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.

Propose a checkHow a check is built

Scan your own site for spf record (sender policy framework)

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 Record (Sender Policy Framework) | VulnRadar