Build a valid SPF record for Google Workspace, Microsoft 365, SendGrid and more in seconds. Free, with no signup.
Who sends email for your domain?
Other includes (optional)
IPv4 addresses to authorise (optional)
Policy for everyone else
Build a valid SPF record for Google Workspace, Microsoft 365 and more in seconds. Free and generated entirely in your browser.
Pick your senders
Select the providers that send email for your domain.
Add IPs & includes
Authorise any extra IP addresses or include domains.
Choose a policy
Use ~all (soft fail) to start safe, then tighten later.
Add to DNS
Copy the TXT record and add it to your domain's DNS.
SPF tells the world which servers are allowed to send email as your domain. Get it wrong — or miss a sender — and your legitimate cold emails can land in spam or be rejected.
This generator assembles a valid SPF record from the providers you actually use, so you don't have to remember the exact include syntax for Google, Microsoft, SendGrid and the rest.
SPF, DKIM and DMARC together authenticate your domain — but authentication alone won't save you if you email invalid addresses and rack up bounces.
Verify every recipient with Emailchaser's free email verifier to keep your bounce rate low and your sender reputation healthy.
Every SPF record is a single line that begins with v=spf1 and ends with an all mechanism. In between you list mechanisms that authorise senders: include pulls in another domain's SPF (this is how you add Google, Microsoft or an ESP), a authorises whatever your domain's A record points to, mx authorises the servers in your MX records, and ip4 / ip6 authorise specific addresses or CIDR ranges. The generator above wires these together for you, but knowing the pieces makes troubleshooting far easier.
The all mechanism at the end sets the default for any sender that didn't match, and the symbol in front of it is the qualifier: - means fail (hard), ~ means softfail, ? is neutral and + is pass. The same qualifiers can prefix any mechanism, though you rarely need them anywhere but all. A finished record for a domain that sends through Google Workspace and SendGrid plus one in-house server reads: v=spf1 include:_spf.google.com include:sendgrid.net ip4:192.0.2.10 ~all — meaning Google, SendGrid and 192.0.2.10 are allowed, and everything else should be treated as suspicious.
Provider includes hide more than they show. include:spf.protection.outlook.com is a single entry that covers all of Microsoft 365, whereas include:_spf.google.com expands into three nested includes behind the scenes, so one visible line can quietly cost several DNS lookups — which matters for the limit below.
SPF caps the number of DNS lookups a record may trigger at 10 (RFC 7208). Every include, a, mx, ptr, exists and redirect counts toward that budget, and nested includes count too — so a record with five providers can pass ten without ever looking long. Crucially, ip4 and ip6 cost nothing to evaluate, and neither does all, because they need no DNS query.
Exceed ten lookups and the record returns a PermError: receivers stop evaluating and treat your SPF as broken, which can push legitimate mail to spam and breaks DMARC alignment on the SPF side. To stay under the limit, remove includes for providers you no longer use, swap an include for a direct ip4 range when a sender publishes fixed IPs, and avoid stacking overlapping marketing tools. SPF flattening — expanding includes into raw IP addresses — technically frees up lookups, but it's fragile: providers change their sending IPs without notice, so a flattened record silently rots and starts failing legitimate mail.
The single most common breakage is publishing two SPF records. A domain may have only one TXT record starting with v=spf1; a second one — often left over from an old provider — turns the whole result into a PermError. Merge every sender into one record instead. The same applies to the all mechanism: it must appear exactly once, at the very end, because anything placed after all is ignored.
Other frequent mistakes: putting the record on the wrong host (SPF belongs on the exact domain that appears after the @ in your From address, and subdomains do not inherit the root's SPF), jumping straight to -all before every sender is listed, which bounces your own mail, and using the deprecated ptr mechanism, which is slow and unreliable. Watch length as well — a single TXT string maxes out at 255 characters, so a long record has to be split into several quoted strings inside the same record, never into multiple records.
Copy the generated record into a new TXT record at your DNS host. For the root domain, set the host or name field to @ (some registrars want it left blank or the bare domain — they all mean the apex), leave the type as TXT, paste the full v=spf1 ... ~all string as the value, and save; a TTL of 3600 seconds is fine. If a subdomain sends mail on its own — say mg.example.com for Mailgun — it needs its own SPF record published on that subdomain.
Changes take effect on the record's TTL, usually within an hour. To confirm it's live, run dig TXT example.com or nslookup -type=txt example.com and look for the v=spf1 line, or drop your domain into Emailchaser's email deliverability test, which checks SPF, DKIM and DMARC together and flags a lookup count creeping toward the limit. Once SPF is done, the DKIM record generator and DMARC record generator cover the other two records receivers look for.
What is an SPF record?
An SPF (Sender Policy Framework) record is a DNS TXT record that lists which servers are allowed to send email for your domain. Receiving servers check it to help decide whether your mail is legitimate — a key part of email deliverability and stopping spoofing.
How do I create an SPF record?
Pick the providers that send email for you (Google Workspace, Microsoft 365, your ESP), add any extra includes or IPs, choose a policy, and generate. Then add the result as a TXT record on your root domain. You should have only one SPF record per domain.
What does ~all vs -all mean?
The 'all' mechanism sets the policy for senders not listed. ~all (soft fail) marks unlisted mail as suspicious but still accepts it — the safe default. -all (hard fail) rejects it outright, which is stricter but riskier until you're sure every sender is included. ?all is neutral.
Is the SPF record generator free?
Yes — it's free, needs no signup, and builds the record entirely in your browser.
How many DNS lookups is an SPF record limited to?
SPF allows a maximum of 10 DNS lookups when a record is evaluated. Every include, a, mx, ptr, exists and redirect mechanism counts toward that limit — including the lookups hidden inside nested includes — while ip4, ip6 and all cost nothing. Go over ten and the record returns a PermError, which most receivers treat as an SPF failure.
Can I have more than one SPF record on a domain?
No — a domain must publish exactly one TXT record that starts with v=spf1. If two SPF records exist, receivers return a PermError and your authentication effectively breaks, so combine every sender into a single record. You can still list as many include and ip4 entries as you need, as long as you stay under the 10-lookup limit.
What host or name should I use when adding my SPF record?
For a domain that sends from addresses like you@example.com, put the record on the root domain: set the host field to @ (or leave it blank, or enter the bare domain, depending on your registrar — they all mean the apex). SPF must live on the exact domain in your From address, and subdomains do not inherit it, so a sending subdomain such as mail.example.com needs its own record.
Why is my SPF record failing with a PermError?
A PermError almost always means one of three things: you have more than one SPF record, your record needs more than 10 DNS lookups to evaluate, or there's a syntax error such as text placed after the all mechanism. Confirm only one v=spf1 record exists, trim unused includes to get back under the lookup limit, and make sure all is the final term.
Do subdomains need their own SPF record?
Yes, if they send email. SPF isn't inherited, so a subdomain like news.example.com or mg.example.com that sends through a marketing or transactional provider needs its own TXT record with that provider's include. Subdomains you never send from are better locked down with a DMARC policy than with an SPF record.
Address: 151 Calle de San Francisco San Juan, Puerto Rico
Email: support@emailchaser.com
Product
Cold Email SoftwareEmail FinderCampaignsSales CRMLead FinderEmail AccountsEmail VerifierCold Email APIMCP ServerAPI documentationComparisons
Best cold email softwareInstantly alternativesSmartlead alternativesInstantly vs EmailchaserSmartlead vs EmailchaserHunter vs EmailchaserFree tools
All free toolsBulk Email VerifierDeliverability TestEmail Header AnalyzerSMTP Settings FinderCold Email TemplatesBoolean Search BuilderName SplitterCompany Email FormatSpam Word CheckerInternational
Cold email (ES)Cold email (FR)Cold email (DE)Cold email (IT)Cold email (PT)Verifica email (IT)© Copyright 2026 Emailchaser