DKIM keys should rotate at least once a year, and immediately after any host compromise. The mistake we see most often during cPanel handovers is a rotation that replaces the active selector in one move: the new public key is published, the new private key signs every outbound message, but mail already in receiver queues — bounces, list digests, anything held for greylisting — still references the old selector. Those messages now fail DKIM, and DMARC fails alongside them.
What’s happening
DKIM signatures embed a selector (s=) and the signing domain (d=) in the message header. The receiver fetches <selector>._domainkey.<domain> to retrieve the public key and verify. cPanel’s WHM Email Deliverability UI lets you generate a new key per domain, but it overwrites the active selector by default. Any message signed with the previous key that is still in transit — or that a receiver re-evaluates from an archive — fails verification.
How to verify
Before rotating, confirm the current selector and signing domain on a recent outbound message header:
DKIM-Signature: v=1; a=rsa-sha256; d=example.com; s=default; ...
Then check what’s actually published in DNS for that selector:
dig +short TXT default._domainkey.example.com
After rotation, the old TXT record should remain resolvable for at least 48 hours alongside the new one.
The fix
- Generate the new key under a new selector name, not under
default. Use a dated selector likecp2026aso rotation history is self-documenting. - Publish both records in DNS before flipping Exim to sign with the new selector. Confirm propagation with
dig +short TXT cp2026a._domainkey.example.comfrom at least two resolvers. - Switch the active signing selector in WHM > Email Deliverability or via
whmapi1once both records resolve. Send a test message and inspect the header to confirms=cp2026a. - Leave the old selector record in DNS for 48 hours minimum, longer if you send heavy list mail with delayed retries. Then delete it.
- Document the rotation with date, selector, and key length in your domain record so the next operator knows when to rotate again.
For environments where dozens of cPanel-hosted domains need synchronized key rotation, Stack Harbor handles it as part of deployment management on a calendar you actually see.