Free 7-step checklist and PDF
DKIM keys: how to swap one without breaking your mail
For: anyone about to rotate a DKIM key or move to a new email marketing tool. The person who inherited the DNS from a developer long gone, a marketer told "the key needs changing", or a sender whose DKIM fails on some mail and not the rest.
- The seven checks in the order a safe swap happens, open on this page.
- Tick each step as you go. Your ticks stay in this browser.
- Your ticks and your row as a PDF, with room to note each selector and its date.

The 60-second answer
Never swap a key in place. Publish the new key on a new selector beside the old one, switch signing to it, and only then retire the old one.
Make the new key 2048-bit. 1024-bit keys are now considered weak.
Keep the old key in DNS for 48 hours after you switch, because mail already on its way was signed with it.
Every explanation on this page comes from the Email Almanac, our own library of more than 4,000 answers about email. You do not have to buy anything to read it.
- You get one email.It comes from Review My Emails, with the PDF link inside.
- Your PDF opens with your ticks.Every step you ticked is marked on it.
- Nothing else, unless you ask.No newsletter unless you tick the box. Unsubscribe in one click, any time.
The guide
The check, in 7 steps
One line each. Tick them as you go. Open a step for the full explanation.
- 1
Why:each one usually signs with its own key under its own selector.
Read the full explanation
Before you touch a key, list every service that sends email as your domain: your email marketing tool, your shop or CRM, and whatever sends your receipts and password resets. Each one usually signs with its own key under its own selector. To find a selector, open the headers of a sent email and read the
s=value in theDKIM-Signatureline. Miss one service and only its mail fails while the rest passes, which is why these failures look random. A subdomain that sends needs its own selector too. It does not borrow the main domain's. Write each one down: what it does, who owns it, and what breaks if it is removed. If a service gave you a CNAME record rather than a key, it may rotate keys for you, so check its help pages first. - 2
Why:1024-bit keys are now considered weak. Use a selector name you have not used before.
Read the full explanation
Make the new key 2048-bit. 1024-bit keys were acceptable a decade ago and are now considered weak. It goes on a selector name you have not used before, such as
s2if you are ons1. Most email marketing tools pick the name for you. If you run your own mail server, you pick it, and a date such as2026-q4tells you when the key was made. Most email marketing tools have a "rotate DKIM key" or "add selector" option. Changing tools? Keys belong to the tool that made them, so the new tool makes a new pair and the old one cannot be copied over. If you hold the private key yourself, it never goes in a shared document, an email thread or a code repository. - 3
Why:lower the TTL to 300 to 600 seconds a few hours ahead, then publish beside the old record.
Read the full explanation
A few hours ahead, lower the TTL on your current selector record to 300 to 600 seconds. The TTL is how long other servers keep a copy of a record, and a short one means they fetch the new key quickly instead of holding the old one. Then publish the new public key as a TXT record at
s2._domainkeyunder your domain, beside the old record, never in its place. In your DNS settings type onlys2._domainkeyin the Name field, because the provider adds your domain for you. The record holds three tags:v=DKIM1,k=rsa, andp=followed by the key. Paste the value exactly as your tool gives it. One extra space, a line break or a missing character breaks it. A 2048-bit key can be too long for one TXT string, so it may need splitting into two quoted strings. Then look it up:dig TXT s2._domainkey.yourdomain.example +shortshould return a long string startingv=DKIM1. An empty answer means it is not there yet. - 4
Why:every service on your list, not only the main one.
Read the full explanation
Switch signing to the new key in every service on your list, not only the main one. If you run your own mail servers, check that each one behind a load balancer signs the same way, or some messages go out naming a selector your DNS does not have. Moving to a new email marketing tool? Its new record must answer in DNS before any mail moves to it, and the old tool's selector stays up while mail still goes out through the old tool. Two signatures on one message during the switch are fine. DKIM passes as long as one of them checks out.
- 5
Why:you want
dkim=passwith the new selector in Gmail's Show original.Read your headersThe email header guide
Read the full explanation
Send a test to a Gmail address you own, open it and choose Show original. In the
Authentication-Resultsline you wantdkim=passwith the new selector showing. Test a real send, not only the record: a record can sit perfectly in DNS while signing is switched off. A pass is not quite enough for DMARC. Thed=domain in the signature must match your From domain, and a tool that signs with its own domain will not align. Gmail and Yahoo ask bulk senders for DKIM, with SPF or DKIM aligned to the From domain. Then read your DMARC aggregate reports. Steady DKIM failures from one source usually mean a selector set up wrong. Failures only on mail that went through a mailing list are the list changing your message, not your key. - 6
Why:mail already on its way was signed with the old key and still needs it.
Read the full explanation
Do not delete the old record on the day you switch. Mail already on its way was signed with the old key and still needs it to check out. Wait 48 hours after the switch, then remove the old selector. After a change of email marketing tool, wait until the old tool has stopped sending altogether, then give it a week. Pull it too early and those messages fail as "key not found". Once everything is stable, put the TTL back up.
- 7
Why:rotate every 6 to 12 months, or every 90 days where fraud risk is high.
Read the full explanation
Rotate every 6 to 12 months, or every 90 days where fraud risk is high, such as finance and healthcare. The reason: a leaked private key lets someone forge a DKIM pass for your domain, and a swap ends that. Put the date in the calendar, and add the new selector to your list of records with today's date. If your DNS provider offers alerts on record changes, switch them on for your DKIM records.
See every row of the table
What your ticks mean
| Where you are | Do this first |
|---|---|
| You switched signing before the new record answered | Look the record up now. If it is missing, every message signed with the new key fails as "key not found", and with a DMARC policy of p=quarantine or p=reject real mail bounces. Publish the record exactly as your tool gives it, then test again |
| You have not listed your services, and you use two or more, or you are not sure | List them before you change anything. Each service usually signs with its own selector, and the one you miss is the mail that fails. Your DMARC aggregate reports show which sources send as your domain |
| You have not listed your services, and you use just one | Find its selector in the s= value of a sent email, and check whether the tool already rotates keys for you. Sending from a subdomain too? It needs its own selector |
| You sign with a 1024-bit key today | Make the new key now, at 2048 bits. On 1024-bit, rotation is urgent, not routine upkeep. A key that short is considered weak enough that a well-resourced attacker might be able to break it |
| The new key is not made, or not published, yet | Make it 2048-bit on a new selector, publish it beside the old one, never in its place, and look it up before you switch |
| You switched, but have not checked every service passes | Finish the switch on every service, then send a test and look for dkim=pass with the new selector. A pass whose d= domain does not match your From domain still fails DMARC alignment |
| It passes, but the old key or the next date is not sorted | Remove the old selector 48 hours after the switch, not before. Then put the next swap in the calendar, 6 to 12 months out |
| All seven ticked | Your swap followed the safe order the Almanac sets out. Check again whenever you rotate, add a sending domain or change tools |
See how it plays out for a real business
Worked example. Coral Seaforth looks after the emails for Saltmarsh Outfitters. Ping, the developer, set up the DNS one afternoon years ago, and nobody has touched the DKIM key since. Coral answers "Not sure" to both questions, and the table lights the row for a sender who has not listed every service yet. Coral sends a newsletter and a shop receipt to a test inbox and reads the s= value in each. The newsletter signs with s1, the receipts with shop1: two services, two selectors. Ping finds the newsletter key is 1024-bit, so the swap is urgent. He makes a 2048-bit key on a new selector, 2026-q4, lowers the TTL that morning, publishes the record beside s1, and looks it up before anyone switches. After the switch, Coral's test to Gmail shows dkim=pass with header.s=2026-q4 and header.i=@saltmarsh-outfitters.example. They leave s1 up for 48 hours, then remove it, and put the next swap in the calendar six months out. Then they do the same for shop1.
Who we are
About Review My Emails
Review My Emails is email list cleaning and validation that tells you which addresses to keep, which to watch and which to stop sending to, and why.
Most checkers answer one question: does this address exist? We answer the next one: should you send to it? An address can be perfectly valid and still be quietly damaging your sender reputation. Valid is not safe.
The company was founded in 2020 and is based in Bolton, United Kingdom. Our founder is Yanna-Torry Aspraki, an email deliverability specialist who has worked in deliverability since 2015.
Your next step. Check a test send with the free email header analyzer at reviewmyemails.com/tools/email-headers. Paste the headers and look for dkim=pass with your new selector. To check alignment too, paste the whole raw email into the free email source analyzer at reviewmyemails.com/tools/email-source-analyzer. No DMARC reports to watch? The free DMARC checker at reviewmyemails.com/tools/dmarc-checker shows whether your record asks for them. Halfway through a swap and something fails, or not sure who signs for you? Ask the free SOS line at reviewmyemails.com/sos. A real person answers, with no pitch.
List cleaning does not fix SPF, DMARC, MX or blocklist problems. Those live in your sending setup, and they are a different job. A blocklist listing measures your sending, so it is never a reason to suppress anyone on your list. And nobody can promise you the inbox, so we do not.
Yanna-Torry Aspraki, Review My Emails
Email SOS Hotline, free
Stuck? We are here.
For those problems there is the Email SOS Hotline, our free help line. Tell Yanna-Torry what is going on and she will tell you what she would do. She reads every message herself and replies within 48 to 72 hours, with no pitch.
Ask the free SOS lineWords used
- DKIM
- a signature added to each email with a private key, checked by the receiver against a public key in your DNS, proving the message came from your domain unchanged
- Selector
- a short label that, with your domain, tells receivers where in DNS to find the key, as in
s1._domainkey - Public and private key
- the private key stays on the signing server and makes the signature. The public key is published in DNS so anyone can check it
- Key rotation
- making a new key pair, publishing it under a fresh selector, moving signing over, then retiring the old record
- TTL
- how long other servers keep a copy of a DNS record before asking again
d=ands=- in the
DKIM-Signatureline,d=is the domain that signed ands=is the selector used - DKIM alignment
- the DMARC check that the
d=domain matches the domain in your From address
Where this came from: the Review My Emails Email Almanac.
- What is DKIM?
- What is a DKIM selector?
- What is a DKIM selector and how is it chosen?
- What is a DKIM public key and private key?
- Where do I publish a DKIM record?
- What does a DKIM record look like?
- Can I have multiple DKIM keys?
- What is DKIM key rotation and why is it important?
- How often should I rotate DKIM keys?
- What DKIM key length should I use (1024 vs 2048)?
- How do I check if my DKIM setup is correct?
- How do you test or validate a DKIM signature?
- What is the difference between d=, s=, bh= and b= tags?
- What causes “bad signature” or “key not found” errors?
- What is a selector DNS record and how long should keys stay cached?
- What happens when you change ESPs, and how do you migrate DKIM?
- What is DKIM alignment (strict vs. relaxed)?
- Can email forwarding break DKIM?
- What is a good DKIM key rotation strategy?
- Why use 2048-bit DKIM keys instead of 1024-bit?
- How should I manage DKIM private keys securely?
- How do I troubleshoot DKIM signature validation failures?
- How do I parse and analyze DMARC aggregate reports effectively?
- Can you use multiple DKIM signatures?
- How can SPF/DKIM misconfigurations cause indirect bounces?
- What are the best practices for naming and documentation?
- How to set up alerts for DNS record changes?
- What tools check DKIM records?
- How can DKIM selector errors create intermittent failures?
- What authentication is required (SPF, DKIM, DMARC)?
- Do subdomains inherit root domain authentication automatically?
Founded in 2020, based in Bolton, United Kingdom.
reviewmyemails.com/resources/dkim-key-rotation?c=web-p10-r17pdf · v1