SPF Record Generator
Create a valid SPF record for your domain in seconds with our easy-to-use generator
Generated SPF Record
Your SPF record is ready to be added to DNS
Warning: Your SPF record has DNS lookups. The limit is 10.
TXT Record Value
Configure options and click "Generate SPF Record"
Record Length
-
Max: 255
DNS Lookups
-
Max: 10
How to Add This Record
- 1. Log in to your DNS provider (e.g., Cloudflare, GoDaddy, Namecheap)
- 2. Navigate to DNS settings for your domain
- 3. Add a new TXT record
- 4. Set the hostname to @ (or leave blank for root domain)
- 5. Paste the generated value above
- 6. Save and wait for DNS propagation (up to 48 hours)
Understanding SPF Records
What is an SPF Record?
SPF (Sender Policy Framework) is an email authentication method that helps prevent email spoofing by specifying which mail servers are authorized to send email on behalf of your domain.
SPF Mechanisms Explained
- ip4: / ip6:
- Authorize specific IPv4 or IPv6 addresses or ranges
- a
- Authorize the IP addresses in your domain's A record
- mx
- Authorize the IP addresses of your domain's MX records
- include:
- Include another domain's SPF policy (e.g., for email service providers)
- redirect=
- Redirect to another domain's SPF record (replaces all other mechanisms)
Policy Qualifiers
- -all (Fail)
- Reject all emails from unauthorized sources. Most strict policy.
- ~all (SoftFail)
- Mark emails from unauthorized sources as suspicious. Recommended for most use cases.
- ?all (Neutral)
- No policy specified. Not recommended.
- +all (Pass)
- Accept all emails. NOT RECOMMENDED - defeats the purpose of SPF.
Important Limits:
- Maximum 10 DNS lookups (each include:, a, mx, exists: counts as 1)
- Maximum 255 characters per string
- Only one SPF record per domain
Related Tools
Need SPF Monitoring & Management?
Automatically track SPF record changes, get alerts for DNS lookup limit issues, and manage your sender policy with confidence.
No credit card required • Free monitoring for 14 days • Setup in 5 minutes