SPF Record Generator
Build one valid SPF record: pick email providers, add your own servers and IPs, choose ~all or -all, and see the DNS lookup count. Free; runs in your browser.
Updated 2026-10-20
Not listed, because their documentation gives no include to publish or the documented include does not resolve: Proton Mail, Mailchimp, Brevo, Klaviyo, Constant Contact, Kit, MailerLite, Salesforce Marketing Cloud, SendGrid, Postmark, SparkPost, Mandrill, Shopify.
Nothing you type here is sent anywhere: the record is built in this browser tab. The link copies your settings into the address fragment, which never leaves your browser. Copy link to this result
Result
What is an SPF record generator?
DNSVerdict's SPF record generator builds the single TXT record that lists which servers may send email for your domain. You tick the email services you use, add your own servers or IP ranges, and choose what happens to everyone else. It follows RFC 7208, never writes +all, estimates the DNS lookup count against the limit of 10, and runs entirely in your browser.
What this checks
An SPF record is one TXT record at your domain that starts with v=spf1, lists the senders you allow and ends with an all term for everyone else. Receivers compare the connecting server with that list; if it is not listed, the all term decides the outcome. This generator builds the record from your choices, shows the host name and the value with copy buttons, and re-parses the value with the same code as the SPF checker, so what you see has no syntax errors (RFC 7208 §4.6, §12).
Where the includes come from. The provider list is generated from our provider database, where each include value was taken from the provider's own documentation. Only providers whose documentation tells you to publish an include are offered, and only if that include resolves in DNS today. Providers that handle SPF themselves through a return-path CNAME, such as many transactional services, need no include and are not listed, and an include that does not resolve is never offered because it would break your record. Add any other service with the include field. Your own mail server can be added with mx, a, or exact ip4 and ip6 addresses; ranges use CIDR notation such as 203.0.113.0/24.
The 10-lookup limit. A receiver may make at most 10 DNS-querying lookups while evaluating SPF: each include, a, mx, ptr, exists and redirect counts, ip4, ip6 and all do not, and includes count everything nested inside them (RFC 7208 §4.6.4). More than 10 gives permerror and SPF fails for all your mail. For providers in our database the generator knows how many lookups their include costs on the date shown; for anything else it says to check live, and the count shown is a minimum. Provider records change, so confirm with the SPF checker after you publish.
The all qualifier. The default ~all (softfail) marks unlisted senders as suspicious without asking for rejection, a sensible start together with DMARC. -all (fail) tells receivers to reject unlisted senders and is right once every sending service is listed. ?all (neutral) says nothing and gives no protection, so it carries a warning. +all, which lets everyone send as you, is never generated (RFC 7208 §5.1, §8).
Replace, do not add. A domain must have exactly one SPF record. If you already have one, merge it into the list here and replace the old record, otherwise two v=spf1 records make every check fail with permerror (RFC 7208 §3.2). The guides on creating an SPF record, the 10-lookup limit and multiple SPF records explain each case. The DNS host may need the value split into several quoted strings when it exceeds 255 characters (RFC 7208 §3.3).
If it fails
- A red problem line: correct the value it names, usually a mistyped IP address or include domain. The record shown leaves the bad part out until you do.
- More than 10 lookups: remove a service you no longer use, or see too many SPF lookups for ways to shrink the record.
- The live check reports two SPF records: delete the old one and keep only the new record; see multiple SPF records.
- Mail still fails SPF after publishing: the sending service may use its own return-path domain, so SPF passes for that domain but does not align; see DMARC alignment failures.
- A service you use is not listed: add its include domain from its documentation in the include field, then check the lookup count live.
FAQ
Should I use ~all or -all?
Use ~all (softfail) while you are setting things up and -all (fail) once every service that sends as your domain is in the record. With DMARC in place, receivers act on the DMARC result rather than on the SPF qualifier alone, but -all makes a forgotten sender bounce at receivers that reject on SPF fail, so check your DMARC reports before switching.
What is the SPF 10 lookup limit?
RFC 7208 §4.6.4 allows at most 10 DNS-querying terms while a receiver evaluates SPF: include, a, mx, ptr, exists and redirect, plus everything nested in includes. ip4, ip6 and all are free. Going over returns permerror, which counts as an SPF failure for every message from your domain.
Can I have more than one SPF record?
No. A domain must publish exactly one v=spf1 record; with two, receivers return permerror and SPF fails for everything (RFC 7208 §3.2, §4.5). To add another service, edit the existing record and add its include, or generate a combined record here and replace the old one.
Why is my email provider missing from the list?
Providers appear only when their own documentation says to publish an include and that include resolves today. Many services, such as SendGrid with automated security, authenticate you through a CNAME record instead and need no include. If yours needs one, copy it from its documentation into the include field.