Menu

Search tools and guides

DMARC & DKIMCheck DMARC and DKIM, generate records and keys
SPF Record CheckerValidate SPF and count lookups against the limit of 10
DNS Blacklist CheckerCheck IPs and mail servers against spam blocklists
Email Header AnalyserTrace hops, delays and SPF/DKIM/DMARC in raw headers
Email ValidatorSyntax, MX, SPF and DMARC verification
DNS LookupQuery A, AAAA, MX, TXT, NS and more
WHOIS LookupRegistration data over RDAP
Website StatusAvailability and response-time checks
Ports ReferenceWhat runs on each TCP and UDP port, and if it's safe
MAC Address LookupFind a MAC address vendor and check if it's random
Download Time CalculatorHow long a file takes at your broadband speed
QR Code GeneratorQR codes for Wi-Fi, links and text, as PNG or SVG
User Agent ParserWhat your browser says about itself, decoded
IP ConverterDecimal, hex, binary and IPv6 conversion
Subnet CalculatorCIDR ranges, masks and subnet splitting
CIDR AggregatorMerge IPs and ranges into the fewest CIDR blocks
SSL CheckerInspect certificates, chains and expiry
HTTP HeadersAudit security headers and redirect chains
Password GeneratorCryptographically secure random passwords
Hash GeneratorMD5, SHA-1, SHA-256, SHA-384 and SHA-512
JWT DecoderDecode JWT claims and verify HS256, RS256, ES256
Unix Timestamp ConverterConvert epoch seconds or ms to UTC and UK time
UUID GeneratorGenerate UUID v4, v7 and ULIDs; decode any UUID
Cron Expression ExplainerCron schedules in plain English, with next runs
Regex TesterTest JavaScript regex with live match highlighting
Chmod CalculatorUnix permissions as octal, symbols and commands
Colour Contrast CheckerWCAG contrast ratio for text and background colours
JSON FormatterPretty-print, minify and validate JSON
Base64 EncoderConvert to and from Base64, Unicode safe
URL EncoderPercent-encode and decode URL strings
HTML EntitiesEscape and unescape HTML special characters
Text Diff CheckerCompare two texts line by line, word by word
Word & Character CounterWords, characters, reading time and SMS segments
Case ConverterUPPER, lower, Title Case, camelCase and more
URL Slug GeneratorTurn titles into clean, SEO-friendly URL slugs
DNS records explained: A, AAAA, CNAME, MX, TXT, NS and the restWhat each common DNS record type does, the rules that trip people up – CNAMEs at the root, MX pointing at an IP – and how TTL and caching really work.
Mbps and MB/s: why downloads look slower than your broadband speedWhy a 100 Mbps line downloads at 12 MB/s, why a 1 TB drive shows 931 GB, what slows real transfers, and what a UK advertised average speed promises.
Setting up SPF, DKIM and DMARC for Microsoft 365Step by step for a domain on Microsoft 365, from the first SPF record to a DMARC policy of reject, avoiding the mistakes that cause bounces.
SPF "too many DNS lookups": why it happens and how to fix itWhat the ten-lookup limit in RFC 7208 counts, how to tally your own record, and the fixes that work without silently breaking mail.
How to read a DMARC aggregate reportA field-by-field tour of the XML that receivers send to your rua= address, and how to turn it into a list of senders to fix before you enforce.
What your IP address reveals – and what it does notHow IP geolocation really works, why it often puts you in the wrong town, what a website can and cannot learn from your address, and how UK law treats it.
Diagnosing a website that will not load: DNS, TLS and HTTP in orderA methodical checklist for working out whether an outage is DNS, the certificate, the server or just you – and what each kind of failure looks like.

Arrow keys move through results, Enter opens one, Escape closes.

SPF Record Checker

Validate a domain's SPF record, count its DNS lookups against the limit of 10, and see every include and IP range it authorises.

Enter the domain that sends the mail (the part after the @). Email addresses and URLs are trimmed to the domain. Press Enter to check.

Try:

What an SPF record does

Sender Policy Framework (SPF, RFC 7208) lets a domain publish, in a DNS TXT record, the list of servers allowed to send mail using that domain in the envelope sender – the hidden Return-Path address that bounces go back to. When a message arrives, the receiving server takes the IP address that connected to it, fetches the SPF record of the envelope domain and works through it from left to right until something matches. The first match decides the result: pass, fail, softfail or neutral.

A record looks like v=spf1 include:_spf.google.com ip4:192.0.2.0/24 -all. Each space-separated term is either a mechanism that can match the sending address, or a modifier such as redirect=. This checker fetches the record, parses every term, follows every include and redirect, and reports anything a receiver would object to.

The 10-lookup limit, explained

