SPF Record Generator
Build a Sender Policy Framework record for your domain, see how many of its 10 DNS lookups it uses, and check the record you already have published. The record is built in your browser.
Build a record
Your SPF record
Publishing it
| Type | TXT |
|---|---|
| Name / Host | @ (the domain itself; some dashboards want the full domain name) |
| Value | |
| TTL | 3600 (or your provider's default) |
A domain must have exactly one SPF record. If one already exists, replace it instead of adding a second; two SPF records make every check fail.
Check a published record
Looks up the domain's TXT records through Cloudflare's public DNS-over-HTTPS resolver (cloudflare-dns.com), then follows every include and counts the lookups.
About SPF
- SPF lists the servers allowed to send mail using your domain in the envelope sender. Receivers check the connecting server against that list. It is defined in RFC 7208; background is at open-spf.org.
- Each
include,a,mx,ptr,existsandredirectcosts a DNS lookup, and so does every lookup inside an included record. Past 10, receivers stop and treat SPF as failed. Large providers' includes often use several each, so check nested lookups before publishing. ip4andip6cost no lookups, so listing a fixed server by address is cheaper thana.- SPF on its own is not enough today. Gmail and Yahoo require SPF or DKIM for all senders, and SPF, DKIM, and DMARC for bulk senders. DKIM signs each message, and DMARC tells receivers what to do when checks fail.
- The 2009 walkthrough on this site, Setting Up SPF, SenderId, Domain Keys, and DKIM, covers the original Postfix setup.