Run a full scan — every category, one report
SPF Syntax Validator
Perform a detailed syntax and integrity check on your SPF records.
Evidence
ASSESSED
- Checked against
- SPF TXT record with include/redirect expansion and the 10-lookup limit · RFC 7208
RED TEAM
0
findings
BLUE TEAM
control did not hold
Why validate SPF?
SPF (Sender Policy Framework) is prone to syntax errors and infrastructure limits. Validating your record ensures:
- Lookup Limit: Records exceeding 10 DNS lookups will result in a
PermErrorand fail SPF checks. - Syntax Integrity: Invalid mechanisms or typos can cause your entire record to be ignored by receiving mail servers.
- Best Practices: Identifies overly permissive configurations like
+allwhich increase spoofing risk.
Our SPF Record Validator goes beyond retrieving your record. It recursively expands every include, redirect and a/mx mechanism, counts the DNS lookups against the hard limit of ten, and reports every syntax error that would cause receivers to discard your SPF policy.
What is SPF Validation?
SPF (Sender Policy Framework) declares which servers may send mail for your domain. Publishing a record is straightforward; publishing a record that actually works is harder, because SPF has strict limits that fail silently.
The most important is the ten DNS lookup limit defined in RFC 7208. Every include, a, mx, ptr, exists and redirect mechanism costs a lookup, and includes nest — a single include pointing at a provider may itself consume four or five. Exceed ten and receivers return permerror, at which point your SPF policy is treated as though it does not exist.
Validation means evaluating the record the way a receiving server would: expanding the whole tree, counting the lookups, and checking every mechanism and qualifier for syntax that parsers will reject.
The most important is the ten DNS lookup limit defined in RFC 7208. Every include, a, mx, ptr, exists and redirect mechanism costs a lookup, and includes nest — a single include pointing at a provider may itself consume four or five. Exceed ten and receivers return permerror, at which point your SPF policy is treated as though it does not exist.
Validation means evaluating the record the way a receiving server would: expanding the whole tree, counting the lookups, and checking every mechanism and qualifier for syntax that parsers will reject.
- Recursively expands includes to count real DNS lookups
- The RFC 7208 limit is ten lookups; exceeding it voids the record
- A permerror means receivers ignore SPF entirely
- Also enforces the separate limit of two void lookups
- Catches syntax errors that silently disable the policy
Why SPF Validation Matters
An over-limit SPF record is worse than no record at all, because it looks correct in every control panel while providing zero protection. Nothing warns you. Mail keeps flowing, because most receivers deliver on permerror rather than reject, and the failure only becomes visible when DMARC enforcement starts rejecting legitimate mail.
The limit is easy to breach without noticing. Adding one more marketing platform to an SPF record that already includes a mail provider, a CRM and a helpdesk is often the change that pushes a working record over the edge.
The limit is easy to breach without noticing. Adding one more marketing platform to an SPF record that already includes a mail provider, a CRM and a helpdesk is often the change that pushes a working record over the edge.
- Exceeding ten lookups causes permerror and disables SPF completely
- The failure is silent — no bounce, no warning, no log entry
- Breaks the SPF half of DMARC alignment, weakening enforcement
- Adding one routine sender is frequently what crosses the limit
- Multiple SPF records on one domain invalidate each other
How This SPF Validator Works
The tool evaluates your record exactly as a receiving mail server would, following every reference to its conclusion.
- Validates the domain input against format and SSRF safety checks
- Retrieves the SPF TXT record and confirms only one exists
- Recursively resolves every include, redirect, a and mx mechanism
- Counts the total DNS lookups against the limit of ten
- Reports syntax errors, deprecated mechanisms and the final qualifier
How to Use the SPF Validator
- Enter your domain name in the input field
- Run the validation to expand the full mechanism tree
- Check the DNS lookup count first — it must be ten or fewer
- Review each expanded include to see which senders are authorised
- Confirm the record ends in ~all or -all, not +all
Understanding Your SPF Validation Results
Validation reports the lookup count, the expanded tree and the policy qualifier. Here is what each means:
| Field / Value | Meaning |
|---|---|
Lookup count |
Total DNS queries required to evaluate the record. Ten is the hard limit. Anything above it produces a permerror at receiving servers and SPF is ignored. |
include: |
Delegates to another domain SPF record. Costs one lookup, plus every lookup inside the included record. This nesting is where most limit breaches originate. |
ip4: / ip6: |
Authorises an address or CIDR range directly. These cost no DNS lookups at all, which makes them the primary tool for reducing an over-limit record. |
a / mx |
Authorises the addresses in the domain A or MX records. Each costs one lookup. Often removable if the addresses are already covered by an ip4 entry. |
~all |
Softfail. Mail from unlisted servers is accepted but marked suspicious. The right choice while you are still identifying legitimate senders. |
-all |
Hardfail. Mail from unlisted servers should be rejected. The correct end state once you are confident every sender is listed. |
+all |
Authorises every server on the internet to send as your domain. Effectively a misconfiguration, and it should be removed immediately. |
ptr |
Deprecated by RFC 7208. It is slow, unreliable and many receivers ignore it. Remove it and replace with ip4 or ip6 entries. |
Common Problems & How to Fix Them
Best Practices
- Keep the DNS lookup count well below ten to leave room for future senders
- Prefer ip4 and ip6 mechanisms over includes where the ranges are stable
- Maintain exactly one SPF record per domain
- Start with ~all and move to -all once every legitimate sender is confirmed
- Audit the record whenever you add or remove an email vendor
- Remove includes for services you have stopped using
- Publish a restrictive SPF record on domains that send no mail at all
Security Recommendations
- Never use +all, which authorises the entire internet to send as your domain
- Treat permerror as a security failure, since an invalid record leaves you with no SPF protection whatsoever
- Audit every include, because you are trusting that provider to authorise senders responsibly on your behalf
- Publish v=spf1 -all on parked and non-sending domains to prevent them being used for spoofing
- Pair SPF with DKIM, since SPF alone breaks on forwarding and cannot survive a changed connecting server
- Review DMARC aggregate reports for SPF failures that reveal unauthorised senders using your domain