Evaluating SPF can make the receiving server perform further DNS queries, and an attacker could otherwise use that to turn every mail server into a DNS amplifier. RFC 7208 §4.6.4 therefore caps the work. The terms include, a, mx, ptr and exists, and the redirect modifier, each cost one lookup, and the total across the whole policy – including everything inside every include, however deeply nested – must not exceed 10. The terms ip4, ip6 and all cost nothing because they need no DNS.

There are two further limits. An mx term may lead to at most 10 mail-server hostnames, each of which must then be resolved to addresses. And no more than 2 lookups should be void – a name that does not exist, or exists with no records of the type asked for (the RFC recommends this limit rather than requiring it). Break any of these and a receiver enforcing them stops with a permerror. Under DMARC a permerror counts as an SPF failure, so mail that should pass silently loses one of its two routes to authentication.

The limit creeps up on people because every service you add (a CRM, a help desk, a newsletter platform) asks you to add its include, and each of those includes may contain several more. You only see the top layer in your own DNS.

Reading the include tree

  • Cost on each branch is the number of lookups that branch adds: one for the include or redirect itself, plus everything inside it.
  • Running total shows the count before and after the branch, in the order a receiver evaluates the record. The term that takes the total to 11 is marked, with the full path from your record down to it, so you can see which provider's include tipped you over.
  • Terms after all are greyed out: evaluation stops at all, so they are never reached and cost nothing – but they are almost always a mistake.
  • Includes that use macros (for example exists:%{i}._spf.example.com) depend on the message being checked. They are counted, but cannot be followed here.

The "all" mechanism

  • -all (fail) – anything not listed should be rejected. The strictest setting.
  • ~all (softfail) – anything not listed is suspicious. With DMARC at quarantine or reject this is a perfectly sound choice, and it is what Google, among others, publishes.
  • ?all (neutral) – says nothing at all about unlisted senders, so SPF provides no protection.
  • +all – authorises every IP address on the internet to send as your domain. Never correct.
  • No all and no redirect= – the default result is neutral, the same as ?all.

Other problems this checker flags

  • No SPF record, or more than one. Two records starting v=spf1 are a permerror; merge them into one.
  • Syntax errors such as ip4: with an invalid address, a prefix length out of range, redirect: written with a colon, or a misspelt mechanism. One error invalidates the whole record.
  • The deprecated ptr mechanism. It is slow and unreliable, RFC 7208 says not to use it, and some receivers skip it.
  • An include pointing at a domain without SPF, which is a permerror rather than a harmless no-op, and include loops.
  • Very wide ranges, such as an ip4 covering millions of addresses, which usually means someone authorised a whole provider network.

How to fix "too many DNS lookups"

  • Remove includes for services you no longer use. This alone is often enough.
  • Replace a and mx with the ip4/ip6 addresses they resolve to, if those addresses are stable.
  • Move bulk or marketing mail to a subdomain (such as news.example.co.uk) with its own SPF record and its own budget of 10.
  • Consider whether a service needs SPF at all. If it signs your mail with DKIM using your domain, DMARC can pass on DKIM alone, and its include is optional.
  • "Flattening" (replacing includes with the IP addresses they currently contain) works, but the provider's addresses change without notice, so only do it with a tool that refreshes the record automatically.

Limitations

This checker reads DNS through Cloudflare's public resolver, so it sees the records as cached there; a change you have just made may take up to the old TTL to appear. It can tell you whether a policy is valid and what it authorises, but not whether a particular message will pass: that depends on the IP address the message actually came from and on the envelope domain the sending service used, which is often the provider's own domain rather than yours. SPF also breaks when mail is forwarded, because the forwarding server is not in your record – one reason DKIM and DMARC matter as much as SPF. To check those, use the DMARC and DKIM checker.

Common questions

How many DNS lookups does SPF allow?

SPF allows a maximum of ten DNS lookups when a record is evaluated, a limit set by RFC 7208. The include, a, mx, ptr and exists mechanisms and the redirect modifier each count as one, including those nested inside includes, while ip4, ip6 and all cost nothing. Exceeding ten produces a permerror, which DMARC treats as an SPF failure.

What is the difference between ~all and -all in SPF?

The difference between ~all and -all in SPF is how firmly unlisted senders are treated. -all is a fail, saying mail from any server not listed should be rejected, while ~all is a softfail that marks such mail as suspicious. With a DMARC policy of quarantine or reject in place, ~all is a sound choice.

Can a domain have two SPF records?

A domain cannot have two SPF records. If two TXT records beginning v=spf1 are published at the same name, receivers return a permerror and SPF stops working for the domain's mail. The fix is to merge them into a single record that contains every mechanism from both, with one all term at the end.

Why does SPF fail when an email is forwarded?

SPF usually fails on forwarded email because the forwarding server's IP address is not listed in the original sender's SPF record. The receiver checks the address that connected to it, which is now the forwarder's. A DKIM signature normally survives forwarding, so the message can still pass DMARC through DKIM.

Accessibility

Adjust how the site looks and behaves. Your choices are saved in this browser only.

Colour theme
Text size
Accessibility statement