Every freelance web developer has lived through this exact horror story: you migrate a client's domain to Cloudflare, the new website loads in 120ms, SSL is green—and 3 hours later the client calls in a panic because their company emails are bouncing or landing straight in Gmail spam.
Almost every time, it comes down to one of three silent DNS mistakes that standard HTTP checks never catch.
1. Duplicate _dmarc or v=spf1 Records (Instant RFC Failure)
This happens constantly when you enable a provider's "1-click DMARC" (like Cloudflare DMARC Management) on a domain that already had a _dmarc TXT record from Zoho, Google Workspace, or Microsoft 365:
# BROKEN: Two separate _dmarc TXT records!
_dmarc TXT "v=DMARC1; p=none; rua=mailto:admin@example.com;"
_dmarc TXT "v=DMARC1; p=none; rua=mailto:abc123@dmarc-reports.cloudflare.net"
Both RFC 7208 (SPF) and RFC 7489 (DMARC) strictly allow only one record per domain. Two v=spf1 records trigger an immediate PermError; two _dmarc records cause receivers to ignore DMARC completely.
Fix: Merge both reporting addresses into one record using a comma:
_dmarc TXT "v=DMARC1; p=quarantine; pct=100; rua=mailto:admin@example.com,mailto:abc123@dmarc-reports.cloudflare.net; adkim=r; aspf=r"
2. Exceeding the Recursive SPF 10-Lookup Limit
Your SPF record might look tiny (v=spf1 include:_spf.google.com include:sendgrid.net include:servers.mcsv.net ~all), only 3 includes—right?
Wrong. RFC 7208 counts recursive DNS lookups (include:, a, mx, ptr, exists:, redirect=) across every nested vendor record. A single marketing or CRM include: can expand into 4–5 nested lookups on its own. The moment the total hits 11, receiving mail servers throw PermError and fail SPF.
Always count lookups recursively before adding a new SaaS sender, and keep total lookups <= 8 for safety margin.
3. Never Migrate DNS Without a Before/After Cutover Snapshot
Manual visual comparison between GoDaddy and Cloudflare DNS tables is how MX records, DKIM keys, and domain verification TXT records silently vanish during a cutover.
A 2-step habit eliminates migration anxiety:
-
Before switching nameservers: Export a JSON snapshot of all live
NS,A,AAAA,MX,SPF,DMARC,DKIM,CAA, and verificationTXTrecords. -
Immediately after cutover: Diff live DNS against
before.jsonand fail loudly if a single critical record was dropped.
Automating All of This With Zero Dependencies
You don't even need dnspython or paid SaaS checkers—Python's standard library can query Cloudflare & Google DNS-over-HTTPS (DoH) directly in < 3 seconds.
I packaged the full workflow into DNSGuard v1.0.0 ($12 one-time, zero pip install dependencies):
-
7 DNS & Email Audits:
NSprovider detection,MXresolution & RFC-invalidMX -> CNAMEdetection, recursive SPF 10-lookup counter,DMARC, concurrent 13-selectorDKIMprobe (flags revokedp=keys),CAA, andMTA-STS. -
DNS Cutover Diff (
--compare before.json): Instantly flags any droppedMX,SPF,DMARC,DKIM,A/AAAA, orTXTrecord after switching nameservers. -
White-Label Bilingual HTML/PDF Reports (
EN / 繁體中文) + auto-generated Copy-Paste DNS Fix Records (Cloudflare/Namecheap/GoDaddy & BIND Zone formats) + GitHub Actions workflow.
Check it out here: https://taijibala.gumroad.com/l/sqfww
(And if you need free pre-launch Security Headers, robots.txt/sitemap.xml, or a 25-point launch checklist, those are free with zero login at https://webpulse.taijibala.com/)
What's the nastiest DNS or email deliverability bug you've ever had to untangle after a launch?
What's the nastiest DNS or email deliverability bug you've run into after a domain migration? Curious how everyone here verifies SPF/DKIM/DMARC before flipping nameservers.
Top comments (0)