Skip to content

Glossary

DKIM: signing email so it can be verified

DKIM (RFC 6376) adds a cryptographic signature to each email, checked against a public key in DNS. How selectors work and why signatures sometimes break.

Updated 2026-11-23

DKIM, DomainKeys Identified Mail, attaches a cryptographic signature to an email so a receiver can check two things: that the message was authorized by the signing domain, and that the signed parts did not change in transit. It is specified in RFC 6376.

How it works

The sending system holds a private key and signs a hash of chosen headers and the body. The result goes into a DKIM-Signature header. The matching public key sits in DNS as a TXT record.

DKIM-Signature: v=1; a=rsa-sha256; d=example.com; s=mail2026;
  h=from:to:subject:date; bh=...; b=...
mail2026._domainkey.example.com.  IN  TXT  "v=DKIM1; k=rsa; p=MIIBIjANBgkq..."
Tag Meaning
d= Signing domain
s= Selector, locates the key
h= Headers covered by the signature
bh= Hash of the body
b= The signature

The receiver builds the key's DNS name from s= and d=, fetches it, and verifies. A pass means the signature matches. It does not by itself mean the message is wanted: spammers can sign mail with their own domains.

Practical points:

  • Key length. Use 2048-bit RSA keys; 1024 is the minimum RFC 8301 allows for verifiers to accept, and 512 is no longer valid.
  • Rotation. Publish a new selector, switch signing, then retire the old one.
  • Third-party senders. Each email service signs with its own selector, published in your DNS through the records it gives you.
  • Alignment. DMARC requires the d= domain to align with the visible From domain.

DKIM complements SPF: SPF authorizes servers, DKIM authorizes content. DKIM survives forwarding, SPF usually does not.

Check a selector with the DKIM checker.

Why it matters for validation

Qelka's email API does not validate your DKIM, since a selector is needed to find a key and the address alone does not give it. The domain object reports spf and dmarc presence only. Use DKIM tooling for your own sending domain, and the DKIM checker for a selector you know.

DKIM matters indirectly for the addresses you validate. A list is only useful if your mail reaches the inbox, and unsigned or misaligned mail from your own domain increases the chance it is filtered, which hurts sender reputation and deliverability. Verify addresses to cut bounces, authenticate your mail to land in the inbox: the two work together.

Setup steps are in the guide SPF, DKIM and DMARC.

Frequently asked questions

What is DKIM?
DKIM, DomainKeys Identified Mail, is an email authentication method defined in RFC 6376. The sending server signs selected headers and the body with a private key and adds the signature to the message. The receiver fetches the matching public key from DNS and checks that the message was not altered and that the signing domain approved it.
What is a DKIM selector?
The selector is a label that points to one public key in DNS. The signature names it in the s= tag and the domain in d=, and the key is published at selector._domainkey.domain. Selectors let a domain run several keys at once, for example one per email provider, and rotate them without downtime.
Why does a DKIM signature fail?
The usual causes are a message changed after signing, such as a mailing list footer; a missing or wrong public key in DNS; a selector that does not exist; or an expired or too short key. Forwarding rarely breaks DKIM, which is one reason it holds up better than SPF.

Put this check in your product

Get an API key in under a minute. 100 free credits every month, no card required.

  • 100 free credits a month
  • No card
  • Test keys spend nothing
  • Cancel any time