Free tool · 04 / SEND
SPF record generator.An SPF record that stays under 10 lookups, no signup.
Builds an SPF record and counts every DNS lookup, nested includes too, against 10.
We look this up and don't keep it.
Who sends email as this domain?
Copy each one from the service's own setup page.
IPv4 or IPv6, with a /range if you like.
- Type
- TXT
- Host or name
@The domain itself:yourdomain.com- Value
v=spf1 include:_spf.google.com ~all- DNS lookups
- 1 in this recordIncludes add their own; we count them as you build.
- Replace your current SPF record with this one rather than adding a second: two SPF records make SPF fail.
See a published record's whole include tree →
Valley sends from your own Gmail or Microsoft inbox, so the Google or Microsoft include above already covers it. See how Valley does it ↗
NEXT STEP
Fed up with passing SPF and still hearing nothing back.The other half is who, and what you say.
Book a demo ↗$500 a month for your first seat, $200 for each seat after that.
The terms
Which SPF terms cost a DNS lookup?Every mechanism, and what it does to your limit of 10.
include, a, mx, ptr, exists and the redirect modifier each cost a DNS lookup, and so does everything inside an include. ip4, ip6 and all cost nothing. RFC 7208 allows 10 lookups in total; past that, SPF returns a permanent error.
| Term | What it matches | Costs a lookup? |
|---|---|---|
| ip4: | An IPv4 address or range | No |
| ip6: | An IPv6 address or range | No |
| a | The domain's own A or AAAA addresses | Yes |
| mx | The domain's mail servers | Yes |
| include: | Whatever another domain's SPF record allows | Yes, plus its own |
| exists: | Any name that resolves, often with macros | Yes |
| ptr | Reverse DNS. RFC 7208 says don't publish it | Yes |
| redirect= | Hands the whole check to another domain's record | Yes |
| all | Everything else; goes last, with ~ or - | No |
Qualifiers: - is fail, ~ is soft fail, ? is neutral, + (the default) is pass. From RFC 7208 sections 4.6.2, 4.6.4, 5 and 6.
From RFC 7208: Sender Policy Framework (SPF) ↗, read 9 Nov 2026
How it works
How this tool works.And what it can't see.
Tick who sends mail as your domain, paste any other services' include domains and your own servers' IP addresses, and pick what happens to mail from anywhere else. The record is written in your browser as you go.
Then the draft goes to our server, which follows every include, and every include inside those, and counts the lookups the way receivers do. The domain and the draft aren't kept. A handful of services with nested includes can pass 10 without anyone noticing.
Addresses come first in the record because they cost no lookups, then a and mx, then includes, then all. If nothing sends, you get v=spf1 -all, the record for a domain that never sends mail.
What it can't know is every service that sends as you. Check your email platform, CRM, help desk and billing tool, and copy each one's include from its own setup page.
Built by Valley.
Sources
- RFC 7208: Sender Policy Framework (SPF) ↗read 9 Nov 2026
- Google Workspace Help: Set up SPF ↗read 15 Oct 2026
- Microsoft Learn: Set up SPF for your Microsoft 365 domain ↗read 15 Oct 2026
SPF
Write an SPF record that doesn't break.The three rules that catch most domains.
SPF says which servers may send as your domain. It fails in a few predictable ways.
- 01
One record, never two
A domain must not publish more than one SPF record; if a receiver finds two, SPF returns a permanent error. Adding a service means editing the one record you have, not adding another TXT record that starts with v=spf1.
From RFC 7208: Sender Policy Framework (SPF) ↗, read 9 Nov 2026
- 02
Ten lookups, nested ones included
RFC 7208 limits a check to 10 DNS-querying terms, counting every include, a, mx, ptr, exists and redirect, including those inside the records you include. Microsoft's docs give the arithmetic: an include that points at a record with three more includes costs four lookups. Fewer than 10 includes doesn't mean fewer than 10 lookups.
From RFC 7208: Sender Policy Framework (SPF) ↗ (read 9 Nov 2026) · Microsoft Learn: Set up SPF for your Microsoft 365 domain ↗ (read 15 Oct 2026)
- 03
Soft fail or fail
~all is a soft fail, a weak statement that other servers probably aren't authorized; -all is a fail, an explicit statement that they aren't. The providers differ: Google recommends ~all for Google Workspace, and Microsoft recommends -all for Microsoft 365 domains, because DMARC effectively ignores a ~all failure on mail that has no DKIM signature.
From RFC 7208: Sender Policy Framework (SPF) ↗ (read 9 Nov 2026) · Google Workspace Help: Set up SPF ↗ (read 15 Oct 2026) · Microsoft Learn: Set up SPF for your Microsoft 365 domain ↗ (read 15 Oct 2026)
- 04
Use each provider's exact include
Google Workspace's is include:_spf.google.com and Microsoft 365's is include:spf.protection.outlook.com, each from its own documentation. For any other service, copy the include from its setup page rather than guessing.
A clean SPF record gets you to the inbox. What you say when you're there is the rest. See how Valley does it ↗
From Google Workspace Help: Set up SPF ↗ · Microsoft Learn: Set up SPF for your Microsoft 365 domain ↗, read 15 Oct 2026
Questions
Questions people ask.
- What is an SPF record?
- A DNS TXT record on your domain, starting v=spf1, that lists the servers allowed to send email as that domain.
- How do I create an SPF record?
- Tick the services that send as your domain here, add any others and your own IPs, copy the value and publish it as a TXT record on your domain's root.
- What is the SPF record for Google Workspace?
- v=spf1 include:_spf.google.com ~all, Google's recommended record when Google Workspace is the only service that sends as your domain.
- What is the SPF record for Microsoft 365?
- v=spf1 include:spf.protection.outlook.com -all, Microsoft's record for a domain where only Microsoft 365 sends. Add other senders before the -all.
- What is the SPF 10 DNS lookup limit?
- RFC 7208 allows at most 10 DNS-querying terms per check, nested includes counted. Past that, SPF returns a permanent error and fails.
- Can a domain have two SPF records?
- No. Two SPF records make SPF return a permanent error. Merge them into one.
- Should I use ~all or -all?
- Google recommends ~all for Google Workspace domains; Microsoft recommends -all for Microsoft 365 domains that also use DKIM and DMARC. For a domain that sends no mail, use v=spf1 -all.
- What SPF record should a domain that doesn't send email have?
- v=spf1 -all, which says no server is allowed to send as it. It's Microsoft's record for parked domains too.
- Is this SPF generator free?
- Yes. It's free and needs no signup. The lookup count runs on our server, which doesn't keep your domain or record.
Keep going
Try one of these next.
- DMARC record generatorEmail outreachWrites a DMARC record to RFC 9989, with report addresses, alignment and test mode.Open the tool
- DKIM record generatorEmail outreachMakes a DKIM key pair in your browser and writes the TXT record to publish.Open the tool
- SPF, DKIM and DMARC checkerEmail outreachChecks a domain's SPF, DKIM and DMARC records against Gmail and Yahoo's sender rules.Open the tool
- Email setup mapEmail outreachDraws a domain's email setup as one diagram: MX, the SPF include tree, DKIM and DMARC.Open the tool
- Cold email domain finderEmail outreachSending domain ideas close to your brand, each checked against its registry.Open the tool