SPF Record Generator - Build a Valid SPF TXT Record with Lookup Count
SPF Record Generator
Say which servers may send mail for your domain, and stay under the 10-lookup limit
A Valid Record
Choose your senders and the tool writes a correct v=spf1 record, checking every IP and domain you enter.
Lookup Counter
SPF allows at most 10 DNS lookups. See how many your record uses and get a warning before it breaks.
Mistake Warnings
Catches +all, a missing ending, an ignored redirect and records that are too long, and splits long TXT values correctly.
Full Privacy
Everything is built in your browser.
How SPF Works
SPF (Sender Policy Framework) is a DNS TXT record that lists which servers may send email using your domain in the envelope sender. A receiving server looks the record up and checks the connecting IP against it. The record starts with v=spf1, lists mechanisms such as ip4:, mx, a and include:, and ends with an "all" that says what to do with everything else: -all rejects, ~all marks as suspicious.
A domain must have only one SPF record, and receivers stop after 10 DNS lookups: include, a, mx, ptr, exists and redirect each count, and so does everything the included records do in turn. Going over the limit makes SPF fail with a permanent error, which is the most common SPF problem for domains that use several email services. Use IP ranges instead of includes where you can, and test the finished record with an SPF checker.
Key Takeaways
- One record only: Publish a single TXT record starting with v=spf1 for the domain; merge providers into it.
- Includes add lookups: The counter shows the lookups in your record only; included records may use more.
- Related tools: See also the DMARC Record Generator and the Email Deliverability Checker.