Home / Fix guides / Domain, DNS and email deliverability

DKIM signature failed: how to find the cause and fix it

A DKIM failure means the receiving mail server could not match the signature on your email to the public key in your DNS. It is usually fixed by publishing the correct DKIM record for the service that sends your mail and making sure signing is switched on.

When you send an email from your domain, your email service can add a hidden digital signature called DKIM. The receiving server looks up a public key in your DNS and checks that the signature matches. If it does not, the message header shows dkim=fail (or dkim=none if there was no signature at all), and the email may go to spam or be rejected.

You rarely see this directly. What you notice is customers saying your quotes, invoices or newsletters never arrived, or a bounce message mentioning authentication. DMARC reports and the "Show original" view in Gmail are where the failure becomes visible.

Why it matters

DKIM is one of three checks (with SPF and DMARC) that mailbox providers use to decide whether a message really came from you. When it fails, you lose trust with those providers, and that affects every email you send, not just one.

  • Order confirmations, enquiries and invoices land in spam or never arrive, which costs sales.
  • Your domain is easier for scammers to imitate, because there is no reliable proof of what is genuine.
  • If you send marketing email in volume, Gmail and Yahoo expect proper authentication, and failures can lead to blocking. See emails going to spam for the wider picture.

Common causes

  • No DKIM record published. The service signs nothing, or signs with a key your DNS does not have.
  • Wrong selector. The signature names a selector (the s= value), and the record must exist at selector._domainkey.yourdomain.com.
  • Record pasted incorrectly. Typical problems are a truncated key, extra spaces or quotes, or the domain added twice, such as google._domainkey.example.com.example.com.
  • Long key split wrongly. A 2048-bit key is longer than one 255-character DNS string, so some DNS hosts need it split into several quoted pieces.
  • Signing not enabled. Many services need you to click an authenticate or start signing button after the DNS record is added.
  • Several services sending as your domain. Your website form, newsletter tool, invoicing app and mailbox provider each need their own DKIM setup.
  • Message changed after signing. Mailing lists, forwarding that alters the message, or a security gateway that adds a footer can break the signature. This is the one cause that is not a DNS mistake.
  • Old key removed. Someone rotated or deleted a record while the service was still using it.

How to check your site for free

Start with a real message, because it shows what actually happened.

  1. Send an email from the address in question to a Gmail account you control.
  2. Open the message, click the three dots, and choose Show original.
  3. Near the top, look for DKIM: PASS or DKIM: FAIL. Note the domain and selector shown.
  4. In the full headers, find the DKIM-Signature: line. The d= value is the signing domain and s= is the selector.

Then check the DNS record for that selector. If you are comfortable with a command line:

dig TXT selector._domainkey.yourdomain.com +short

Replace selector and yourdomain.com with your own values. You should get back text starting with v=DKIM1; and containing p= followed by a long key. If you use Microsoft 365, the selectors are usually CNAME records instead, so query CNAME. Free web tools such as the MXToolbox DKIM lookup do the same without a terminal.

Two details to watch: if the d= domain is your email provider's domain rather than yours, DKIM may pass but will not count for your own domain under DMARC. And if the lookup returns nothing, the record is missing or in the wrong place.

How to fix it

The steps are the same on most platforms, though menu names differ.

  1. Find out which service sends the failing email. The d= and s= values in the header usually tell you.
  2. In that service's settings, look for an area named something like email authentication, sending domain, or DKIM. It will show the record to publish: a TXT value, or one or more CNAMEs.
  3. Open your DNS host. This is wherever your nameservers point, which may not be where you bought the domain.
  4. Add the record exactly as given. Many DNS panels add your domain automatically, so enter only selector._domainkey as the name if that is how the panel works.
  5. Go back to the service and click the verify or start signing button.
  6. Wait for DNS to update. This is often minutes, but can take several hours.

Platform notes:

  • Google Workspace: the key is generated in the Admin console under Gmail settings, then you click Start authentication. See the Google Workspace guide.
  • Microsoft 365: you publish two CNAME records and then enable signing in the Defender portal. See the Microsoft 365 guide.
  • Cloudflare DNS: CNAME records for email must be set to DNS only (grey cloud), not proxied.
  • cPanel hosting: look for Email Deliverability, which can check and repair the record for mail sent from the server.
  • Shopify, HubSpot and WordPress: Shopify and HubSpot give you CNAME records to add for your sending domain. WordPress does not sign mail itself, so authenticate whichever SMTP or email service your forms and shop use.

If you also lack SPF, fix that at the same time. A weak setup in one place often means the others need attention too.

How to confirm it worked

  • Send a fresh email to Gmail again and check Show original. You want DKIM: PASS with your own domain in the d= value.
  • Repeat the test for every service that sends as your domain: the mailbox, the website contact form, the newsletter tool and the shop.
  • Run the DNS lookup again and confirm the record matches what the service gave you.
  • If you have DMARC reporting, watch the reports over the next few days for remaining failures.

Old emails will not be fixed. The signature is added when a message is sent, so only new messages count.

How to stop it coming back

  • Keep a list of every service that sends email for your domain, and who set it up.
  • Before you move DNS host or change nameservers, copy all records, including those under _domainkey.
  • When you drop a service, remove its records only after you are sure it no longer sends mail.
  • Treat any new tool that sends email as unfinished until its DKIM check passes.
  • Re-check after changes to your email provider, website platform or DNS.

SiteMonday's week 10 service covers domain, SSL and email deliverability, and its report lists authentication problems like this one in a ranked fix list. SiteMonday finds and explains the problem; making the DNS change is up to you or your developer.

Step by step for your platform

Questions

What does dkim=fail mean?

It means the receiving server found a DKIM signature but could not verify it against the public key in your DNS. The key may be missing, wrong, or the message may have been altered after it was signed.

How long does it take for a DKIM fix to work?

DNS changes often show within minutes but can take several hours. Once the record is visible and signing is enabled, new emails should pass straight away.

Can DKIM fail even if my record is correct?

Yes. Mailing lists, some forwarding services and some security gateways change a message after it is signed, which breaks the signature. Also, signing may simply not be switched on in your email service.

Is DKIM the same as SPF?

No. SPF checks which servers may send for your domain, while DKIM checks that the message itself was signed and not altered. DMARC uses both, and you should set up each one.

Do I need a separate DKIM record for each email service?

Usually yes. Each service that sends as your domain signs with its own key and selector, so each needs its own record in your DNS.

Will a DKIM failure always send my email to spam?

Not always, but it raises the risk, especially if SPF or DMARC are also weak. Large providers like Gmail and Yahoo weigh authentication heavily, so it is worth fixing.

Related problems