Overview
Publish SPF, DKIM, and DMARC records that align with your From domain before the first transactional email; mailbox providers send unauthenticated mail to spam whatever its content. This standard applies to any provider (Resend, Postmark, AWS SES), whose dashboard shows the exact record values. Add the records at your DNS host: cloudflare-dns or namecheap-dns.
Send from a dedicated subdomain
Use mail.example.com or send.example.com as the sending identity so complaints against one stream do not damage the root domain that serves your site and corporate mail. Verify the subdomain in your provider and send from noreply@mail.example.com.
Publish exactly one SPF record
SPF is one TXT record that lists the servers allowed to send for the domain. Two v=spf1 records are a permanent error and SPF fails (dmarc.org).
mail.example.com. TXT "v=spf1 include:amazonses.com ~all"Use the provider’s include value. ~all is softfail and -all is hardfail. SPF evaluation allows at most 10 DNS-querying terms (include, a, mx, redirect); more is a permanent error, so flatten or drop unused includes. Providers usually also ask for an MX record on the sending subdomain to process bounces (Resend).
Publish the provider’s DKIM keys and confirm they verify
DKIM signs each message with a key the provider holds; receivers fetch the public key from DNS. Add the provider’s records exactly as shown (AWS SES Easy DKIM issues three CNAMEs, per its docs; Postmark issues a TXT record). Do not send production mail until the provider reports DKIM verified, or messages go out unsigned.
xxxx._domainkey.mail.example.com. CNAME xxxx.dkim.amazonses.com.Publish DMARC at p=none, then raise the policy
DMARC tells receivers what to do when SPF and DKIM fail to align, and where to send reports.
_dmarc.mail.example.com. TXT "v=DMARC1; p=none; rua=mailto:dmarc@example.com"Start at p=none to collect aggregate reports without affecting delivery. Read them, confirm every real sender passes, then move to p=quarantine and finally p=reject (dmarc.org). p=none only reports; spoofed mail is blocked only once the policy enforces. RFC 9989 (May 2026) replaced RFC 7489: it removes the pct tag, adds np, psd, and t, and finds policy by walking up the DNS tree instead of using the Public Suffix List. Stage a rollout by sending domain and policy level rather than by pct.
Make DKIM and SPF align with the From domain
DMARC passes only when SPF or DKIM passes and its domain aligns with the From header domain. Relaxed alignment (the default) accepts a subdomain match, so mail.example.com aligns with example.com; strict requires identical domains. DKIM aligns when the signing d= domain matches the From domain. SPF aligns when the Return-Path (MAIL FROM) domain does, which is why providers offer a custom return-path domain. Bounces usually route through a subdomain such as pm-bounces.example.com, so strict SPF alignment (aspf=s) fails; leave adkim and aspf unset. The classic failure is SPF passing on the provider’s bounce domain while DMARC fails because nothing aligns.
Meet the Gmail and Yahoo bulk-sender rules
Since 2024-02-01, senders of more than 5,000 messages per day to Gmail must have SPF and DKIM, a DMARC policy (at least p=none) with the From domain aligned to SPF or DKIM, and one-click unsubscribe (RFC 8058) on marketing and subscribed mail. Yahoo applies the same rules to bulk senders without a published volume threshold, and requires honoring unsubscribes within 2 days. All senders need valid forward and reverse DNS, TLS, and an RFC 5322 compliant message, and should keep the spam rate in Google Postmaster Tools below 0.10% and never reach 0.30%. Since 2025-05-05 Microsoft requires SPF, DKIM, and DMARC from high-volume senders (over 5,000 messages per day) to Outlook.com, Hotmail.com, and Live.com, and rejects non-compliant mail with 550 5.7.515. Transactional mail such as password resets does not need an unsubscribe link, but it still needs full authentication.
Warm up a new domain gradually
A new domain has no reputation. Ramp volume over days to weeks, start with engaged recipients, and watch bounce and complaint rates.
Related
- cloudflare-dns and namecheap-dns: where to add the TXT, CNAME, and MX records.
- secrets-and-env: store provider API keys outside source control.
- webhooks: handle provider bounce and complaint webhooks.
- auth-sessions: transactional email backs password reset and magic-link flows.
- launch-a-new-site: deliverability setup as part of launch.