SPF record checker
Look up the SPF record of a domain, see every mechanism explained, and count DNS lookups against the limit of 10, includes followed. Finds +all, ptr and more.
The domain after the @ of the sending address.
This tool asks Google Public DNS (DNS over HTTPS) directly from your browser. It sends the domain name you enter, and the domains its SPF record includes, and nothing is sent to HardenKit.
How to use the SPF record checker
- Enter the domain that appears after the @ in your sending address.
- Press Check SPF. The tool asks Google Public DNS for the TXT records.
- Read the findings, then the record term by term.
- Check the lookup table to see which include costs the most.
About this tool
Sender Policy Framework (SPF) is a DNS record that lists the servers allowed to send mail for a domain. A receiving server looks it up for the domain in the envelope sender and checks whether the connecting IP address is on the list. The record is a single TXT record that starts with v=spf1 and usually ends with an all mechanism that says what to do with everyone else.
The record looks simple and breaks in ways that are hard to see. Receivers stop after 10 DNS lookups, and every include, a, mx, ptr, exists and redirect counts, including the ones inside the records you include. Go over the limit and the result is a permanent error, as if the record were broken. Two SPF records on one domain give the same error. This checker follows the includes and adds the lookups up for you.
It also reads the ending. -all fails unlisted senders and ~all soft-fails them; both are fine with DMARC in place. ?all and a missing all protect nothing, and +all authorizes the whole internet. The findings are a set of rules, not a delivery test: SPF only covers the envelope sender, which is why a domain also needs DKIM and DMARC.
Sources
Questions
RFC 7208 lets a receiver make at most 10 DNS queries while evaluating a record. The mechanisms include, a, mx, ptr and exists and the redirect modifier each count as one, and so do those inside included records. ip4, ip6 and all cost nothing. Over the limit, SPF returns a permanent error.
-all means mail from an unlisted server fails SPF; ~all means it soft-fails, which receivers treat as suspicious rather than forged. With a DMARC policy both lead to the same outcome, because DMARC counts only a pass. ~all is the safer choice while you are still finding all your senders.
No. More than one TXT record starting with v=spf1 makes receivers return a permanent error. When you add a mail service, merge its include into the existing record instead of publishing a second one.
Remove includes for services that no longer send your mail, which is the usual cause. Replace a and mx with the ip4 and ip6 addresses they resolve to. Move a service to a subdomain with its own record if it sends from its own address.