Where to Put SPF, DKIM and DMARC for a Sending Subdomain
Short answer
Set SPF on the envelope domain the sender actually uses, DKIM at the signer’s selector under its signing domain, and DMARC for the visible From domain. A sending subdomain can inherit its organizational domain’s DMARC policy when it has no applicable record of its own.
By Xpoudy ·
Read the three domain identities from a test message
For a message from casey@news.example.com, capture the header From domain, the envelope domain reported by SPF and the DKIM signing domain. Those values may differ. The name in the From address is not enough to decide where the provider reads SPF or publishes a signing key.
Place records at the applicable names
| Purpose | Example hostname when all three use news.example.com |
|---|---|
| SPF | news.example.com |
| DKIM | google._domainkey.news.example.com for Google’s default selector |
| DMARC | _dmarc.news.example.com if this subdomain needs its own policy |
If your Cloudflare zone is example.com, a relative DKIM name can be google._domainkey.news. If news.example.com is delegated to its own zone, use its relative hostname instead. Copy record values from the provider operating each sender.
Verify the provider’s actual identity
Use Xpoudy’s alignment simulator to understand whether the test identities align under the chosen policy, then verify the public records and a newly received message. A subdomain can report a different result at strict alignment than at relaxed alignment. When you change a root policy, check its effect on other sending subdomains too.