EMAIL AUTHENTICATION

SPF record checker: validate your SPF and count DNS lookups

Enter a domain to read its SPF record, follow every include and see which senders are allowed, how many of the 10 permitted DNS lookups the record uses, and what to fix.

Domain name
The basics

What is an SPF record?

SPF (Sender Policy Framework) is a DNS TXT record that lists which servers are allowed to send email for your domain. When a message arrives claiming to be from [email protected], the receiving server looks up the SPF record for example.com and checks whether the sending server's IP address is on the list. A message that fails can be rejected or sent to spam, which makes SPF one of the main defences against people forging your domain.

This checker finds the record, follows every include: and redirect= it contains, and shows what each part allows and how many DNS lookups the whole record costs, because receivers stop at 10.

Reading a record

The parts of an SPF record

PartMeaningCounts as a DNS lookup?
v=spf1Marks the record as SPF version 1. It must come first.No
ip4:203.0.113.0/24 and ip6:Allows a specific IP address or range.No
include:_spf.example.netAlso allows whatever the other domain's SPF record allows. Used for email services.Yes
a and mxAllows the domain's own web server address (a) or its mail servers (mx).Yes
exists: and ptrAdvanced and rarely needed. ptr is deprecated and should be removed.Yes
redirect=example.comUses another domain's SPF record in place of this one.Yes
-all, ~all, ?allWhat to do with senders not listed. A minus fails them, a tilde marks them as suspicious (soft fail), and a question mark gives no opinion.No

A typical record looks like this: v=spf1 include:_spf.google.com ip4:203.0.113.10 ~all. It allows Google's mail servers and one fixed address, and marks everything else as suspicious.

The 10-lookup limit

Why too many lookups breaks SPF

The SPF standard (RFC 7208) allows at most 10 DNS lookups while a receiver evaluates one record. Each include, a, mx, ptr, exists and redirect counts, including the ones nested inside the records you include. When the total goes over 10, the receiver returns a permanent error and SPF stops protecting you, even though every part looks right.

The limit is easy to hit when a company uses several email services at once, because each service adds its own include, and each of those often includes more. To get back under it, remove services you no longer use, replace a and mx with fixed ip4: ranges where the addresses are stable, or ask which of your senders can use a subdomain with its own SPF record.

Troubleshooting

Common SPF mistakes

More than one SPF record

A domain may publish only one record starting with v=spf1. Two records make SPF fail. Merge them into one, with all the includes together.

Ending with +all or no all at all

+all allows anyone in the world to send as your domain, which defeats the point. A record with no all leaves unlisted senders without a policy. End with ~all, or -all once you are sure every sender is listed.

Typos and spaces

Terms are separated by single spaces. A typo such as include _spf.google.com (space instead of a colon) or a misspelt mechanism produces an invalid record.

Using ptr

The ptr mechanism is slow, unreliable and discouraged by the standard. Replace it with ip4 or ip6 ranges.

Forgetting a sender

Newsletter tools, billing systems and help desks often send as your domain. If one is missing from the record, its mail may land in spam. Check with the email header analyzer on a real message.

SPF without DMARC

SPF alone does not tell receivers what to do with failures. A DMARC record ties SPF and DKIM together and sets the policy. This page shows whether one is published.

FAQ

Frequently asked questions

What is an SPF checker?

It looks up your domain's SPF TXT record, follows its includes, counts the DNS lookups and points out problems such as multiple records, a missing all and the 10-lookup limit.

How do I check my SPF record?

Enter your domain above and press Check SPF. You will see the raw record, what each rule allows, the total number of DNS lookups and a list of issues, if any.

What does ~all mean in SPF?

It is a soft fail: mail from senders not listed in the record is accepted but marked as suspicious. -all is a hard fail, which tells receivers to reject it. Many domains start with ~all and move to -all once every legitimate sender is listed.

Why does my SPF record say too many DNS lookups?

Receivers allow only 10 lookups for one SPF evaluation, counting includes inside includes. Each email service you add costs at least one. Remove services you do not use, or replace a and mx rules with fixed IP ranges.

Can a domain have two SPF records?

No. Only one record that starts with v=spf1 is allowed per domain name. If you have two, combine them into one record.

Does SPF stop all email spoofing?

Not by itself. SPF checks the hidden envelope sender, not the From address people see. DKIM and DMARC close that gap, and together the three are what mailbox providers expect from a trusted domain.