Why DKIM rotation needs an overlap
DomainKeys Identified Mail (DKIM) lets a mail system add a signature to an outgoing message. The signature identifies a signing domain and a selector. A receiving system uses those values to find a public key in DNS and check the signature. The corresponding private key stays with the sender’s signing system; it must never be placed in a DNS record.
A selector is a label for a key, not a setting that automatically updates messages already sent. For example, a message signed with selector old1 for example.com points a verifier toward a TXT record at old1._domainkey.example.com. Publishing a new key at new1._domainkey.example.com does not change that message. If the old DNS record disappears, a delayed message or one checked again later may no longer be verifiable with that key.
The safe pattern is therefore to overlap two selectors. Keep the old public key published while the signer begins using a newly published key. Once messages signed with the old selector are no longer likely to need verification, the old record can be retired.
Prepare the new selector before changing the signer
Start by finding every system that signs mail for the domain. A hosted mailbox service, marketing platform, help desk, or application sender may each use a different selector. Record which system uses the selector you intend to rotate. Do not assume that changing a record for one sender rotates the keys used by the others.
Generate a new key pair through the signing service or mail system, using its supported settings. Choose a new, distinct selector rather than replacing the public key under the old selector. The provider or signing software should tell you the exact DNS name and TXT value to publish. Check the domain and selector carefully: a correct key at the wrong DNS name will not help a receiver verify the signature.
Publish the new TXT record while leaving the old one untouched. Confirm that a DNS lookup for the new selector returns the expected public key. DNS changes can take time to reach resolvers that have cached an earlier answer, so allow for the record’s TTL and the behavior of the systems involved before switching production signing. Keep private keys and account credentials out of screenshots, tickets, and DNS examples.
Switch signing and check actual messages
After the new public key is available, configure the relevant sender to sign with the new selector. Send test messages through each affected mail route, not just from a single mailbox if several systems send on the domain’s behalf. Inspect the DKIM-Signature header or the recipient’s authentication results to confirm that the intended selector and signing domain appear and that verification passes.
Check the message as received, rather than relying only on a signing service’s configuration screen. A message can be changed by later processing in ways that invalidate its DKIM signature. If a test fails, verify the DNS record name and value, the selector and domain in the signature, and whether downstream handling altered the signed content. Avoid removing the old record as a troubleshooting shortcut.
If you use DMARC, also check whether the passing DKIM signature uses a domain aligned with the visible From domain. A DKIM pass for an unrelated signing domain does not, by itself, establish DKIM alignment for DMARC. This is a separate check from confirming that the new key works.
Decide when to retire the old public key
There is no universal waiting period for removing an old DKIM record. Consider how long mail from that sender might remain queued, how your recipients or archives handle later verification, and any retention practices relevant to your organization. Keeping the old public key published does not let someone sign new mail unless they also possess the old private key, but a compromised old private key is a reason to shorten the overlap and follow an incident response plan.
Before removal, confirm that no sender is still signing with the old selector. Check each affected service and, where practical, inspect recent messages from its normal sending paths. Then remove only the old selector’s DNS record. Leave the new selector in place and verify that new mail continues to pass DKIM checks.
Document the selector names, which services use them, and the order of the change. That small record makes the next rotation easier and helps prevent an old key from being removed while a forgotten sender still depends on it. The essential sequence is simple: publish the new public key, switch signing, verify delivered mail, and retire the old public key only after its remaining use has been considered.



