Why a subdomain
Mailbox providers judge a sender partly by the domain's history. Marketing mail draws more complaints than receipts and password resets, so keeping it on its own subdomain means a bad campaign doesn't drag down the mail your product depends on. Resend, for one, recommends sending from a subdomain to "isolate your sending reputation". Use a subdomain of the domain people know, like news.example.com, not a lookalike such as example-news.com, which looks suspicious to filters and readers alike.
One caution: reputation isn't fully separate. Gmail's FAQ counts subdomains together toward the 5,000-a-day bulk sender line, and your organisational domain's DMARC policy applies to subdomains that don't publish their own.
What each record does
| Record | What it proves | Where it lives |
|---|---|---|
| SPF | This server may send mail whose return path (envelope sender) is this domain | A TXT record on the return-path domain |
| DKIM | This message was signed by a key published under this domain, and wasn't changed | A TXT record at <selector>._domainkey.<domain> |
| DMARC | The visible From domain matches a domain that passed SPF or DKIM, and what to do if not | A TXT record at _dmarc.<domain> |
SPF and DKIM each check a domain, but not necessarily the one your readers see. DMARC ties them to the From address: it passes when SPF passes and its domain aligns with the From domain, or DKIM passes and its signing domain aligns. Relaxed alignment, the default, counts a subdomain of the same organisational domain as aligned.
Step by step
1. Add the domain at your provider
Add news.example.com (or your choice) in your sending service. It will show you the exact records to publish. The values below are examples of the shape; always copy yours from the provider.
2. Publish the DKIM key
DKIM (example)
Type: TXT Name: resend._domainkey.news.example.com Value: p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQ…
The part before ._domainkey is the selector your provider uses. Gmail asks for keys of at least 1024 bits and recommends 2048. Some DNS hosts split long TXT values into 255-character strings; that's normal.
3. Set up the return path: MX and SPF
Bounces come back to the return-path address, not your From address. Providers ask you to point a host under your domain at their bounce servers, and publish SPF on that same host.
Return path (example, for a provider sending through Amazon SES)
Type: MX Name: send.news.example.com Value: feedback-smtp.us-east-1.amazonses.com Priority: 10 Type: TXT Name: send.news.example.com Value: v=spf1 include:amazonses.com ~all
SPF is checked on the return-path domain, so it goes on send.news.example.com, not on your root domain. That also keeps you clear of SPF's limit of ten DNS lookups on the root record, which fills up fast once you add a few services.
4. Publish DMARC
DMARC (to start)
Type: TXT Name: _dmarc.news.example.com Value: v=DMARC1; p=none; rua=mailto:[email protected]
p=none asks receivers to deliver as usual and send you reports, which is what Gmail, Yahoo and Outlook's bulk sender rules require at a minimum. The rua address receives daily aggregate reports: XML files listing which servers sent mail as your domain and whether it passed. If the report address is on a different domain from the one in the record, that domain has to publish a record agreeing to receive them (RFC 7489, section 7.1).
5. Wait, then verify
DNS changes usually show within minutes to an hour, sometimes longer. Your provider will mark the domain verified once it sees the records. Then send a real message to a Gmail address and open Show original. You want to see:
What a passing message shows
SPF: PASS with domain send.news.example.com DKIM: 'PASS' with domain news.example.com DMARC: 'PASS'
Reading your DMARC reports
Aggregate reports arrive as compressed XML, usually once a day from each large mailbox provider. Each record in one says: this IP sent this many messages claiming to be from your domain, and here is how SPF, DKIM and DMARC came out for them (RFC 7489, section 7.2). You don't need to read the XML by hand; a free report viewer or a spreadsheet will do. What you're looking for:
- Your provider's servers, passing. The bulk of your volume should show DKIM pass with your domain and DMARC pass. If it doesn't, the DKIM record is missing or mistyped.
- Other services you forgot. A help desk, a billing tool or a CRM sending as your domain. Each needs its own DKIM key under your domain before you tighten the policy, or its mail will start failing.
- Forwarded mail. Messages forwarded by a mailing list or a university account often fail SPF and keep DKIM. That's expected, and one reason DKIM matters more.
- Strangers. Unknown IPs sending as your domain, failing everything, are usually spoofing. They are what a stricter policy stops.
Give it two to four weeks of reports covering your normal sending, including a campaign, before you change anything.
Moving DMARC beyond p=none
p=none meets the rules but doesn't stop anyone pretending to be you. Once a few weeks of reports show every real source of your mail passing, move on in steps:
p=quarantine; pct=25: a quarter of failing mail goes to spam. Watch the reports for anything legitimate failing.p=quarantinefor all failing mail.p=reject: failing mail is refused outright.
A subdomain inherits the root domain's policy unless it publishes its own, and the root record can set a separate subdomain policy with sp=. If your root domain is already at p=reject, check your sending subdomain passes before your first campaign.
Common mistakes
- Two SPF records on one name. SPF allows one; two is a permanent error. Merge them into one
v=spf1record. - DKIM passes with the provider's domain. It passes but doesn't align. Publish your own DKIM key so mail is signed as your domain.
- Publishing the full name where the host wants only the prefix. Many DNS panels add your domain for you, so
send.news.example.combecomessend.news.example.com.example.com. Entersend.newsif your panel works that way. - A CNAME at the same name as a TXT or MX. A name with a CNAME can't hold other records.
- Forgetting reverse DNS and TLS. Gmail asks every sender for valid forward and reverse DNS and TLS. Hosted providers handle these; your own server has to.