SPF record checker

This SPF record checker reads the record from your domain's DNS or checks a record you paste, and shows the errors and warnings, the number of DNS lookups the record needs, and an explanation of each mechanism in the record.

Checking the record runs in the browser and requires JavaScript. A fixed example is shown.

Check an existing record
Paste the TXT record value, with or without quotes. A record split into several quoted strings is joined into one record. The syntax of the record is checked.
Terms: 5. Errors: 0. Warnings: 0.
Findings
  • No syntax problems were found.

Characters in the record: 53. Mechanisms that need a DNS lookup: 2 of at most 10.

Record breakdown Next to each mechanism is the result returned when the sending server matches it. Mechanisms are checked in order, and the first match sets the result.
  1. v=spf1

    The record version. Every SPF record starts with v=spf1.

  2. mxPassed (pass) DNS lookup

    Matches the incoming mail servers of the domain itself, by its MX records.

  3. ip4:192.0.2.10Passed (pass)

    Matches the IPv4 address 192.0.2.10.

  4. include:_spf.google.comPassed (pass) DNS lookup

    Matches the servers allowed in the SPF record of _spf.google.com.

  5. -allFailed (fail)

    Matches any server that did not match an earlier mechanism in the record.

  • Enter a domain in the "Check from the domain" field and click "Read the record". The SPF record is read from DNS and checked right away.
  • To check a record before you publish it, paste it into the "SPF record to check" field, with or without quotes.
  • The "Findings" list shows errors, warnings, and notes, and below the list you can see the number of mechanisms that need a DNS lookup. The count covers only the mechanisms in the record itself: include, a, mx, ptr, exists, and redirect. Further lookups of nested includes are not counted, since the check reads only the record of the domain being checked and does not follow the include records.
  • When the record exceeds the maximum length of a TXT string, a split version is shown as well, which you can copy by clicking "Copy".
  • The "Record breakdown" section explains each mechanism and modifier, with the result the mechanism sets and a mark on each mechanism that needs a DNS lookup.
  • An SPF record alone does not protect the domain from spoofing: it checks only the sending server and the domain of the return address (Return-Path), not the sender address the recipient sees. Set up DKIM signing and a DMARC record as well. You can check the DMARC record with the DMARC record checker.

What the check finds

The check goes through every term in the record and classifies each finding by severity. An error points to a problem that keeps receiving servers from using the record, such as a record that does not start with v=spf1, two SPF records on the same domain, a term with invalid syntax, or a record over the lookup limit. A warning points to a record whose syntax is valid but that may not work as expected, such as a mechanism that comes after all and is therefore never checked, a record with neither all nor redirect, or the value +all, which allows any server to send mail for the domain. A note is shown when the length of the record may force the DNS response to switch to TCP.

Lookups of included records

When you check from the domain, only the SPF record of the domain you entered is read, not the records it pulls in with include or redirect. Each of those records adds its own lookups to the count, so a record that includes several mail providers may need more lookups than the number shown. When a warning about getting close to the limit appears, you can read the record of each included domain in the "Check from the domain" field and add the number of lookups shown for it to the number for the main record.

Messages that fail the SPF check

When messages from a particular service fail the SPF check, make sure in the "Record breakdown" section that the service is authorized by one of the mechanisms before all, either by including the domain the service publishes for this purpose or by listing the IP addresses of its servers. Messages from a service that no mechanism authorizes get the result set by all.

Common errors and warnings

  • spf1 mx -allThe record does not start with v=spf1, so receiving servers do not recognize it as an SPF record.
  • v=spf1 -all mxThe mx mechanism comes after all, so it is never checked, and messages from the servers it was meant to authorize get the result of all.
  • v=spf1 include:example.netThe record has neither all nor redirect, so the result for servers not in the record is neutral, and the record does not protect the domain from spoofing.
  • v=spf1 ip4:192.0.2.300 -allThe IPv4 address is invalid, since each of the four parts of an address is a number from 0 to 255. An invalid term makes the whole check fail (permerror).
  • v=spf1 include:example.net -all redirect=example.orgThe record has both all and redirect, and when all is present the redirect is never used.
  • v=spf1 mx mx -allThe mx mechanism appears twice, and each occurrence counts toward the lookup limit.
  • v=spf1 ptr -allThe standard advises against the ptr mechanism because it is slow and unreliable, so a warning is shown.
Did you know?

With our business email service, an SPF record and DKIM signing are set up automatically for your business domain, and they make the messages your business sends more trustworthy.

Business email

SPF record checker FAQ

Why does the check from the domain not find an SPF record?

The message "No matching record was found" appears when the name you entered has no TXT record that starts with v=spf1. The common causes are a record added at a DNS provider that does not actually manage the domain, or a record added under the wrong name, such as example.com.example.com, when the DNS control panel appends the domain name to the name you entered. In addition, the SPF record of a domain does not apply to its subdomains, so checking a subdomain finds a record only if the subdomain has a record of its own.

What should I do when the check from the domain finds two SPF records?

Merge the mechanisms of both records into one record that starts with v=spf1 and ends with a single all mechanism, and delete the other record. When two records are found, both are placed in the check field, and an error is shown because v=spf1 appears more than once. Before you publish, you can paste the merged record into the check field and make sure it has no errors.

How do I reduce the number of lookups when the record exceeds the limit?

You can reduce the number of lookups in three ways: remove the includes of services that no longer send mail for the domain, remove the ptr mechanism, and replace the a and mx mechanisms with the IP addresses of the same servers, using ip4 and ip6, which need no lookup. Addresses copied into the record are not updated when the mail provider changes its server addresses, so for mail providers it is better to keep the include the provider publishes.

Which record is checked when an external service sends mail for the domain?

The SPF check uses the record of the domain in the return address (Return-Path) of the message. Some email marketing services use a return address on a domain of their own, and in that case the record of the service's domain is checked, not the record of the domain in the sender address. You can find the return address in the headers of a received message with the "Email header analyzer" tool.

Why does the check from the domain show the previous record after an update?

DNS servers keep each record in their cache according to its TTL value, so the check from the domain may return the previous record until the TTL expires, usually within a few minutes to a few hours. You can see the TTL value of the TXT record with the "DNS record lookup" tool.

Shopping cart

Your cart is emptyYou can start with one of our popular plans.

Site search

Accessibility

Text size
100%
Accessibility statement