Free online tool

SPF Record Checker

Look up a domain's SPF record to see each term in plain English, every include resolved and the DNS lookups counted against the limit of 10.

Check an SPF record

Enter a domain to see its SPF record explained term by term, every include resolved into a tree, the DNS lookups counted against the limit of 10 and the IP ranges it authorizes. You can also test a record before you publish it.

What to check

For example example.com, jane@example.com or https://example.com/contact.

To read DNS records, your browser sends the domain names this check looks up to Cloudflare's public DNS resolver. If Cloudflare does not answer, returns an error or cannot get an answer for a name (SERVFAIL or REFUSED), that name is also sent to Google Public DNS. Each resolver you contact sees your connection’s IP address. Between visits, only your choice between Published record and Draft record is remembered in this browser.

The checker follows RFC 7208. Lookup counts assume no term matches, which is the worst case a receiver can meet. Results reflect what the public resolvers return right now, so a record you just changed can take up to its TTL to appear.

Every include, resolved

Each include and redirect is looked up and drawn as a tree with its record and the DNS lookups it costs, so you can see which service brings you close to the limit of 10 and where the 11th lookup falls.

Each term in plain English

The record is colored by result and every term is explained, from ip4 ranges and dual prefix lengths to macros such as %{ir}. Syntax errors name the exact term, and senders such as Google Workspace or SendGrid are labeled.

Test a sending IP

Run the full RFC 7208 evaluation for an IPv4 or IPv6 address and an optional sender to get the result a receiver would see, the term that decided it and every step on the way.

How to check an SPF record

  1. 1

    Enter a domain, an email address or a website address, or choose Draft record and paste a record you plan to publish.

  2. 2

    Select Check SPF. The checker reads the TXT records through DNS over HTTPS and follows every include and redirect.

  3. 3

    Read the verdict, the lookup counts and the findings, and open the include tree to see what each branch costs.

  4. 4

    Test a sending IP to see the result a receiver would get, then copy or download the report.

What people use this tool for

  • Find out why mail from your domain fails SPF with a permerror or too many DNS lookups.
  • Confirm that a new email service's include is in place before you start sending through it.
  • Check a merged SPF record, including its length and string split, before you publish it.
  • List every IP range a domain authorizes, for an allowlist or a security review.

Frequently Asked Questions

What does this SPF record checker test?

It reads the domain's TXT records, finds the one that starts with v=spf1 and checks it against RFC 7208. Each term is parsed and explained, every include: and redirect= is looked up and shown as a tree, and DNS lookups and void lookups are counted across the whole tree. It flags multiple records, syntax errors, +all, ?all, a missing all, ptr, ip4 ranges of /8 or wider, includes without an SPF record and TXT answers over 512 bytes, and names the senders it recognizes, such as Google Workspace, Microsoft 365 or Amazon SES.

How are SPF DNS lookups counted?

RFC 7208 allows 10 terms that need a DNS query in one check: include, a, mx, ptr, exists and redirect, including those inside every nested include. ip4, ip6 and all cost nothing. An include whose record contains two more includes costs 3. The checker counts as if no term matched, which is the most a receiver can need, and shows the cost of each branch. A receiver that reaches an 11th lookup returns permerror. Lookups that find nothing, such as a:host for a name with no addresses, are void lookups, and a 3rd one is also a permerror.

What is the difference between -all, ~all, ?all and +all?

They set the result for mail from servers the record does not list. -all is a fail, so receivers are asked to reject the mail. ~all is a soft fail: the mail is usually accepted but marked as suspicious, and DMARC counts it as an SPF failure. ?all is neutral, the same as having no policy, and a record with no all and no redirect behaves the same way. +all passes every server on the internet, so the checker reports it as an error. An include whose own record ends in +all has the same effect.

Why does my SPF record give a permerror?

The most common causes are two TXT records starting with v=spf1 on one domain, more than 10 DNS lookups, and an include: of a domain that has no SPF record. Others are a syntax error such as ip4:192.0.2.0/33 or inlcude:, a 3rd void lookup, redirect= or exp= written twice, an mx term whose domain has more than 10 MX hosts, and an include loop. The checker names the exact term or domain behind each one. What a receiver does with a permerror is its own choice, but DMARC never counts it as a pass.

How can I reduce the number of SPF lookups?

Open the include tree to see what each branch costs. Remove includes for services you no longer use, and replace a and mx terms with ip4: and ip6: ranges when the addresses rarely change. Senders such as a newsletter service can move to a subdomain, which has its own record and its own 10 lookups. Copying a provider's addresses into your record, called flattening, saves lookups but breaks when the provider changes them, and Microsoft advises against it for Microsoft 365.

Can I check an SPF record before I publish it?

Yes. Choose Draft record, enter the domain it is for and paste the record, with or without quotes. Syntax errors show as you type, without any lookups. When you check it, the draft takes the place of the domain's published TXT records and its includes are looked up. A record longer than 255 characters has to be stored as several strings, which receivers join without spaces, and the checker shows a split that works.

How do I test whether an IP address is allowed to send email for a domain?

After a check, enter the server's IP address under Test a sending IP, and optionally the sender address and HELO name. The checker runs the check_host() evaluation from RFC 7208, expanding macros such as %{i} and %{l}, and returns pass, fail, softfail, neutral, none, permerror or temperror with the term that decided it and every step taken. IPv6 addresses work too, and an IPv4-mapped address such as ::ffff:192.0.2.10 is tested as 192.0.2.10.

Is the domain I check sent anywhere or stored?

To read DNS records, your browser asks Cloudflare's public resolver for each name the check needs. If Cloudflare does not answer, returns an error or cannot get an answer for a name (SERVFAIL or REFUSED), that name is also sent to Google Public DNS. As with any website, the resolvers also see your IP address. Testing an IP can look up its reverse DNS name, such as 10.2.0.192.in-addr.arpa, and names built from the IP or the sender address when the record's macros use them. Nothing else is sent, and only your choice of published or draft mode is remembered, in this browser's local storage under zutilium:spf-record-checker.