SiteTidy
HomeGuidesTroubleshooting DMARC Failures (Part 3): DKIM Signatures, Selectors and Alignment
DNS

Troubleshooting DMARC Failures (Part 3): DKIM Signatures, Selectors and Alignment

Debug DKIM-related DMARC failures: signing domains, selectors, DNS keys, signature breakage, third-party senders, rotation and message modification.

Published on August 15, 2026Updated August 31, 2026
Troubleshooting DMARC Failures (Part 3): DKIM Signatures, Selectors and Alignment

DKIM is often the authentication mechanism that saves DMARC when email leaves the neat path you designed.

SPF is tied to the sending route. Forward a message and that route changes. DKIM instead attaches a cryptographic signature to the message. If the signature survives the journey and its signing domain aligns with the visible From domain, DMARC can pass even when SPF cannot.

But “we enabled DKIM” is not enough information to troubleshoot anything.

You need to know who signed the message, which selector they used, whether the receiver could retrieve the public key, whether the signature verified, and whether the signing domain aligned.

Anatomy of the part of a DKIM signature you actually need

A DKIM header is long, but the first troubleshooting pass only needs a few fields.

A simplified example:

DKIM-Signature: v=1; a=rsa-sha256;
 d=example.com;
 s=mail2026;
 c=relaxed/relaxed;
 h=from:to:subject:date:message-id;
 bh=...;
 b=...

The important fields are:

  • d= — the signing domain
  • s= — the selector
  • a= — the signing algorithm
  • c= — canonicalisation choices
  • h= — headers covered by the signature
  • bh= — body hash
  • b= — signature data

For DMARC, d= is especially important because that is the DKIM identity whose alignment is evaluated against the visible From domain.

The selector tells the receiver where to find the key

If the signature says:

d=example.com; s=mail2026

the public key is looked up under a DNS name conceptually like:

mail2026._domainkey.example.com

A typical TXT value contains a DKIM version/key declaration and public key.

The selector lets a domain operate multiple keys at once. That is useful for:

  • different mail providers
  • different business systems
  • key rotation
  • migration between platforms
  • separating production and other mail streams

It also means “the DKIM record exists” is too vague. Which selector?

Read the receiver’s DKIM result first

Suppose the received message contains:

Authentication-Results: mx.receiver.example;
    dkim=fail header.d=example.com header.s=mail2026;
    spf=pass smtp.mailfrom=vendor.example;
    dmarc=fail header.from=example.com

This is useful.

The intended aligned DKIM identity is present, but the signature did not verify. SPF passes only for an unaligned vendor domain. DMARC therefore has no aligned passing mechanism.

That narrows the investigation immediately.

Compare that with:

dkim=pass header.d=vendor.example;
spf=pass smtp.mailfrom=vendor.example;
dmarc=fail header.from=example.com

Here DKIM itself is healthy. The problem is alignment/configuration, not signature verification.

Failure class 1: the expected signature is missing

This is more common than people think.

You configure a DKIM selector in DNS, click “verify” in a SaaS platform, and assume the job is done. Then production mail is sent through a different account, region, subdomain or mail stream and never receives the custom signature.

Check the raw message.

If there is no signature with the expected d= domain, DNS debugging will not fix it. The sending system is not applying the signature you expected.

Investigate:

  • whether custom-domain authentication is enabled for the correct account
  • whether the From domain matches the authenticated sending domain
  • whether the correct mail stream uses that configuration
  • whether a different provider or relay actually sent the message
  • whether the platform only signs certain message types

Failure class 2: the selector cannot be resolved

The signature is present, but the receiver cannot retrieve the public key.

Common causes include:

  • selector typo
  • record published under the wrong zone
  • CNAME target missing
  • TXT value malformed by a DNS UI
  • old selector removed before all mail using it stopped
  • DNSSEC/resolution problems
  • provider migration only half completed

A classic migration mistake looks like this:

  1. Old provider signs with s=old1.
  2. New provider signs with s=new1.
  3. Team deletes old1._domainkey on cutover day.
  4. Queued or delayed messages from the old system still arrive.
  5. Their signatures can no longer be verified.

Key retirement needs overlap, not wishful thinking.

Failure class 3: the key resolves, but the signature is invalid

This is where DKIM gets interesting.

The sender signs selected headers and the body according to the signature’s canonicalisation rules. If something changes the signed content after signing, verification can fail.

Potential modifiers include:

  • mailing lists adding subject prefixes
  • gateways inserting disclaimers
  • security products rewriting URLs
  • footer injection
  • MIME transformations
  • character encoding changes
  • systems changing signed headers
  • body modification

Do not automatically blame the final receiver. Trace the message path and determine where modification occurred.

Relaxed canonicalisation is tolerant, not magical

DKIM canonicalisation controls how certain syntactic differences are normalised before verification.

relaxed modes can tolerate some harmless formatting changes, such as whitespace normalisation.

They do not make arbitrary content modification safe.

