Blog · Dkim

Stale DKIM Selectors After Registrar Migration: Are They a Security Risk?

After changing domain registrars, it is common to find DKIM selector records still sitting in your DNS that you did not put there. You might have changed email providers months ago and never touched the DKIM records. You might have found multiple selector records and have no idea which ones are still active.

The first question most people ask: are these a security risk?

The short answer is no, not in the way you are probably worried about. But the longer answer has some nuance worth knowing.

What a DKIM Selector Actually Is

DKIM works by attaching a digital signature to every outbound email. That signature is created with a private key that only your mail server holds. Receiving mail servers verify the signature by looking up the corresponding public key in DNS.

The DKIM selector is the part of that DNS lookup that identifies which specific key you are talking about. It shows up in the DKIM signature header as s=selector._domainkey.yourdomain.com.

If you have ever switched email providers, rotated your DKIM keys, or used an email platform that manages DKIM for you, you probably have more than one selector in your DNS right now. Each one points to a different public key. Only one of them corresponds to the private key your current mail server actually uses.

Why Stale Selectors Appear After Migrations

When you migrate to a new email provider, that provider generates a new DKIM key pair and tells you to publish a new DNS record. The old provider's DKIM record stays in your DNS until you manually remove it. Registrar migrations do not touch DNS records themselves, so if you migrated both registrar and email provider at the same time, the old DKIM records could easily sit unnoticed for months or years.

Most DNS interfaces do not highlight which DKIM records are active. You have to query them specifically to know what is there.

Are Stale DKIM Selectors a Security Risk?

No, not in any direct sense. Without the corresponding private key, nobody can forge a valid DKIM signature using an old selector. Receiving mail servers that see a DKIM signature with an unrecognized selector will simply skip that check. They do not fail the email. They just treat it as unsigned for that selector.

The practical security risk from a stale DNS record alone is zero.

The One Scenario Where It Could Matter

There is one edge case worth knowing. If you switched to a new email provider but your old provider still has operational access to the infrastructure that holds the DKIM private key, that old provider could in theory sign mail that appears to come from your domain. This is not a vulnerability in DKIM. It is a vendor trust issue.

In practice, this only matters if you switched providers on bad terms or your old provider is doing something it should not be doing. Any reputable email provider that properly offboards customers will not retain the ability to sign mail on your behalf after you migrate away.

For everyone else, the scenario is theoretical. Your DMARC policy of reject would block most illegitimate mail anyway.

Why You Should Clean Up Stale DKIM Selectors Anyway

Even though stale selectors are not a security risk, they are worth removing for operational reasons.

First, they create noise in your DMARC aggregate reports. When a receiving server sees a DKIM signature with an unrecognized selector, it generates a result in your aggregate reports. Stale selectors mean your reports contain results that are not relevant to your current setup.

Second, they make troubleshooting harder. When emails start failing and you are trying to audit your authentication setup, old DKIM records can lead you down the wrong path. You may spend time investigating a selector that has not been used in months.

Third, they complicate audits. If you are reviewing your email authentication setup for compliance or security review, old selectors need to be accounted for even if they are harmless.

How to Find Stale DKIM Selectors Manually

Step 1: Query all DKIM records currently published in your DNS for your domain. Run:


dig TXT selector._domainkey.yourdomain.com

Replace yourdomain.com with your actual domain. Your DNS provider or registrar interface also has a zone editor where you can see all TXT records. Look for anything matching the pattern selector._domainkey.

Step 2: Cross-reference against your current email provider's documentation. Most providers specify the exact selector name they use. If a published selector does not match what your current provider uses, it is a candidate for review.

Step 3: Check your DMARC aggregate reports. Reports from major receivers like Google, Microsoft, and Yahoo will show which DKIM selectors they observed in transit. If a selector appears in your reports but does not match your current provider, it is stale.

How DMARCFlow Surfaces Stale DKIM Selectors Automatically

DMARCFlow ingest aggregate reports and shows you which DKIM selectors appear in transit for your domain. When a selector shows up in reports but does not match your current provider's active configuration, DMARCFlow flags it. This means you do not have to manually query DNS or cross-reference records. The tool tells you which selectors are sending mail that receivers are checking.

If you see a selector in DMARCFlow that you do not recognize, it is either a third-party sender you have not accounted for or a stale selector from a previous provider. Either way, it surfaces the cleanup automatically.

What to Do With Old DKIM Records You Find

If you confirm a DKIM selector is stale, remove the corresponding DNS TXT record. In most DNS interfaces, you can delete it like any other TXT record. After removing it, monitor your DMARC reports for any sudden changes in DKIM pass rates. As long as your current email provider's DKIM is still signing correctly, removing an old selector will have no negative effect.

If you are unsure whether a selector is still in use, err on the side of caution. Give it 30 days of monitoring via DMARC reports before removing it. If no results appear for that selector in that time, it is safe to delete.

FAQ

Can an attacker use an old DKIM selector to forge emails?

No. Forging a DKIM signature requires the private key. An old selector in DNS only contains the public key. Without the private key, nobody can produce a valid signature for that selector.

I changed email providers years ago. Should I go clean up old DKIM records now?

Yes, it is worth doing when you find them. They do not create risk, but they complicate your authentication audit and generate noise in DMARC reports.

My old DKIM selector still resolves in DNS. Can it affect my email deliverability?

No. Receiving mail servers skip selectors they cannot verify. An old selector that returns a DNS result but does not correspond to a current signing key does not hurt your deliverability. It is simply inactive.

How do I know which DKIM selectors are still in use?

Check your DMARC aggregate reports. Any selector that appears in those reports is in active use somewhere. Then cross-reference against your current email provider's documented selector. Anything that does not match is a candidate for review.