What you'll learn in this article
- DKIM alignment is a DMARC requirement that checks identifier alignment between the From domain and the domain used for DKIM signing.
- The receiving server compares the header domain in the email header to the signing domain in the DKIM signature header.
- Relaxed alignment and strict DKIM alignment depend on the DMARC alignment mode set in the DMARC record.
- Alignment failures are common in organizations that use multiple domains and SaaS platforms to send email.
- Mimecast DKIM record checker helps validate DKIM DNS records, selectors, and DKIM keys.
Many organizations deploy DKIM and still encounter DMARC failures. In many cases, the signature itself is valid, but the domain used for signing does not match the sender domain visible to recipients. DKIM verifies that a message was authorized and unchanged, while DMARC ties authentication results to the From domain.
DKIM alignment performs that identity check and helps organizations maintain consistent authentication across multiple domains, hybrid mail environments, and third-party sending platforms.
What Is DKIM Alignment?
DKIM alignment is a DMARC requirement that verifies whether the domain used in a DKIM signature matches the domain shown in the “From” address of an email.
DKIM (DomainKeys Identified Mail) adds a cryptographic signature to outgoing messages. During DKIM signing, the sending system attaches a DKIM signature header containing a signing domain and selector. The signature includes two key identifiers:
- Signing domain (d=) – the domain responsible for the signature
- Selector (s=) – the value used to locate the public DKIM key in DNS
The selector points to a DKIM record published in DNS. Some organizations publish the key directly, while others use a CNAME record that resolves to hosted DNS infrastructure.
DKIM alignment and DMARC enforcement
DMARC evaluates DKIM in two stages. The first is DKIM authentication which validates the signature using the DKIM key. The second is domain alignment, which confirms the signing domain matches the From domain
This identity comparison is called identifier alignment and is controlled by the DMARC alignment mode. Two alignment modes are commonly used:
- Relaxed alignment: The signing domain can be a subdomain of the From domain if both belong to the same organizational domain.
- Strict alignment: The signing domain must match the From domain exactly.
Because DMARC evaluates both DKIM and SPF, organizations often review authentication together using DKIM, SPF, and DMARC to understand how these methods interact.
How DKIM Alignment Works
When a receiving mail server performs a DMARC check, it processes DKIM first. The server reads the DKIM signature header and retrieves the public DKIM key associated with the selector and signing domain. If the key is stored through a delegated configuration, the receiver may follow a CNAME reference before retrieving the DKIM record.
After DKIM verification, DMARC performs the alignment check. The server compares the From domain in the email header with the DKIM signing domain (d=).
If the domains match according to the configured alignment mode, DKIM can satisfy DMARC compliance. If they do not match, DKIM authentication may succeed, but DMARC records an alignment failure.
This situation often occurs when organizations rely on third-party sending platforms. SaaS applications, marketing systems, or ticketing tools may sign messages using their own domain instead of the organization’s domain.
Example Alignment Outcomes
Example 1: Strict alignment succeeds
A company sends an alert from alerts@example.com. The email is signed with d=example.com.
Because the signing domain exactly matches the From domain, DKIM verification and domain alignment both pass.
Example 2: Relaxed alignment succeeds
A message is sent from alerts@example.com, but the DKIM signature uses d=mail.example.com.
Because relaxed alignment allows subdomains under the same organizational domain, identifier alignment still succeeds.
Example 3: Third-party sender causes alignment failure
A marketing platform sends an email from news@example.com, but signs the message using d=mailer.vendor.com.
Although DKIM verification succeeds, the domains do not align, so DMARC fails due to DKIM alignment failure.
Example 4: Strict alignment blocks subdomain signing
A message from alerts@example.com is signed with d=mail.example.com, while strict alignment is enforced.
Because strict alignment requires an exact domain match, the DKIM path fails for DMARC. Teams often validate DNS configuration using a DKIM record check.
Why DKIM Alignment Matters for Enterprise Security
DKIM alignment connects authentication results to the sender identity visible to recipients. Without alignment, attackers could sign messages using their own domain while impersonating another organization.
This risk is closely tied to phishing and domain spoofing attacks. When alignment is enforced through DMARC, organizations reduce the likelihood that spoofed messages reach user inboxes.
Alignment also affects deliverability. Once a DMARC policy is enforced, messages that fail authentication may be quarantined or rejected. In environments with multiple domains and third-party senders, misalignment can disrupt legitimate mail if configurations are inconsistent.
How to Fix DKIM Alignment Issues
Resolving DKIM alignment issues requires visibility into authentication results and sending infrastructure. Security teams typically take several steps:
Review DMARC reports
Use DMARC reports to identify which senders are failing alignment and whether the failure is tied to DKIM, SPF, or both. Break results down by sending source and From domain so you can isolate the specific stream (app, ESP, CRM, helpdesk, etc.) that needs changes.
Confirm DMARC record settings
Check the published DMARC record and confirm alignment modes (adkim= and aspf=) plus the policy (p=) and rollout controls like pct=. Make sure the record you expect is the one actually being returned in DNS for the From domain in question.
Audit DKIM records
Verify every legitimate sender is signing with DKIM and that the selector resolves to a valid public key in DNS. Confirm the d= value in the DKIM signature aligns with the From domain (or the organizational domain under relaxed alignment), and rotate/repair keys where lookups fail or signatures break.
Standardize third-party sender identities
For each SaaS or external email service, configure DKIM signing to use your domain (or an aligned subdomain) instead of the vendor’s default signing domain. If the platform supports custom return-path and dedicated sending domains, align those identities to reduce mixed-domain behavior.
Validate SPF alignment
Confirm all sending IPs and include-domains are authorized in SPF and that the domain used for SPF evaluation aligns with the From domain. For third-party senders, this usually means using an aligned bounce/return-path domain rather than the provider’s shared domain.
How Mimecast Helps Strengthen Email Authentication
Large organizations often manage multiple domains, email platforms, and third-party senders. Maintaining authentication across these environments requires ongoing monitoring and validation.
Security teams can use Mimecast DMARC Analyzer to review DMARC records, identify sending sources, and monitor authentication results across domains. For DKIM troubleshooting, Mimecast DKIM Check helps validate DKIM signatures, confirm DNS configuration, and identify issues related to DKIM signing and domain alignment.
Maintaining DKIM Alignment
DKIM alignment is a core component of DMARC authentication because it ties DKIM verification results to the sender identity visible in the email header. When identifier alignment is consistent across sending services, organizations strengthen DMARC enforcement and reduce the risk of domain spoofing.
Maintaining alignment requires regular review of DNS records, DKIM configuration, SPF authorization, and DMARC policy settings. Tools such as Mimecast DMARC Analyzer and Mimecast DKIM Check help teams monitor authentication and identify alignment issues before they affect deliverability or security.