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:

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 domainAuthenticated domainRelaxedStrict
news.example.comDKIM d=news.example.comAlignedAligned
news.example.comDKIM d=mailer.example.comAligned (same Organizational Domain)Not aligned
news.example.comSPF bounce.news.example.comAlignedNot aligned
news.example.comDKIM d=esp.example.net (the provider's domain)Not alignedNot 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):

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:

  1. 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.
  2. Publish SPF where the envelope domain is, or the CNAME your provider gives you for it. One record per name, within ten lookups; include: and redirect= can reuse another domain's policy.
  3. Publish the DKIM key under the d= domain with the selector the provider gives you, and make sure d= aligns with your From domain, not only with the provider's domain.
  4. Decide the DMARC policy. Either rely on the Organizational Domain's sp and np, or publish a record for the subdomain. Have aggregate reports sent (rua) and read them before tightening (DMARC aggregate reports).
  5. 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.

Sources

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.

Get up to 500 free credits. No card needed.

New accounts get 500 free credits (100 when you sign up with a free email provider such as Gmail, Outlook or Yahoo, another personal mailbox such as a paid one like Fastmail or one from your internet provider, or an address from a relay or alias service). Try it on your own list before you buy.

Updated · Maintained by: Email Validation LLC