How to Set Up Your SPF Record in DNS (Step-by-Step)
SPF (Sender Policy Framework) prevents spammers from sending unauthorised emails using your domain. Follow these 4 deployment rules:
Audit Senders
List every system that sends email on your domain: Google Workspace, Microsoft 365, transactional providers (SendGrid, Postmark), and marketing tools.
Only 1 SPF Record
Never create multiple SPF TXT records. Having more than one SPF record causes an immediate RFC PermError and breaks email delivery.
Stay Under 10 Lookups
RFC 7208 strictly limits SPF evaluation to 10 DNS lookups. Keep an eye on the lookup counter above so you never exceed this ceiling.
Publish at Root (@)
In your DNS manager, add a TXT record at the root apex domain (@ or leave blank) and paste the generated v=spf1... string.
DNS Provider Quick Reference
Enter the root domain parameters in your DNS provider's interface:
| DNS Provider | Record Type | Name / Host Field | Value / Content Field | TTL / Proxy |
|---|---|---|---|---|
| Cloudflare | TXT |
@ (or root) |
v=spf1 ... ~all |
Auto / DNS only |
| GoDaddy | TXT |
@ |
v=spf1 ... ~all |
1/2 Hour (1800) |
| Namecheap | TXT Record |
@ |
v=spf1 ... ~all |
Automatic |
| AWS Route 53 | TXT |
(Leave blank) | "v=spf1 ... ~all" |
300 seconds |
| Google Cloud DNS | TXT |
yourdomain.com. |
"v=spf1 ... ~all" |
3600 seconds |