If a gateway adds text to the body after the message was signed, the body hash can still break.

Failure class 4: DKIM passes but does not align

This is the third-party sender trap.

From: offers@example.com
DKIM-Signature: ... d=mailer-platform.example; ...

The platform can produce a perfectly valid DKIM signature for its own domain.

DMARC still needs an aligned domain.

The usual solution is to configure the provider’s custom DKIM/domain-authentication feature so mail is signed with a domain such as:

d=example.com

or an appropriately aligned subdomain under relaxed alignment.

This often requires DNS CNAMEs or TXT records that delegate selectors to the provider.

Follow the provider’s current documentation rather than inventing records yourself.

Multiple signatures are normal

A message can have multiple DKIM signatures.

For example:

d=example.com; s=marketing1
d=provider.example; s=shared2

The provider may sign once with its own infrastructure identity and once with your custom domain.

When troubleshooting, do not stop at the first dkim=fail you see. Check whether another relevant aligned signature passed.

Equally, a passing provider signature does not compensate for a failed custom signature if only the custom signature aligns with the visible From domain.

DKIM key size and rotation

Modern providers commonly support 2048-bit RSA DKIM keys, and Gmail recommends 2048-bit keys where the provider supports them; Gmail requires at least 1024 bits for mail sent to personal Gmail accounts.

The practical operational lesson is broader than a particular number:

  • use provider-supported modern key sizes
  • know which selectors are active
  • rotate keys deliberately
  • overlap old/new selectors during migration
  • monitor failures after rotation
  • do not delete an old key until mail signed with it has drained

Rotation is much easier when selectors have meaningful ownership and documentation.

A sensible selector inventory

Keep something like:

Selector Domain Provider Purpose Status Owner
gw2026 example.com Workspace Staff mail Active IT
crm1 example.com CRM vendor Sales Active RevOps
news2025 example.com Old ESP Newsletter Retiring Marketing

If nobody knows what a selector belongs to, deleting it is risky and leaving it forever is poor hygiene.

Third-party signing and private keys

With SaaS email platforms, you generally do not hand the provider a reusable private key you generated for unrelated systems. Providers typically generate or manage the signing key and ask you to publish the necessary DNS record/delegation.

Treat the signing relationship as production infrastructure.

If a provider account is compromised and it can sign aligned mail for your domain, an attacker may be able to send messages that pass your authentication controls.

That means:

  • secure provider accounts with strong authentication
  • remove unused sender accounts
  • revoke old DKIM delegations
  • limit who can authenticate new domains
  • review senders in DMARC reports

DMARC does not protect you from an authorised but compromised sender.

Validate the public side, then test a real message

DNS inspection can confirm that selectors and authentication records are published. Raw received headers tell you whether the sender actually used them successfully.

Run Free Audit →

A repeatable DKIM debugging workflow

For a failing message:

1. Identify every DKIM signature

Record each d= and s= pair.

2. Read the receiver’s result

Which signatures passed? Which failed?

3. Determine which signature should align

If only d=vendor.example passes while From is example.com, you have an alignment issue.

4. Resolve the exact selector

Do not query a generic “DKIM record”. Query the selector named in the message.

5. If DNS is healthy, inspect modification

Compare the message path and look for gateways, mailing lists or transformations after signing.

6. Send controlled tests

Send the same message through different paths where possible:

application -> receiver
application -> security gateway -> receiver
application -> forwarding mailbox -> receiver

Differences can reveal the component breaking the signature.

7. Check aggregate DMARC data

One failed message may be an edge case. Aggregate reports can show whether a selector/provider is failing systematically across receivers.

DKIM does not prove the message is desirable

A cryptographically valid signature proves that the signed message was associated with a domain controlling the relevant signing key.

It does not mean:

  • the message is not spam
  • the sender account was not compromised
  • the content is safe
  • the recipient asked for the mail
  • the message deserves inbox placement

That is why mailbox providers combine authentication with reputation, abuse signals and content/behavioural systems.

Common DKIM mistakes

Publishing a key but never enabling signing. DNS alone does nothing.

Checking the wrong selector. Use s= from the failing message.

Celebrating a provider-domain DKIM pass. Check alignment with From.

Deleting old selectors immediately during migration. Delayed mail still needs verification.

Assuming relaxed canonicalisation survives arbitrary modification. It does not.

Leaving old provider delegations forever. Remove obsolete authorised signing paths after safe retirement.

Treating DKIM pass as a deliverability guarantee. Authentication is only one part of mailbox filtering.

The principle to keep

When DKIM is involved in a DMARC failure, ask two separate questions:

Did the signature verify? And if it did, was its d= domain aligned with the visible From domain?

Those two questions separate cryptographic failure from DMARC architecture.

Part 4 turns to the DMARC record itself: policy discovery, subdomains, relaxed/strict alignment, malformed records, DNS placement and how to tighten enforcement without breaking legitimate mail.

Ready to audit your site?

Put this guide into practice immediately using our free tools.

Browse 180+ Free Tools