Dev.to WebDev πŸ›  Dev πŸ‘ 0 πŸ“– 1 min read

Why are my emails going to spam? The DNS reasons, and how to fix them

Short answer: usually because your domain is missing SPF, DKIM or DMARC, so the big inboxes can't prove the email is really from you. The three records SPF: one TXT record listing every service allowed to s

Short answer: usually because your domain is missing SPF, DKIM or DMARC, so the big inboxes can't prove the email is really from you.

The three records

  • SPF: one TXT record listing every service allowed to send email as you.
  • DKIM: a signature on each email. You turn it on at your email provider, then add its record.
  • DMARC: required for bulk senders since February 2024. Start with p=none.

The most common reasons

  • No SPF record, or one that doesn't list the service you send from (your newsletter tool or website contact form, for example).
  • No DKIM signature, so the email can't be verified as untouched.
  • No DMARC record.
  • Two SPF records at once, which breaks both.
  • More than 10 DNS lookups in SPF, which makes SPF fail silently.
  • Your domain or sending server is on a blocklist.
  • Content and habits: sudden large sends, purchased lists, no unsubscribe link.

Fix it

  1. Check your domain's SPF, DKIM, DMARC and MX records and list what's missing, worst first.
  2. Add or correct the records at the company that runs your DNS.
  3. Start DMARC at p=none so nothing is blocked while you read the reports, then move to quarantine and reject.
  4. Send a test email to a free webmail address and open the full headers ("Show original" or "View source"). SPF, DKIM and DMARC should all say PASS.

DNS fixes remove the most common technical reasons, but each inbox provider still makes its own decision. Nobody can promise inbox placement.

First published on DNSFix. Check your own domain free at dnsfix.com.

πŸ“° Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.