How to Build Valid SPF & DMARC DNS Records
An SPF & DMARC Generator constructs error-free DNS TXT values from your authorized email providers, IPv4/IPv6 ranges, failure enforcement policy (~all or -all), and DMARC reporting addresses (rua/ruf). Building records interactively prevents duplicate SPF syntax errors and ensures you stay within the 10-lookup RFC 7208 cap.
- 1-Click Provider Presets
- Google Workspace, Microsoft 365, Cloudflare, SES, SendGrid, Mailgun, Postmark, Zoho
- Lookup Budget Meter
- Live RFC 7208 counter warning automatically above 10 DNS lookups
- DMARC Policy Builder
- Supports p=none / quarantine / reject, sp=, pct=, adkim/aspf & rua=
- Zero Server Storage
- 100% browser-side generation with one-click Copy buttons
SPF Qualifiers & DMARC Tags Cheat Sheet
| Tag / Mechanism | Function | Recommended Value |
|---|---|---|
| ~all (SoftFail) | Marks unlisted senders as suspicious without hard bounce | Best starting enforcement during rollout |
| -all (HardFail) | Instructs receivers to reject unauthorized sending IPs | Strongest spoofing defense once all senders are listed |
| p=none / quarantine / reject | DMARC action on failed SPF + DKIM alignment | Start p=none → move to p=quarantine → finalize p=reject |
| rua=mailto:... | Destination for daily XML aggregate DMARC reports | Dedicated inbox like [email protected] |
| adkim=r / aspf=r | Identifier alignment mode (relaxed vs strict) | Relaxed (r) allows subdomains; Strict (s) requires exact domain match |
How to Generate & Publish Your Records
-
1 Select your email providers & custom IPs
Toggle every service that sends email on behalf of your domain (e.g. Google Workspace + SendGrid) and add any dedicated server IPv4/IPv6 addresses.
-
2 Configure DMARC policy & reporting email
Choose your desired DMARC policy (none, quarantine, or reject), percentage, and aggregate report address.
-
3 Copy & add TXT records at your DNS host
Publish the SPF value on your root domain (@) and the DMARC value on host _dmarc, then verify with our Email Auth Checker.
Frequently Asked Questions
Where do I paste the generated SPF record?
Create (or edit the single existing) TXT record on your root domain (@) in your DNS provider (Cloudflare, Route 53, GoDaddy, Namecheap) and paste the generated v=spf1 string.
Where do I paste the generated DMARC record?
Create a TXT record with host/name _dmarc (making _dmarc.yourdomain.com) and paste the generated v=DMARC1 string.
Should I pick ~all or -all for SPF?
Use ~all (SoftFail) if you are still auditing third-party marketing/CRM senders; switch to -all (HardFail) once all legitimate sending sources are confirmed.
Why does this generator count include: mechanisms?
Each include:, mx, a, or redirect mechanism consumes part of RFC 7208's strict 10-DNS-lookup limit. Staying well under 10 keeps your email out of spam folders.