Guide
What is DKIM?
DKIM (DomainKeys Identified Mail) signs every email you send with a private key. Receivers check the signature against a public key in your DNS, proving the message really came from your domain and wasn't altered on the way.
How DKIM works
- Your mail system signs each outgoing message with a private key only it holds.
- The signature is added to the message headers, naming your domain (
d=) and a selector (s=). - The receiving server looks up the public key at
selector._domainkey.yourdomainin DNS and checks the signature.
What the DNS record looks like
selector1._domainkey.example.co.uk TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqh..."
Some providers, including Microsoft 365, ask you to publish a CNAME to a key they host instead, so they can rotate keys for you.
Selectors
A selector is just a label that lets a domain have several DKIM keys at once, for example one per sending service. Microsoft 365 uses two, selector1 and selector2, so it can rotate keys without a break.
Why DKIM matters
- It survives forwarding. SPF breaks when a message is forwarded; a DKIM signature usually doesn't.
- It is what DMARC leans on. DMARC passes if SPF or DKIM passes and aligns with your From domain, and DKIM is the more dependable of the two.
- It protects the message. A changed message fails the signature check.
Common problems
- DKIM never switched on, so mail is signed with the provider's own domain and doesn't align.
- A third-party sender (newsletters, invoicing) not set up to sign with your domain.
- A key that was replaced or removed in DNS but is still used for signing.
For Microsoft 365, follow how to enable DKIM. The free domain check tests both selectors.
Common questions
Is DKIM the same as DMARC?
No. DKIM signs messages. DMARC is the policy that uses DKIM and SPF results to decide what to do with failing mail, and reports back to you.
Do I need DKIM if I have SPF?
Yes. SPF alone fails on forwarded mail, and DMARC is most reliable when DKIM is in place.