Guide · Authentication: SPF, DKIM, DMARC
Sending from a subdomain: how SPF, DKIM and DMARC treat it
Sending from a subdomain such as news.example.com keeps a mail stream apart from your main domain, but each authentication method treats the subdomain differently. SPF is checked on the exact envelope domain, with no fallback to the parent. DKIM looks up the key under the d= domain of the signature, whatever the From address says. DMARC is the one that reaches up: if the subdomain publishes no record, the receiver looks for the Organizational Domain's and, if it finds one, applies its sp or np policy. With the default relaxed alignment, a signature from mailer.example.com aligns with mail from news.example.com; a pass for your provider's own domain does not.
- Reading time
- 6 min
SPF: one record per envelope domain
SPF checks the domain of the SMTP MAIL FROM address, the envelope sender (section 2.4), and can also check the HELO name (section 2.3). When the envelope sender is empty, as on a bounce, SPF checks postmaster@ the HELO name (RFC 7208, section 2.4).
The receiver queries TXT records for that exact domain (section 4.4). If there is no SPF record there, the result is none (section 4.5); RFC 7208 describes no lookup at the parent domain. A record on the subdomain can still reuse another domain's policy, with an include: mechanism (section 5.2) or a redirect= modifier (section 6.1), and the TXT lookup follows a CNAME, which is how many providers set up a return-path subdomain. So if your provider uses bounce.news.example.com as the envelope sender, that name needs its own SPF record or the CNAME your provider gives you; a record at example.com does not cover it, and a working CNAME should not be replaced by a hand-written record. An include: counts only the other record's pass; its -all or ~all does not apply to your mail, so a record built from include: needs its own all at the end (section 5.2). Without a match or redirect=, the result is neutral (section 4.7).
Two limits apply:
- One record per name. A domain name must not have more than one SPF record; if a receiver finds more than one, the result is
permerror(sections 3.2 and 4.5). - Ten lookups. The
include,a,mx,ptrandexistsmechanisms and theredirectmodifier count toward a limit of 10 for the whole check, counting every nestedincludeandredirect;all,ip4andip6do not (section 4.6.4). See the SPF 10-lookup limit.
DKIM: the key lives under the signing domain
A DKIM signature names a signing domain in d= and a selector in s=. The verifier fetches the public key from <selector>._domainkey.<d= domain> (RFC 6376, section 3.6.2.1). The From address does not change where the key is looked up: a message from news.example.com signed with d=mailer.example.com uses the key under mailer.example.com.
Separate selectors per stream or provider make rotation easier (DKIM selectors and key rotation), but a selector has no effect on alignment. For RSA keys, RFC 8301 (section 3.2) says signers must use at least 1024 bits and should use at least 2048, and verifiers must not accept signatures with shorter keys.
DMARC: alignment and the policy a subdomain gets
RFC 9989, published in May 2026, is the current DMARC standard; it obsoletes RFCs 7489 and 9091. A message passes DMARC when at least one authenticated identifier, from SPF or DKIM, aligns with the From domain (sections 4.4.1 and 5.3.5).
Relaxed and strict alignment. In relaxed mode, two domains align when they share an Organizational Domain; in strict mode they must be identical (sections 3.2.10.1 and 3.2.10.2). Relaxed is the default for both adkim and aspf (section 4.7).
| From domain | Authenticated domain | Relaxed | Strict |
|---|---|---|---|
news.example.com | DKIM d=news.example.com | Aligned | Aligned |
news.example.com | DKIM d=mailer.example.com | Aligned (same Organizational Domain) | Not aligned |
news.example.com | SPF bounce.news.example.com | Aligned | Not aligned |
news.example.com | DKIM d=esp.example.net (the provider's domain) | Not aligned | Not aligned |
Which policy applies. The receiver first looks for a DMARC record at the From domain itself, for example _dmarc.news.example.com. If it finds none, it performs a DNS Tree Walk up the name to find the Organizational Domain's record (section 4.10.1). That record's tags state the policy the domain owner prefers for the subdomain (section 4.7); the receiver makes the final decision (section 5.3.6):
spis the policy for existing subdomains.npis the policy for subdomains that do not exist in DNS. Withoutnp,spapplies; without either,p.papplies to the domain itself and to subdomains when neither of the others applies.
A subdomain with its own _dmarc record uses that record's p instead. That lets a new stream start at p=none while the parent stays at reject, or the other way round. Reaching reject safely is covered in DMARC from p=none to p=reject.
A checklist for a new sending subdomain
These are our recommendations:
- List each stream. For every provider, write down the visible From domain, the envelope sender (Return-Path) domain and the DKIM
d=domain it will use. - Publish SPF where the envelope domain is, or the CNAME your provider gives you for it. One record per name, within ten lookups;
include:andredirect=can reuse another domain's policy. - Publish the DKIM key under the
d=domain with the selector the provider gives you, and make sured=aligns with your From domain, not only with the provider's domain. - Decide the DMARC policy. Either rely on the Organizational Domain's
spandnp, or publish a record for the subdomain. Have aggregate reports sent (rua) and read them before tightening (DMARC aggregate reports). - Check a real message. Send to a mailbox you control and read its Authentication-Results header for the actual
d=, SPF domain and DMARC result.
Questions
Does my root domain's SPF record cover my subdomains?
No. SPF is checked on the exact envelope domain, and if that name has no SPF record the result is none. Give each envelope domain you send from its own SPF record, which can reuse another policy with include: or redirect=, or the CNAME your provider gives you.
Do I need a DMARC record for every subdomain?
No. Without one, the receiver walks up to the Organizational Domain's record and applies its sp or np policy, or p if neither is set. If no record applies at all, no DMARC policy does either. Publish a subdomain record only when it needs a different policy or reporting.
Will mail signed with my provider's domain pass DMARC?
Only if another identifier aligns. A DKIM pass for a domain outside your Organizational Domain does not align with your From domain, so you need DKIM with your own domain or an aligned envelope sender.
Try it
Check your record with the DMARC checker and build an SPF record with the SPF generator. To check that recipients' addresses can receive mail, use the free email checker.
Related
- Glossary: SPF, DKIM and DMARC.
- Envelope sender vs. From: which address SPF and DMARC look at.
Related guides
- Moving DMARC from p=none to p=reject
- The SPF 10-lookup limit explained
- DKIM selectors and key rotation
- SMTP envelope sender vs. From header: which address goes where?
- How to read DMARC aggregate reports
- All guides
Sources
- IETF: RFC 7208, SPF: sections 2.3 (HELO), 2.4 (MAIL FROM and the empty sender), 3.2 and 4.5 (one record;
noneandpermerror), 4.4 (the lookup), 4.6.4 (ten lookups), 5.2 (include), 4.7 (the default result), 6.1 (redirect). - IETF: RFC 1034, Domain names: concepts and facilities: section 3.6.2 (aliases and canonical names: a lookup follows a CNAME).
- IETF: RFC 6376, DKIM: section 3.6.2.1 (where the key is published).
- IETF: RFC 8301, DKIM cryptographic algorithm and key usage update: section 3.2 (RSA key sizes).
- IETF: RFC 9989, DMARC (May 2026): sections 3.2.10 (alignment), 4.4.1 and 5.3.5 (passing), 4.7 (
p,sp,np,adkim,aspf), 4.10.1 (the DNS Tree Walk), 5.3.6 (the receiver decides).
How we wrote this: drafted by the email-validation.org team with the help of AI writing tools, from our product documentation and the sources linked in the text.