SPF Record Generator
Select your authorized mail senders and instantly build a valid SPF TXT record to add to your DNS.
Use the SPF Record Generator
Your Domain
Enter the domain name only — no http:// or @ prefix.
Mail Service Providers
Custom Senders
One entry per line. Supported: IPv4 (1.2.3.4), CIDR (1.2.3.0/24), IPv6 (2001:db8::/32), hostname (mail.host.com).
Policy for Unlisted Senders
DNS Lookup Usage
0 / 10ip4/ip6 mechanisms do not consume DNS lookups.
Generated SPF Record
Full TXT value
v=spf1 ~all
Active Mechanisms
No senders selected yet. The record will still include the policy qualifier.
How to Add to DNS
- 1 Log in to your DNS provider (Cloudflare, GoDaddy, Namecheap, Route 53, etc.).
- 2 Add a new TXT record for your domain root (@ or leave host blank).
- 3 Paste the generated SPF string as the record value. Set TTL to 3600 (1 hour) or your default.
- 4 Wait for DNS propagation (minutes to 48 hours), then verify with a DNS TXT lookup tool.
Summary
The SPF Record Generator builds a valid Sender Policy Framework DNS TXT record by letting you select the mail services and IP addresses authorized to send email on behalf of your domain. SPF records prevent email spoofing and improve deliverability by telling receiving mail servers which hosts are allowed to send mail for your domain. The tool tracks DNS lookup usage in real time and warns you before you exceed the 10-lookup limit defined in RFC 7208.
How it works
- Enter your domain name (e.g. example.com) in the domain field.
- Select the mail providers authorized to send on your behalf (Google Workspace, Microsoft 365, etc.).
- Add any custom IP addresses, CIDR ranges, or hostnames in the custom senders section.
- Choose the policy qualifier: ~all (softfail), -all (fail), or ?all (neutral).
- The SPF record string updates in real time — copy it and add it as a TXT record in your DNS.
Use cases
- Generate an SPF record for a new domain before launching email campaigns.
- Add a third-party email service (SendGrid, Mailchimp) to an existing SPF record.
- Verify that your SPF record stays under the 10 DNS lookup limit.
- Quickly combine multiple mail senders into a single, properly formatted record.
- Troubleshoot email deliverability issues caused by missing or malformed SPF records.
- Set up SPF authentication for transactional email providers.