Email tools
SPF Record Checker
Check a domain’s SPF record, the servers it allows to send email, its policy for everyone else and whether it stays within the 10-lookup limit.
What is spf record checker?
SPF (Sender Policy Framework) is a TXT record that lists the servers allowed to send email for a domain. Receiving mail servers compare the sending server’s IP address with that list.
How to use this tool
- Enter the domain you want to check and review any options.
- Select Look up to submit your request.
- Read the result, inspect its source and copy or download the response if needed.
Understanding the results
- Policy for other senders
- What the record’s all term tells receivers to do with mail from servers it does not list.
- DNS lookups
- include, a, mx, ptr, exists and redirect each cost one lookup, including those inside included records. More than 10 makes SPF fail with a permanent error.
- Terms
- Each part of the record and what it matches.
- Warnings
- Problems that break SPF or weaken it.
Supported features and common uses
The checker reads the domain’s TXT records, finds the one that starts with v=spf1 and explains each term. It follows include and redirect terms to count DNS lookups against the limit of 10 set by RFC 7208. It does not send email or check DKIM.
Troubleshooting
Check the input format if validation fails. Public data may be missing or redacted, and upstream services can time out or rate limit requests. A failed lookup is not proof that a domain or website is unavailable.
What an SPF record looks like
An SPF record is a single line of text. It starts with v=spf1, lists the sources that may send mail for the domain and ends with a rule for everything else. Take v=spf1 include:_spf.example.net ip4:192.0.2.10 ~all. It allows the servers named in example.net’s record and one IP address, and marks all other senders as a soft fail.
Receivers read the terms from left to right and stop at the first one that matches the sending server.
The terms you can use
- ip4 and ip6: a single address or a block of addresses.
- a: the addresses in the domain’s own A and AAAA records.
- mx: the addresses of the domain’s mail servers.
- include: everything allowed by another domain’s SPF record. Mail services ask you to add one of these.
- exists: a match if a DNS name built from the message resolves. Rare outside specialist setups.
- ptr: a match based on reverse DNS. It is slow and the standard advises against using it.
- redirect: hands the whole decision to another domain’s record.
The 10-lookup limit in practice
Each include, a, mx, ptr, exists and redirect makes the receiver perform a DNS lookup, and the standard caps the total at 10. Lookups inside included records count as well. One provider’s include can use three or four on its own.
Domains reach the limit by adding services over the years: a mailbox provider, a newsletter tool, a helpdesk, an invoicing system. Each one seemed harmless, and together they tip the record over. From then on, SPF fails for every message. ip4, ip6 and all cost nothing.
A second limit is easier to miss. A receiver may stop after two lookups that return no records, called void lookups. An include that points to a domain that no longer exists counts as one.
How to fix a record that is over the limit
- Remove includes for services you no longer use.
- Replace a and mx with ip4 or ip6 entries when the addresses are stable.
- Move a sender to a subdomain. Newsletters sent from news.example.com use that subdomain’s SPF record, which has its own allowance of 10.
- Be careful with tools that flatten a record into a long list of IP addresses. Providers change their addresses, and a flattened record goes stale unless something keeps it updated.
SPF and forwarding
SPF checks the server that delivered the message. When a mailbox forwards mail to another address, the forwarding server delivers it, and that server is not in the original sender’s record. SPF fails even though the message is real. DKIM signatures survive forwarding, which is one reason to set up both.
SPF checks a hidden address
SPF is evaluated against the envelope sender, also called the Return-Path, which most people never see. It is not checked against the From address shown in the mail program. A message can pass SPF for one domain while displaying another. DMARC closes that gap by requiring the two to match.
Domains that send no mail
A domain that never sends email should still publish an SPF record. Use v=spf1 -all, which tells receivers that no server is allowed to send for it. Add a DMARC record with a reject policy alongside, and the domain becomes much harder to abuse in phishing.
A worked example
Take the record v=spf1 include:_spf.google.com include:servers.mcsv.net ip4:203.0.113.25 ~all. The checker lists four terms. The first two are includes for a mailbox provider and a newsletter service, the third is one IP address, perhaps a web server that sends order confirmations, and the last is a soft fail for everyone else.
The lookup count is the part to watch. Each include costs one lookup, and the records they point to contain further includes of their own. The checker follows them all and reports the total, which for a record like this is well under 10.
Terms used on this page
- Mechanism: a term that matches sending servers, such as ip4, a, mx or include.
- Qualifier: the symbol in front of a term. A plus sign means pass, a minus sign fail, a tilde soft fail and a question mark neutral.
- Envelope sender: the address used between mail servers, also called the Return-Path.
- Permanent error: the result when a record is broken, for example by too many lookups.
- Soft fail: a result that marks mail as suspicious without asking for rejection.
Learn more: SPF, DKIM and DMARC explained.
Frequently asked questions
Good questions. Clear answers.What does -all or ~all mean?
-all marks mail from servers the record does not list as a fail, which receivers may reject. ~all marks it as a soft fail, usually accepted but treated as suspicious. ?all is neutral, and +all lets every server pass, which defeats the purpose.
What happens if SPF needs more than 10 DNS lookups?
Receivers stop evaluating the record and return a permanent error, so SPF fails for all your mail. Remove includes you no longer use, or replace them with ip4 and ip6 ranges.
Can a domain have two SPF records?
No. Two records that start with v=spf1 cause a permanent error. Merge them into one record.
How do I create an SPF record?
List every service that sends mail as your domain and collect the include or IP address each one gives you. Combine them after v=spf1, end with ~all or -all, and publish the result as a TXT record on the domain.
Should I use ~all or -all?
If you also publish DMARC, ~all is the safer choice, because some receivers reject -all failures before they look at DKIM. Use -all for domains that send no mail.
Does SPF stop spoofing on its own?
No. SPF does not check the From address that people see. You need DMARC to tie the result to that address.
Where is the SPF record published?
As a TXT record on the domain used in the envelope sender, which is usually the main domain.
Do subdomains inherit the SPF record?
No. Each subdomain that sends mail needs its own SPF record. A subdomain without one has no SPF policy.
What is a void lookup?
A DNS lookup during SPF evaluation that returns no records or a nonexistent name. Receivers may stop with an error after two of them.
Why does my record appear as several quoted strings?
A single string in a TXT record can hold 255 characters at most. Longer records are split into several strings, and receivers join them back together before reading the record.
Does the order of terms in an SPF record matter?
Yes. Receivers evaluate terms from left to right and stop at the first match. The all term must come last, because nothing after it is read.
Is an SPF record required?
No standard forces a domain to publish one, but large mailbox providers expect it, and mail from domains without SPF is more likely to be treated as spam.
Can I test an SPF record before publishing it?
This checker reads the record that is live in DNS. Publish the new record with a short TTL, check it here and correct it quickly if something is wrong.