SPF syntax errors: the 9 mistakes that break SPF records
Updated 10 November 2026 · 5 min read
Short answer
Most broken SPF records fail for one of a few typing mistakes: the record doesn't start exactly with v=spf1, an include has a trailing dot or an = instead of :, there is a space after a colon, a term is misspelled (inlcude), there are smart quotes or line breaks copied from a document, or something comes after all. Any of these gives permerror (or silently ignores terms). Fix the text so it matches the table below and re-check.
Wrong vs right
| Wrong | Problem | Right |
|---|---|---|
v=spf1 include:spf.protection.outlook.com. -all | trailing dot | v=spf1 include:spf.protection.outlook.com -all |
v=spf1 include=_spf.google.com ~all | = instead of : | v=spf1 include:_spf.google.com ~all |
v=spf1 include: _spf.google.com ~all | space after colon | v=spf1 include:_spf.google.com ~all |
spf1 include:_spf.google.com ~all | missing v= | v=spf1 include:_spf.google.com ~all |
v=spf1 inlcude:_spf.google.com ~all | misspelled mechanism | v=spf1 include:_spf.google.com ~all |
v=spf1 ip4:203.0.113.0/33 ~all | invalid CIDR | v=spf1 ip4:203.0.113.0/24 ~all |
v=spf1 ~all include:_spf.google.com | terms after all are ignored | v=spf1 include:_spf.google.com ~all |
v=spf1 include:http://mail.example.com ~all | URL instead of domain | v=spf1 include:mail.example.com ~all |
v=spf1 ptr ~all | ptr is discouraged by RFC 7208 and slow | list the sender's include or IPs |
Invisible problems
- Smart quotes (“ ”) pasted from Word or Google Docs end up inside the value. DNS panels that add quotes themselves will then publish
"“v=spf1…”". - Line breaks in the middle of a value copied from a PDF.
- A leading space before
v=spf1. Receivers look for a record that begins exactly withv=spf1. - Uppercase is fine (
V=SPF1works) but stick to lowercase to avoid confusion.
A record that hit three mistakes at once
Before: " v=spf1 include:_spf.google.com. include= sendgrid.net ~all"
After: "v=spf1 include:_spf.google.com ~all"The leading space made receivers not recognise it as SPF at all (so the domain effectively had none), the trailing dot and the include= were errors, and SendGrid with automated security didn't need an include anyway. The fixed record is shorter and passes.
Checking syntax
Read the published value, not what your DNS panel shows: dig +short TXT yourdomain.com. That shows exactly what receivers see, including stray quotes and spaces.
Check the result
The SPF line shows the record exactly as published. Run the domain through the free ReplyDak deliverability check: it reads MX, SPF, DKIM and DMARC live from public DNS, counts SPF lookups and checks the main blocklists, with no sign-up. If your DKIM selector is not a common one, type it into the optional selector box.
More setups and errors: SPF, DKIM and DMARC by provider, DNS host and error.
FAQ
Does a trailing dot break SPF includes?
Microsoft lists it as a common mistake; write the domain without a trailing dot.
Is SPF case-sensitive?
No, mechanisms are case-insensitive, but the record must begin with v=spf1 with no leading space.
Can I put a comment in an SPF record?
No. Anything that is not a valid term is a syntax error.