SPF record checker
Paste your domain to check its SPF record, follow every include and count DNS lookups against the limit of 10.
What this SPF check looks at
SPF (Sender Policy Framework) is a TXT record that lists the servers allowed to send email for your domain. When a message arrives, the receiving server looks up that list and checks whether the sending server is on it.
This checker reads your live record and follows every include: and redirect= to count DNS lookups, the way a receiving mail server does. It flags:
- Too many lookups. SPF allows 10 DNS lookups. Microsoft 365, a marketing platform, a CRM and a helpdesk tool can blow past that without anyone noticing. Past 10, SPF fails for everything.
- Two SPF records. You can only have one. Two records make SPF fail, and it happens a lot when a new service's setup guide says "add this TXT record".
- A weak ending.
+allor?allmeans SPF protects nothing. - Deprecated parts like
ptr.
The usual SPF record for Microsoft 365
If Microsoft 365 is the only thing sending mail for your domain, the record is simply:
Every extra service that sends as your domain (Mailchimp, Xero invoices, a website contact form, your phone system's voicemail-to-email) needs to be added too, usually as another include:. The SPF generator builds the record for you.
How to fix "too many DNS lookups"
- Remove services you no longer use. Old includes are the most common cause.
- Replace
aandmxwith the actual IP addresses (ip4:), since IPs don't count as lookups. - Move bulk senders (newsletters, invoicing) to a subdomain like
mail.yourdomain.comwith its own SPF record. - Avoid "SPF flattening" services unless someone will maintain them. Providers change their IPs and a flattened record quietly goes stale.
SPF on its own isn't enough
SPF only checks the hidden "envelope" sender, not the From address people actually see. To stop someone spoofing your From address you also need DKIM and a DMARC policy.
Common questions
Should I use -all or ~all?
With DMARC in place, ~all is the common choice: DMARC decides what happens to failing mail, and a soft fail avoids losing forwarded messages. Without DMARC, -all gives stronger protection.
Can I have two SPF records?
No. A domain must have exactly one TXT record starting with v=spf1. If you have two, merge them into one record.
Do ip4 and ip6 entries count towards the 10 lookup limit?
No. Only include, a, mx, ptr, exists and redirect cause DNS lookups. Plain IP ranges are free.
How long do SPF changes take to work?
Usually minutes, but it depends on the TTL on the record. Most DNS hosts use 1 hour or less.