SPF Record Generator

Build a valid SPF TXT DNS record for your domain. Select your authorized senders and copy the result.

Generated SPF Record
DNS TXT Record
v=spf1 ~all
Validate this record

What is an SPF record?

SPF (Sender Policy Framework) is a DNS TXT record that lists which servers are allowed to send email for your domain. When a mailbox provider receives a message, it checks your SPF record to confirm the sending server is authorized — a key signal for landing in the inbox instead of spam.

How to use this generator

Pick the services that send on your behalf (Google, Microsoft 365, SendGrid, Mailgun, Amazon SES and more), add any custom IPs, choose your enforcement policy, and copy the generated record into a TXT record on your domain. Then verify it resolves correctly before you rely on it.

Common SPF mistakes

Publishing more than one SPF record, exceeding the 10 DNS-lookup limit, or using a strict -all before you have listed every sender are the most common ways SPF breaks deliverability. Keep a single record, stay under 10 lookups, and start with ~all (soft fail) while you validate.

Frequently asked questions

Is this SPF generator free?
Yes — generating and validating an SPF record is completely free, no signup required.
Can I have more than one SPF record?
No. A domain must have exactly one SPF TXT record. If you use multiple senders, combine all of their include: mechanisms into a single record.
What is the 10 DNS lookup limit?
SPF allows a maximum of 10 DNS lookups when it is evaluated. Going over causes a permerror and SPF fails. Use an SPF flattener to stay under the limit.
Should I use ~all or -all?
Start with ~all (soft fail) while you confirm every legitimate sender is listed, then move to -all (hard fail) once you are confident, for the strongest protection against spoofing.