proCodex AI
Business Messaging

Why Your Emails Go to Spam: SPF, DKIM and DMARC Explained

OTPs, invoices and order updates are useless if they land in spam. Email authentication — SPF, DKIM and DMARC — is the foundation of reliable delivery. Here is what each one does.

By proCodex AI Team6 min read

When customers say "I never got the email", the message was often delivered — straight to the spam folder. Mailbox providers like Gmail and Outlook decide where an email goes based largely on whether they can verify who sent it. Three DNS records do that job: SPF, DKIM and DMARC.

The three records in plain language

RecordWhat it doesAnalogy
SPFLists the servers allowed to send email for your domainA guest list at the door
DKIMAdds a digital signature proving the email wasn't alteredA tamper-proof seal on the envelope
DMARCTells receivers what to do if SPF/DKIM fail, and sends you reportsThe policy the security guard follows

What Gmail and Yahoo require

Since February 2024, Gmail and Yahoo require bulk senders (Google defines these as domains sending around 5,000 or more messages a day to Gmail addresses) to authenticate with SPF and DKIM, publish a DMARC record, offer one-click unsubscribe in marketing emails, and keep spam complaint rates low. Even if you send less, following the same rules improves delivery.

Setting it up: the steps

  1. List every service that sends email as your domain — your mail provider, website, CRM, invoicing tool and transactional email service.
  2. Publish one SPF record that includes all of them. A domain should have only one SPF record.
  3. Enable DKIM in each sending service and add the DNS records it gives you.
  4. Add a DMARC record starting with a monitoring policy (p=none), review the reports, then move to quarantine or reject once everything legitimate passes.
  5. Use a separate subdomain for marketing email, so campaign complaints don't hurt your transactional messages.

Other deliverability habits

  • Send transactional emails (OTPs, invoices) through a dedicated transactional email service.
  • Only email people who asked for it, and remove addresses that bounce.
  • Keep a consistent sender name and address.
  • Avoid image-only emails and misleading subject lines.
  • Monitor bounce, complaint and open rates after every change.

Emails landing in spam? See our email integration service or contact us.

Frequently asked questions

What is the difference between SPF, DKIM and DMARC?

SPF lists which servers may send email for your domain, DKIM signs each email to prove it wasn't altered, and DMARC tells receiving servers what to do when those checks fail and sends you reports.

Do I need DMARC if I send only a few emails?

It is strongly recommended. DMARC protects your domain from being spoofed and improves the chance that your legitimate emails reach the inbox.

Why do my OTP emails go to spam?

Common causes are missing or broken SPF/DKIM records, no DMARC policy, sending from a shared or poorly reputed server, or mixing marketing and transactional email on the same domain.

Need help with this?

Our senior team can scope it with you in a free 30-minute call — no salespeople, no pressure.

Have an idea? Let's turn it into a product users love.

Tell us where you want to go. We'll bring the senior team, the process, and the craft to get you there.

  • Free 30-min consultation
  • NDA on request
  • Reply within 24h