GTMRun

DKIM: sign your email

Last updated: 2026-11-16

Google requirement

What it is #

DKIM (DomainKeys Identified Mail) adds a cryptographic signature to every email you send. Your provider signs with a private key, and you publish the matching public key in DNS at <selector>._domainkey.yourdomain.com. Receivers use it to confirm the message really came from you and wasn't altered.

Why it matters #

Gmail requires SPF or DKIM for every sender and both for bulk senders. DKIM also survives email forwarding where SPF often breaks, and DMARC can pass on DKIM alone. Without it, forwarded mail from your domain can fail authentication.

How we check it #

We look for a DKIM public key at common selectors: google, default, k1, selector1, selector2, mail, dkim, resend, s1 and s2. We pass the check if one of them holds a non-empty key (p= followed by key data).

Selectors are arbitrary, so a miss means "not found at common selectors", not proof that DKIM is off. An empty p= is a revoked key and does not count.

How to fix #

  1. Generate the key at your mail provider. Authenticate email → Generate new record (2048-bit; selector google). domain.
    • Google Workspace: Admin console → Apps → Google Workspace → Gmail →
    • Microsoft 365: Defender portal → Email authentication settings → DKIM.
    • Sending services (Resend, SendGrid, Postmark) show the record when you add your
  2. Publish the TXT record exactly as given, at <selector>._domainkey.
  3. Turn signing on. In Google Workspace, click Start authentication. Publishing the key alone doesn't sign anything.
Route 53 (2048-bit keys)
Name: google._domainkey.yourdomain.com   Type: TXT   TTL: 300
Value: "v=DKIM1; k=rsa; p=MIIBIjANBgkq…first 255 chars" "…the rest of the key"

A 2048-bit key is ~410 characters, but one TXT string holds at most 255.
Split it into two quoted strings separated by a space, in ONE value.
Receivers join the strings back together, so the signature still verifies.
Cloudflare
DNS → Add record → Type: TXT → Name: google._domainkey
Content: paste the full value — Cloudflare splits long strings automatically.
GoDaddy / Namecheap
DNS → Add → TXT → Host: google._domainkey
Value: paste the full value. If the form rejects it for length, ask support
to add it or move DNS to a host that supports long TXT records.

Verify it yourself #

dig +short TXT google._domainkey.yourdomain.com

Then send yourself a message and open Show original in Gmail. You should see DKIM: 'PASS' with domain yourdomain.com.

Runs GTMRun's own checks only — seconds, no third-party calls.

Tips #

  • Publish, then start. Google won't enable signing until it can see the record. If "Start authentication" fails, wait for DNS to propagate (usually minutes) and try again.
  • Split, don't truncate. A key cut off at 255 characters looks published but fails every signature. After publishing, compare the joined value with the original.
  • One selector per sender. Google uses google, your email service uses its own. They can all exist at once.
  • What we learned fixing gtmrun.co: our Google key was 410 characters. We stored it as two strings (255 + 155) and checked that the value, joined back together, matched Google's byte for byte before clicking Start authentication.

Sources #