All articles
    Deliverability

    Mailgun DKIM Record Errors and Fixes: Troubleshooting Guide

    A DKIM failure from Mailgun almost always has one of five causes: the record is at the wrong name, the key was damaged when it was pasted or split, the…

    VeriMailX Team November 23, 2026 4 min read

    Key takeaways

    • Read the DKIM-Signature header of a failing message first.
    • Its d= and s= tags tell you which domain and selector the receiver looked up.
    • If the record is missing or different, fix DNS.

    A DKIM failure from Mailgun almost always has one of five causes: the record is at the wrong name, the key was damaged when it was pasted or split, the DNS host altered the name, the signature uses a selector that no longer exists, or the message is not being signed with the domain you expect. The table below pairs each symptom with a check you can run and the fix that follows from it.

    Research checked: 12 November 2026

    The short answer

    Read the `DKIM-Signature` header of a failing message first. Its `d=` and `s=` tags tell you which domain and selector the receiver looked up. Then run `dig` against that exact name. If the record is missing or different, fix DNS. If it is correct, the problem is in the signing side or in a message altered after signing.

    Symptom table

    SymptomLikely causeCheckFix
    `dkim=none`No `DKIM-Signature` on the messageLook for the header in the raw messageConfirm the sending path is signing with the domain
    `dkim=fail` with a key errorRecord missing at `<selector>._domainkey``dig +short TXT <selector>._domainkey.<domain>` returns nothingPublish the record at the name Mailgun shows
    `dkim=fail` with a key errorKey text damagedCompare the `p=` value with the control panel character by characterRe-copy the full value; rejoin any split strings
    "Expected TXT record" or "no such host" from a DNS validatorDKIM key split into separate quoted strings that were not rejoinedDig shows several fragmentsJoin them into one continuous quoted value
    Name shows doubled domainDNS host appended the domainLook for `.example.com.example.com` in the zoneEnter only the left-hand part of the name
    Record exists but fails after rotationOld selector removed before mail finishedCompare the `s=` in failing mail to what is publishedRepublish the old selector until the new one is proven
    Multiple keys, some unverifiedExpected after rotationConfirm the key your domain signs with is publishedNo action if the active key is correct
    `dkim=pass` but DMARC failsSigning domain does not align with FromCompare `d=` with the From domainSign with a domain that aligns, or send from the signing domain

    Symptoms in detail

    Symptom 1: No signature at all

    If there is no `DKIM-Signature` header, the message left without being signed. Check for a relay or forwarder that rewrote it. Signing happens on the sending side, so a forwarder that re-sends the message without its signature removes DKIM entirely.

    Symptom 2: Record missing or unreadable

    Mailgun's verification guide says changes can take 24 to 48 hours to propagate. Before waiting, check the name. A record at `_domainkey.example.com` without the selector is a common error. Run the `dig` command against the full selector name and expect a single TXT answer.

    Symptom 3: Damaged key

    The two common damage points are the copy and the split. A 2048-bit key may need two quoted strings in some DNS hosts. If the strings are not rejoined, or a character is lost, the receiver sees a key it cannot read. The `p=` value must be the complete public key, so re-copy the entire value from Mailgun.

    Symptom 4: Name doubled by the DNS host

    Some hosts add your domain to any name you enter. The result is a record at a doubled name that never matches the selector. Look at the zone file, not the form. If you see the doubled name, delete it and enter the short name.

    Symptom 5: Selector removed too early

    A message in transit still carries the old selector. If you have deleted the old record, verification fails for that message while new messages pass. Keep the old key published until a test shows the new selector signing and verifying. Mailgun's DKIM security page advises keeping both keys active during a transition, because providers may cache DNS.

    Symptom 6: Pass but DMARC fails

    DKIM can pass while DMARC still fails. RFC 7489 requires an aligned identifier, so a valid signature on `mailgun.example.net` does not help a message whose From is `example.com`. Check the `d=` tag. If it does not match your From domain under relaxed alignment, configure signing on the correct domain.

    Symptom 7: Signature breaks after the message leaves

    A signature covers specific headers and the body. A footer added by a list tool or a rewritten link can invalidate it. Send a test through the same path as production mail and compare headers before and after that step.

    Frequently asked questions

    Keep reading

    Comparisons

    Instantly vs Smartlead: How to Choose a Cold Email Platform

    Instantly and Smartlead both support cold email campaigns across multiple sending accounts. The better choice depends on your contact limits, sending volume, reply workflow, and the cost of the features you actually need. Start

    Read
    Comparisons

    Instantly vs Smartlead Deliverability: How to Compare Inbox Placement

    Neither Instantly nor Smartlead can guarantee that a cold email reaches the inbox. Both provide tools for managing outreach, but inbox placement also depends on your sending domain, authentication, recipient list, message and the

    Read
    Comparisons

    Instantly vs Smartlead Pricing: Compare the Real Cost of Outreach

    The headline subscription is only one part of a cold email budget. The right comparison includes sending limits, contact storage, mailboxes, lead data, verification and any tools needed for your team. A cheaper entry plan can

    Read