- Home
- Free tools
- SPF record generator
Free SPF record generator: Build your SPF record
Pick the services that send email for your domain and get one valid SPF record to publish, with its DNS lookups counted against the limit of 10.
Ready to publish
v=spf1 include:_spf.google.com ~all
- Publish at
- @ · TXT
- DNS lookups, before includes
- 1 of 10
- Length
- 35 characters
- Each include also counts the lookups inside it. Once the record is published, the SPF, DKIM and DMARC checker counts them all.
- Publish it as the only TXT record starting with v=spf1 on this name: replace an existing one rather than adding a second.
Published it? Check SPF, DKIM and DMARC for it
Get alerted when SPF, DKIM or DMARC breaks, and before the domain expires.
Monitor this domain//_01 Syntax
One line, read from left to right
Receivers check the sending server against each part in turn and stop at the first match. A record may need at most 10 DNS lookups in total, includes and their own includes counted.
| Part | Means | DNS lookups |
|---|---|---|
| v=spf1 | Starts every SPF record. A TXT record without it isn’t read as SPF. | 0 |
| include:_spf.google.com | Also allow every server that domain’s own SPF record allows. Mail providers give you theirs. | 1, plus those inside it |
| mx | Allow the servers in the domain’s MX records, the ones that receive its mail. | 1 |
| a | Allow the addresses the domain itself points to. | 1 |
| ip4:203.0.113.0/24 | Allow one IPv4 address or range. ip6: does the same for IPv6. | 0 |
| redirect=example.net | Use another domain’s record instead. Only read when the record has no all. | 1 |
| ~all | Every other server: soft fail with ~, fail with -, neutral with ?. Always last. | 0 |
Questions
Can a domain have more than one SPF record?
No. With two TXT records that start with v=spf1, SPF fails for every message the domain sends. Add each new sender to the one record you have instead of publishing a second.
Should the record end with ~all or -all?
~all (soft fail) asks receivers to treat mail from other servers as suspicious, -all (fail) to reject it. With a DMARC policy in place, receivers follow DMARC either way, so ~all is the usual choice. Use -all on domains that send no email at all.
What is the 10 DNS lookup limit?
Checking an SPF record may take at most 10 DNS lookups. Each include, a, mx, ptr, exists and redirect counts, and so do the ones inside each include; ip4 and ip6 count nothing. Past 10, SPF fails for every message, so remove senders you no longer use first.
Does SPF alone stop someone sending as my domain?
No. SPF checks the envelope sender, a hidden address, not the From address people see. DMARC links the two and tells receivers what to do when neither SPF nor DKIM matches your domain, so publish all three.
How do I know if my SPF record breaks later?
A domain monitor on Uptimecheck reads your SPF, DKIM, DMARC and MTA-STS records twice a day and alerts you when a new problem appears, such as a missing record or an SPF record that needs more than 10 lookups.
Let Uptimecheck keep watching
This free tool answers one question at a time. In Uptimecheck, the same work runs on its own and alerts you when something needs attention.
More free tools
All tools- SPF, DKIM and DMARC checker Check a domain’s SPF, DKIM and DMARC records, MTA-STS and TLS reporting in one go, with what to fix and the exact record to add. Open tool
- DNS lookup Ask for any record type and see every answer with its TTL, straight from a resolver, without a cache in between. Open tool
- Domain expiry checker Look up a domain’s expiry date, registrar and age from the registry’s own records (RDAP, or WHOIS where there is none). Open tool
Hear it from us, not your customers.
Click around the live demo without an account, or start your trial and add your first monitor.
14-day free trial · Then free on 20 monitors · No credit card