DEV Community

Peter Park
Peter Park

Posted on

Why Your Cold Emails Land in Spam (And How to Fix It with Proper DNS Setup)

Cold email deliverability is the single biggest bottleneck for SaaS founders doing outbound. You can write the perfect email, target the right person, and still end up in spam.

Here's a practical, developer-friendly guide to fixing that.

The Three DNS Records You Need

1. SPF (Sender Policy Framework)

SPF tells receiving mail servers which IP addresses are allowed to send email on behalf of your domain.

v=spf1 include:_spf.google.com include:sendgrid.net -all
Enter fullscreen mode Exit fullscreen mode

Key points:

  • Use -all (hard fail) instead of ~all (soft fail) for stricter enforcement
  • Keep your SPF record under 10 DNS lookups (this is a hard limit)
  • Each include: counts as a lookup - consolidate where possible

2. DKIM (DomainKeys Identified Mail)

DKIM adds a cryptographic signature to your emails. The receiving server checks this signature against a public key published in your DNS.

selector._domainkey.yourdomain.com  TXT  "v=DKIM1; k=rsa; p=YOUR_PUBLIC_KEY"
Enter fullscreen mode Exit fullscreen mode

Most email providers generate the DKIM key pair for you. You just need to add the TXT record they give you.

3. DMARC (Domain-based Message Authentication)

DMARC ties SPF and DKIM together and tells receivers what to do when authentication fails.

Start with monitoring mode:

_dmarc.yourdomain.com  TXT  "v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com"
Enter fullscreen mode Exit fullscreen mode

Once you're confident everything is aligned, move to enforcement:

_dmarc.yourdomain.com  TXT  "v=DMARC1; p=reject; rua=mailto:dmarc@yourdomain.com"
Enter fullscreen mode Exit fullscreen mode

Beyond DNS: Warm-Up Basics

Even with perfect DNS, a brand-new domain sending 500 emails on day one will get flagged. Here is a reasonable warm-up schedule:

Week Daily Volume Notes
1 5-10 Send to known contacts who will reply
2 15-25 Mix of warm contacts and cold
3 30-50 Gradually increase cold ratio
4+ Scale based on bounce/spam rates Monitor closely

Quick Checklist

  • SPF record published with -all
  • DKIM signing enabled and DNS record verified
  • DMARC set to at least p=none with reporting
  • Domain is at least 2 weeks old before sending cold
  • Warm-up period of 3-4 weeks before full volume
  • Bounce rate staying under 3%
  • Unsubscribe link included in every email

Tools to Verify Your Setup


We built ColdMailAI to help founders generate personalized cold emails that follow deliverability best practices. The technical setup above is the foundation, but the content of your email matters just as much.

If you have questions about email authentication or deliverability, drop them in the comments.

Top comments (1)

Collapse
 
packetexchange profile image
Packet Exchange •

Good call on starting DMARC at p=none before enforcing. Plenty of people jump straight to reject and then wonder where their mail went.

One thing worth adding is alignment. A lot of providers sign DKIM with their own domain by default, so SPF and DKIM can both pass and DMARC still fails because neither matches the From domain. The aggregate reports show it quickly.

How long do you usually leave it on p=none before moving to enforcement?