Skip to content

Email security

SPF checker

Look up a domain's SPF record, the list of servers allowed to send mail as it, and count the DNS lookups a receiver needs to evaluate it. A record that is missing, duplicated, malformed, open to every sender or over the lookup limit gives little or no protection against mail forged in your name.

Checked from Ironfang Security's scanner address with the same low-impact limits as a scan. Nothing you enter is kept.

What this checks

What the result means

SPF (RFC 7208) lets a domain list the servers allowed to send mail for it. A receiving server compares the address that connected with the record for the domain in the envelope sender (the Return-Path), not the From address people see. DMARC is what ties an SPF pass to the visible From.

The end of the record decides what happens to every server not listed. -all asks receivers to fail them and ~all to soft-fail them; both pass this check. ?all, or a record with no all, gives unlisted servers a neutral result, which protects nothing. +all authorises every server on the internet, so forged mail passes SPF.

Each include:, a, mx, ptr, exists: and redirect= costs a DNS lookup, including those inside included records, and past 10 receivers return a permanent error (permerror) instead of a result. A passing result means one valid record, ending in -all or ~all, within the limit. A count close to 10 is worth trimming before the next sending service is added.

How to fix common issues

No SPF record

Publish a TXT record starting v=spf1 that lists the services that send your mail and ends in -all or ~all, for example v=spf1 include:_spf.google.com -all.

More in the SPF check reference

More than one SPF record

Merge the records into a single v=spf1 TXT record.

More in the SPF check reference

SPF does not reject unlisted senders

End the record with -all (or ~all while testing) after listing your real sending services.

More in the SPF check reference

SPF needs too many DNS lookups

Remove unused includes, replace a/mx/ptr mechanisms with IP ranges where stable, or use your provider's flattened include.

More in the SPF check reference

SPF record has errors

Correct the record. Each term must be a valid mechanism (ip4:, ip6:, include:, a, mx, exists:) or modifier (redirect=, exp=).

More in the SPF check reference

Cyber Essentials and ISO 27001

Neither Cyber Essentials nor ISO 27001 names SPF. A correct SPF record is technical evidence for the broader controls they do require: secure configuration of internet-facing services, and protecting information sent by email (ISO/IEC 27001:2022 Annex A 5.14, information transfer, and 8.9, configuration management).

The organisation still has to establish who owns the record, how a new service that sends as the domain is approved and added, and how services that no longer send are removed. A record shows the setting at one moment, not the process that keeps it right.

Scope and limitations

Related guides

Questions

What is the SPF 10 DNS lookup limit?
Evaluating an SPF record may take at most 10 DNS lookups, counting include, a, mx, ptr, exists and redirect terms, including those inside included records. Past 10, receivers return a permanent error and the record gives no protection. Terms such as ip4, ip6 and all cost nothing.
Should an SPF record end in -all or ~all?
Either marks unlisted servers as not authorised. -all asks receivers to treat their mail as a fail; ~all asks for a soft fail, which receivers should not reject on alone but may treat with suspicion. Both pass this check; ?all and +all do not.
Can a domain have two SPF records?
No. RFC 7208 treats more than one v=spf1 record as a permanent error, so receivers ignore SPF for the domain. Merge them into one record.
Does an SPF record cover subdomains?
No. SPF is checked for the exact domain in the envelope sender, so each subdomain that sends mail needs its own record. DMARC is different: a subdomain without a DMARC record is covered by its organisational domain's record.

Related security tools