SPF record generator
This free SPF record generator builds one SPF TXT record from the services and servers that send email for your domain. Add your provider include domains and any sending IPs, choose how other senders are treated, and copy the record to publish at your DNS host. Nothing is published for you, so you can review it first.
Inputs are sent to our server to run this check. They are not included in usage analytics.
Your result
Add your inputs, or try the example, to see your result here.
Review all real senders before publishing.
Sending cold email from this domain? Terlido checks SPF, DKIM, DMARC and MX for every mailbox you connect, and warms it up for free. Connect a mailbox, free
How Terlido handles this
Stop checking by hand. Terlido watches every mailbox you send from.
Domain score on connect
SPF, DKIM, DMARC and MX checked the day you connect a mailbox, then daily.
Free warmup, forever
Every mailbox warms up on every plan, at no cost.
Campaigns in the same place
Contacts, sequences and replies sit next to the mailbox checks.
No card, at any point.
How to use this tool
- Combines the sender values into one proposed v=spf1 record.
What the result tells you
- Review all real senders before publishing.
- Publish only one SPF record at a domain.
What is an SPF record?
SPF (Sender Policy Framework) is a TXT record in your domain's DNS that lists who may send email using your domain. When a mail server receives a message, it looks up the SPF record of the domain in the envelope sender and checks whether the sending server is on the list.
SPF is one of the three records mailbox providers expect from a sender, next to DKIM and DMARC. Google and Yahoo ask every sender to set up SPF or DKIM, and bulk senders to set up both, so a missing or broken SPF record can send good mail to spam.
What an SPF record looks like
Every SPF record starts with v=spf1, lists the allowed senders, and ends with an all rule that says what to do with everyone else:
- include: lets a provider's own SPF list count as yours, for example include:_spf.google.com for Google Workspace.
- ip4: and ip6: allow one address or a whole range written as a CIDR, for example ip4:192.0.2.0/24.
- ~all (soft fail) marks other senders as suspicious, -all (fail) says they are not allowed, and ?all (neutral) makes no claim.
v=spf1 include:_spf.google.com ip4:192.0.2.1 ~all
How this SPF generator builds the record
The generator does not look up your DNS and does not count DNS lookups. Use the SPF checker to read what is live and the SPF lookup limit checker before you publish.
- Enter one include domain or IP per line (commas work too), up to 20 of each.
- Each include must be a valid domain name, and each IP must be a valid IPv4 or IPv6 address, with an optional CIDR prefix up to /32 or /128.
- The record is written in a fixed order: v=spf1, then every include, then every IP (ip4: or ip6: is picked for you), then the all rule. Soft fail (~all) is the default.
- If you enter your domain, the result tells you where to publish the record. Otherwise it says to publish it at your sending domain.
Worked example
Include domains _spf.google.com and sendgrid.net, the IP range 192.0.2.0/24 and Fail for other senders produce this record:
v=spf1 include:_spf.google.com include:sendgrid.net ip4:192.0.2.0/24 -all
Rules to follow before you publish
- Publish only one SPF record per domain. Two TXT records that start with v=spf1 make SPF fail, so merge them into one.
- Stay under 10 DNS lookups. Every include, a, mx, exists and redirect costs a lookup, and nested includes count too. Going over the limit makes SPF return an error.
- List every real sender: your mailbox provider, your newsletter and cold email tools, your CRM, your helpdesk and any server that sends invoices or alerts.
- Start with ~all while you confirm the list is complete, then move to -all once DMARC reports show only expected senders.
- Publish the record at the domain in the envelope sender (return path), which is often your main domain but can be a subdomain your provider uses.
SPF, DKIM and DMARC together
SPF alone checks the envelope sender, not the From address people see, and it breaks when mail is forwarded. DKIM signs the message itself, and DMARC ties both to your From domain and tells receivers what to do when checks fail. Set up all three: build a DMARC record with the DMARC record generator once SPF and DKIM pass.
Frequently asked questions
Is this SPF record generator free?
Yes. It is free and needs no account. It only builds the record; it does not change your DNS.
Should I use ~all or -all?
Use ~all (soft fail) while you are still finding every service that sends for you. Switch to -all (fail) when your DMARC reports show that only listed senders use your domain.
Can I have two SPF records?
No. A domain must have exactly one SPF record. If you use two providers, put both include domains in one record, which is what this generator does.
What is the SPF 10 lookup limit?
Receivers stop after 10 DNS lookups while evaluating SPF. Each include, a, mx, exists and redirect counts, including the ones inside a provider's include. Check your total with the SPF lookup limit checker.
Where do I publish the SPF record?
At your DNS host, as a TXT record on your sending domain (the host is usually @ for the root domain). Replace any existing SPF record instead of adding a second one.
Which include do I need for my email provider?
Your provider's help pages list it. Common ones are include:_spf.google.com for Google Workspace and include:spf.protection.outlook.com for Microsoft 365.
Useful next steps
Free tools from our sister products
Connect a mailbox.
Your domain's score lands today.
It costs nothing and doesn't depend on anyone else being on the platform. Warmup runs free on every plan, forever.
Start freeFix it once. Terlido keeps watching.
Start free