# Sending From a Subdomain: SPF, DKIM and DMARC

URL: https://email-validation.org/guides/subdomain-email-authentication/
Updated: 2026-11-30

> Documentation index: https://email-validation.org/llms.txt

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.

## 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](https://www.rfc-editor.org/info/rfc7208/), 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`, `ptr` and `exists` mechanisms and the `redirect` modifier count toward a
  limit of 10 for the whole check, counting every nested `include` and `redirect`; `all`, `ip4` and `ip6` do not
  (section 4.6.4). See
  [the SPF 10-lookup limit](https://email-validation.org/guides/spf-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](https://www.rfc-editor.org/info/rfc6376/), 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](https://email-validation.org/guides/dkim-selectors-key-rotation/)), but a selector has no effect on
alignment. For RSA keys, [RFC 8301](https://www.rfc-editor.org/info/rfc8301/) (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](https://www.rfc-editor.org/info/rfc9989/), 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):

- **`sp`** is the policy for existing subdomains.
- **`np`** is the policy for subdomains that do not exist in DNS. Without `np`, `sp` applies; without either, `p`.
- **`p`** applies 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](https://email-validation.org/guides/dmarc-none-to-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](https://email-validation.org/guides/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](https://email-validation.org/tools/dmarc-checker/) and build an SPF record with the
[SPF generator](https://email-validation.org/tools/spf-generator/). To check that recipients' addresses can receive mail, use the free
[email checker](https://email-validation.org/email-checker/).

## Related

- [Glossary: SPF, DKIM and DMARC](https://email-validation.org/glossary/#spf-dkim-dmarc).
- [Envelope sender vs. From](https://email-validation.org/guides/smtp-envelope-sender-vs-from/): which address SPF and DMARC look at.

## Related guides

- [Moving DMARC from p=none to p=reject](https://email-validation.org/guides/dmarc-none-to-reject/)
- [The SPF 10-lookup limit explained](https://email-validation.org/guides/spf-lookup-limit/)
- [DKIM selectors and key rotation](https://email-validation.org/guides/dkim-selectors-key-rotation/)
- [SMTP envelope sender vs. From header: which address goes where?](https://email-validation.org/guides/smtp-envelope-sender-vs-from/)
- [How to read DMARC aggregate reports](https://email-validation.org/guides/dmarc-aggregate-reports/)
- [All guides](https://email-validation.org/guides/)

## Sources

- [IETF: RFC 7208, SPF](https://www.rfc-editor.org/info/rfc7208/): sections 2.3 (HELO), 2.4 (MAIL FROM and the
  empty sender), 3.2 and 4.5 (one record; `none` and `permerror`), 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](https://www.rfc-editor.org/info/rfc1034/): section 3.6.2
  (aliases and canonical names: a lookup follows a CNAME).
- [IETF: RFC 6376, DKIM](https://www.rfc-editor.org/info/rfc6376/): section 3.6.2.1 (where the key is published).
- [IETF: RFC 8301, DKIM cryptographic algorithm and key usage update](https://www.rfc-editor.org/info/rfc8301/):
  section 3.2 (RSA key sizes).
- [IETF: RFC 9989, DMARC](https://www.rfc-editor.org/info/rfc9989/) (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._

## 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. [Create your account](https://email-validation.org/signin/?new=1) or [open the free email checker](https://email-validation.org/email-checker/).
