Skip to main content
YesGov is a Public Benefit Corporation that works only with U.S. government agencies. Sign in

Home / Learn / DKIM

DKIM: signing your email

A guide for officials and staff. About 2 minutes to read.

In one sentence: DKIM adds a digital signature to every email your agency sends, so the receiver can confirm it really came from you and was not changed on the way.

What it is

DKIM (DomainKeys Identified Mail) works like a tamper-evident seal. Your mail system signs each outgoing message with a private key that only it holds. The matching public key is published in your domain's records.

When the message arrives, the receiving system uses the public key to check the signature. If it matches, the message came from a server that holds your key and nobody changed it in transit.

Unlike SPF, a DKIM signature survives when a message is forwarded, which is why DMARC relies on both.

Why it matters

To residents

A signed message is much harder to fake. Together with DMARC, DKIM keeps forged notices in your agency's name from reaching residents.

To the agency

Major mail providers now expect senders to sign their mail. Unsigned mail from your agency is more likely to be filtered as spam, and a signature is evidence of what you actually sent.

What happens without it

  • Receivers cannot prove a message came from you, so forged and real messages look the same.
  • Forwarded mail, such as mail sent through a mailing list, often fails SPF. Without DKIM it fails DMARC too.
  • Someone could change the contents of a message in transit, such as a payment amount or a link, without it being detected.

How to check yours

Run a free check. DKIM keys are published under a name called a selector, which each mail service chooses. We look for the selectors used by common services. If we do not find one, it may mean DKIM is off, or that your service uses an unusual selector. Your IT provider can confirm.

A DKIM key record looks like this, with a long key at the end:

selector1._domainkey.yourtown.gov  v=DKIM1; k=rsa; p=MIIBIjANBgkqh...

How to fix it

  1. Turn on DKIM signing in your mail service. Microsoft 365, Google Workspace and most others have a setting for it.
  2. Publish the public key they give you in your domain's records.
  3. Do the same for every outside service that sends as you. Billing and newsletter services each have their own key.
  4. Use 2048-bit keys and replace them from time to time, and when staff with access to them leave.

Questions to ask your IT provider

  • Is every message we send signed with DKIM, including mail from outside services?
  • How long are our keys, and when were they last replaced?
  • Do our DMARC reports show any of our own mail failing DKIM?

Or work with us today

You do not have to chase the answers yourself. Let us fix your issues, or work alongside your existing IT department or provider to get them fixed and keep them that way.

Check your agency

See whether this is in place for your website and email today. It is free and takes about a minute.

Run a free check