No KYC: one verified email, no ID · Paid in crypto: BTC, USDT, USDC, ETH, SOL, LTC · .com $12.49/year, same price every year
Language: English
Find your address

Guide · checked 12 November 2026

How do I set up DKIM for a custom email domain?

DKIM is set up in your provider's admin screen and published in your DNS. The work is copying the records exactly.

Last updated: · 6 min read

Quick answer

How do I set up DKIM for a custom email domain?

Open the domain settings of your email provider, copy the DKIM records it shows and publish them in your DNS under the _domainkey name: three CNAME records for Proton Mail and Fastmail, four for Mailbox.org. Postelva hosts them in its free DNS editor, and the signing starts once the provider detects the records.

DKIM records of three providers

Read on provider help pages on 12 November 2026. Proton Mail targets are unique to your domain: copy them from the DKIM tab. Tuta, iCloud+, Migadu and Zoho Mail: copy the records from the provider's setup screen.
ProviderRecordsNames (host)Points to
Proton Mail3 CNAMEprotonmail._domainkey, protonmail2._domainkey, protonmail3._domainkeyA target under domains.proton.ch, unique to your domain
Mailbox.org4 CNAMEMBO0001._domainkey to MBO0004._domainkeyMBO0001._domainkey.mailbox.org and so on up to MBO0004
Fastmail3 CNAMEfm1._domainkey, fm2._domainkey, fm3._domainkeyfm1.yourdomain.dkim.fmhosted.com, fm2 and fm3 the same way

Last checked on ; older figures carry their own date

Set up DKIM in five steps

  1. Open the DKIM tab of your provider

    In Proton Mail it is Settings, Organization, Domain names, then the DKIM tab of the domain. In Fastmail and Mailbox.org the domain settings list the records.

  2. Copy each name and target

    Copy them exactly. Do not retype them: one wrong character in a target makes the key unreadable.

  3. Add the records in the DNS editor

    Create one CNAME record per line, with the host given by the provider. If your DNS editor appends the domain by itself, enter only the part before it.

  4. Wait, then ask the provider to verify

    Click the verify or recheck button of the provider. A new record can take from a few minutes to a few hours to be visible everywhere.

  5. Send a test message and read the result

    Send a message to an address at another provider, open its full headers and look for dkim=pass. Then move on to the DMARC record.

DKIM CNAME records: Fastmail and Mailbox.org patterns
; Fastmail (replace example.com with your domain)
fm1._domainkey.example.com.  IN  CNAME  fm1.example.com.dkim.fmhosted.com.
fm2._domainkey.example.com.  IN  CNAME  fm2.example.com.dkim.fmhosted.com.
fm3._domainkey.example.com.  IN  CNAME  fm3.example.com.dkim.fmhosted.com.

; Mailbox.org
MBO0001._domainkey.example.com.  IN  CNAME  MBO0001._domainkey.mailbox.org.
MBO0002._domainkey.example.com.  IN  CNAME  MBO0002._domainkey.mailbox.org.
MBO0003._domainkey.example.com.  IN  CNAME  MBO0003._domainkey.mailbox.org.
MBO0004._domainkey.example.com.  IN  CNAME  MBO0004._domainkey.mailbox.org.

How does DKIM work?

DKIM lets the sending server sign each message with a private key, and lets any receiver check the signature with a public key published in DNS. The signature sits in a DKIM-Signature header. It carries the signing domain (d=), the selector (s=), the signed headers (h=), a hash of the body (bh=) and the signature itself (b=). RFC 6376, an Internet Standard, defines these tags.

The receiver builds the DNS name from the selector and the domain: selector._domainkey.domain. For the selector fm1 and the domain example.com, it asks for fm1._domainkey.example.com. The answer is a record with the tags v=DKIM1, k=rsa and p= followed by the public key in base64. An empty p= means the key is revoked.

A valid signature proves two things: the message was signed by a system that holds the private key for that domain, and the signed parts did not change in transit. It does not say the message is wanted. That judgement belongs to DMARC, covered in SPF vs DKIM vs DMARC.

Why do providers ask for CNAME records instead of a key?

A CNAME hands the key to the provider: the public key stays at the provider's address and the provider can replace it without asking you to edit DNS. Proton Mail, Fastmail and Mailbox.org all use this pattern. Their records are CNAMEs from your selector name to a host they control, which holds the actual key record.

