Skip to content
YHP DMARC

Understanding DMARC

What is DKIM?

DKIM signs each message so receivers can confirm it came from you and was not changed on the way.

DKIM (DomainKeys Identified Mail) adds a cryptographic signature to each message. The sending server signs selected headers and the body with a private key, and publishes the matching public key in DNS. The receiver fetches the key and checks the signature.

If the signature is valid, the receiver knows two things: the message was sent by someone holding the private key for the signing domain, and the signed parts were not changed on the way.

Selectors

A domain can have many keys, one per service or per rotation. Each is published under a selector:

selector1._domainkey.example.com  TXT  "v=DKIM1; k=rsa; p=MIIBIjANBgkqh..."

The selector in use appears as s= in the message's DKIM-Signature header, next to the signing domain in d=. You can look up any key with the DKIM inspector.

Why DKIM matters for DMARC

  • It survives forwarding. Unlike SPF, a signature stays valid when a message is relayed, as long as nothing modifies it.
  • It must be your domain. Many services sign with their own domain by default (d=sendgrid.net). That passes DKIM but does not align with your From address. Set up "custom domain" or "branded" DKIM at each service so it signs as you.

Good practice

  • Use 2048-bit RSA keys. 1024-bit keys still work but are no longer recommended.
  • Rotate keys periodically, and revoke old ones by publishing an empty p=.
  • Remove t=y (testing mode) once signing works.

See it on your own domain.

Check your DMARC, SPF and DKIM setup in seconds, then let us watch your reports for you.

Start free