The benefit is key rotation. RFC 6376 advises publishing new keys under new selectors rather than reusing a selector, and Proton Mail publishes three selectors (protonmail, protonmail2, protonmail3), which gives the provider room to move from one key to the next. The cost for you is trust: you rely on the provider's host to keep answering.

According to Postelva's comparison of 12 November 2026, the three providers whose DKIM records were read on their help pages need 3, 4 and 3 CNAME records, 10 in all, and none asks for a TXT key.

How long should the DKIM key be?

Use a 2048-bit RSA key; 1024 bits is the minimum that RFC 6376 allows for long-lived keys. The standard says signers must use RSA keys of at least 1024 bits, and verifiers must be able to check keys from 512 to 2048 bits. Google's sender guidelines ask for at least 1024 bits and recommend 2048. When the provider creates the key, as with the CNAME setup above, the length is its choice and nothing is left for you to configure.

When you must pick a size yourself, pick 2048. A 2048-bit key is longer than one 255-character string in DNS, so the TXT value is split into several strings, which most DNS editors do on their own. The same editor limit applies to the SPF record described in how to create an SPF record.

Can I use several providers on one domain?

Yes: each provider signs with its own selector, so their DKIM records do not collide. The selector is the reason. Proton uses protonmail, protonmail2 and protonmail3; Fastmail uses fm1, fm2 and fm3; Mailbox.org uses MBO0001 to MBO0004. A newsletter tool that sends in your name adds a selector of its own.

SPF is different: it holds one record for all senders, with a 10-lookup limit. When you leave a provider for good, remove its DKIM records after you have confirmed that the new one signs, so that an abandoned key cannot be used by anyone who gains access to the old account. For the full order of a migration, see how to move email to a new provider without losing mail.

How do I check that DKIM works?

Look the selector up with dig and then send a real message. The command dig CNAME fm1._domainkey.example.com +short should print the provider's target. For a TXT key, ask for TXT instead. The decisive test is a message: the headers of the received copy show whether the receiving server recorded dkim=pass.

If the record is correct and the check still fails, the usual causes are a wrong host name (the domain added twice by the DNS editor), a stale cache, or a message sent before the provider activated signing. The next guide, how to check MX, SPF, DKIM and DMARC records, lists the commands. The Fastmail steps in full are in the Fastmail custom domain guide.

DKIM setup questions

What is a DKIM selector?

A selector is a label chosen by the signer that identifies one key, such as fm1 or protonmail. It lets a domain keep several keys at once and rotate them without downtime.

Do I need DKIM if I already have SPF?

Yes. SPF breaks when a message is forwarded, while a DKIM signature survives if the message is not altered. Gmail's bulk sender rules ask for both.

Why does my DNS editor reject a record starting with an underscore?

Underscore names such as _domainkey are valid in DNS, even though they are not valid host names. Enter the host exactly as the provider shows it, without adding the domain twice.

Can I change the DKIM selector?

The provider sets it. Mailbox.org uses MBO0001 to MBO0004, Fastmail fm1 to fm3 and Proton Mail protonmail to protonmail3. Keep the names unchanged.

Does DKIM encrypt the message?

No. It signs the message to prove origin and integrity, and does not hide the content.

In summary
  • DKIM signs each message; the public key sits at selector._domainkey.domain.
  • Proton Mail and Fastmail need 3 CNAME records, Mailbox.org 4.
  • Copy names and targets exactly from the provider's screen; Proton Mail targets are unique to your domain.
  • RFC 6376 requires signers to use RSA keys of at least 1024 bits; 2048 is recommended.
  • Each provider uses its own selectors, so several can sign for one domain.
  • Test with dig and a real message showing dkim=pass.
  • Postelva hosts the records in free DNS; a .com costs $12.49/year every year.
Sources (5)
  1. RFC 6376, DomainKeys Identified Mail (DKIM) Signatures — RFC Editor (read 2026-11-12)
  2. Email sender guidelines — Google Workspace Admin Help (read 2026-11-12)
  3. Custom domain and anti-spoofing — Proton (read 2026-11-12)
  4. SPF, DKIM and DMARC for a custom domain — Mailbox.org (read 2026-11-12)
  5. Fastmail DNS help — Fastmail (read 2026-11-12)

.com $12.49/year · no KYC · crypto

Find your address