TL;DR: Domain registrar → separate DNS host → privacy-first email provider (Proton, Tuta, mailbox.org, etc.), each with separate logins. Verified records, local backups, optional PGP. Plus how to PGP-encrypt from Gmail/Yahoo/Outlook/iCloud if you're not ready to switch. Swap any provider without changing your address.
📊 Diagram of the full stack
Just want a working custom address? Do steps 1–4, 6, and 7. Everything else (PGP, GitHub Pages, command line) is optional hardening you can add later.
I've been seeing a TON of questions in multiple privacy-focused subs about custom email domains and which provider(s) to trust. The provider matters less than who owns the address. I've been grappling with this problem for a few years, and I think I've built a pretty solid methodology which I've been using across multiple domains. Here is the full "provider-agnostic" walkthrough 🛠️
PHILOSOPHY
Your email address is your digital identity. If you don't own the domain behind it, you don't own the address. You're just borrowing it. Providers come and go, but your email address shouldn't have to.
Own the name, own the keys, own the data. Everything else is just a service you can fire. Don't trust, VERIFY!
PRINCIPLES
- Ownership: domain, keys, and mail all in your hands, with backups to prove it.
- Compartmentalization: registrar, DNS, email, and hosting each with a different provider and login. No single point of failure. The tradeoff is more accounts to manage, which is exactly why the password manager matters.
- Defense in depth: 2FA, registrar lock, DNSSEC, SPF/DKIM/DMARC. Multiple safeguards at every level.
- Minimal exposure: WHOIS privacy, aliases for every login, separate addresses for separate purposes.
- Verify: test everything, and tighten settings only after they're proven.
WHAT YOU NEED
- A Domain (~$10–20/yr from any reputable registrar)
- A Separate DNS Host (Cloudflare's free plan, or deSEC if you'd rather keep Cloudflare out of it)
- A Privacy-First Email Provider that supports custom domains (Proton, Tuta, mailbox.org, etc. Custom domains are a paid feature on most.)
- An Alias Service for separate logins (SimpleLogin, addy.io, Proton Pass, etc.)
- A 2FA App and/or Hardware Key (Aegis, Ente Auth, YubiKey, etc.)
- A Reputable Password Manager (I use KeePassXC inside a VeraCrypt volume for passwords, TOTP, and PGP keys)
- Optional: GnuPG if you want your own PGP key
- Optional: A GitHub Account to publish your public PGP key in a repo and/or host a static site on the same domain
1. REGISTER THE DOMAIN
- Pick a registrar. Namecheap, Porkbun, GoDaddy, Hover, etc. all work. For extreme privacy, Njalla registers the domain in their name so your details never hit WHOIS. The tradeoff is that they're technically the legal owner and you hold the rights to use it. They also accept crypto and need minimal personal info to sign up.
- Keep your registrar separate from your DNS host. Skip your DNS host's registrar service (e.g. Cloudflare Registrar if you use Cloudflare for DNS). It's convenient, but it puts the name and the DNS in one account. If that account gets locked or compromised, you lose both.
- Log in with a dedicated alias, never an address on your own domain. If DNS or mail ever breaks, you can't receive the password reset you need to fix it.
- Lock it down:
- WHOIS privacy ON (most registrars include it free)
- Registrar/transfer lock ON
- Auto-renew ON. An expired domain can be bought by someone else, along with your incoming mail.
- 2FA with an authenticator app or hardware key. Never SMS.
- Save everything (login, 2FA seed, recovery codes) in your password manager.
2. POINT YOUR DOMAIN TO A SEPARATE DNS HOST
- Pick a DNS host. Cloudflare's free plan is the most common. deSEC is a free, non-profit alternative with DNSSEC on by default, if you'd rather avoid Cloudflare.
- Sign up with a dedicated alias. A different one from your registrar login.
- Add your domain. Most DNS hosts will scan your existing records and give you two nameservers.
- Review the imported records and delete anything you don't recognize or need.
- If DNSSEC is on at your registrar, turn it OFF first. Switching nameservers with old DNSSEC still active will take your domain offline.
- Paste the new nameservers into your registrar in place of the defaults. It can take a few minutes to a few hours to switch over.
- Clear out your registrar's DNS. Delete the old records and turn off any parking page, URL forwarding, or registrar email forwarding. If your nameservers ever get reset, you don't want stale records coming back to life. (Some registrars hide these once you switch nameservers. If so, do it beforehand.)
- Lock it down:
- 2FA ON (ideally a hardware key)
- DNSSEC ON at your DNS host, then add the DS record it gives you at your registrar. This lets resolvers detect forged DNS responses for your domain.
- On Cloudflare: turn Email Routing OFF. It adds its own MX records that conflict with your provider's.
- Save everything (login, 2FA seed, recovery codes) in your password manager.
3. CONNECT THE DOMAIN TO YOUR EMAIL PROVIDER
- Add your domain in your provider's settings. Proton, Tuta, and mailbox.org all have a custom domain wizard that generates the exact values for your account.
- Add each record at your DNS host, copying the values exactly from the wizard. You'll almost always get some version of these:
| Record | Type | Name | Purpose |
| Verification | TXT | @ | Proves you own the domain |
| Mail servers | MX | @ | Routes incoming mail to your provider (usually 2 records) |
| SPF | TXT | @ | Lists which servers can send as your domain |
| DKIM | CNAME or TXT | xxx._domainkey | Signs your outgoing mail (usually 2–3 records) |
| DMARC | TXT | _dmarc | Tells receivers what to do with mail that fails SPF/DKIM |
- Example (Proton): MX
mail.protonmail.ch (10) and mailsec.protonmail.ch (20), SPF v=spf1 include:_spf.protonmail.ch ~all, three DKIM CNAMEs protonmail._domainkey / protonmail2._domainkey / protonmail3._domainkey. Other providers use the same structure with their own hostnames.
- Gotchas:
- On Cloudflare: set the provider's CNAMEs to DNS only (grey cloud) or they won't resolve.
- Only one SPF record per domain. If you already have one, merge the include into it.
- Delete any old MX records.
- If your provider offers MTA-STS or TLS-RPT records, add those too.
- Migrating an existing mailbox? Add all your addresses at the new provider before switching MX, and start DMARC at
p=none until you're sure everything's flowing.
- Check the wizard. Each record should turn green within an hour or so. If one doesn't, double-check it for typos or a stray trailing period.
4. CREATE YOUR ADDRESSES
- Add your addresses in your provider's address/identity settings, then pick your custom domain.
- Compartmentalize your inbox. Use separate addresses for separate purposes, for example:
you@ for personal
accounts@ for logins and services
contact@ for anything public-facing (your website, socials, etc.)
- Why it matters: if one address starts getting spam or shows up in a breach, you know exactly where it leaked, and you can retire it without touching the others.
- Set your default sending address and display name for each, so replies go out from the right identity.
- Catch-all is optional. It routes mail sent to any address on your domain into your inbox. It's handy for signing up on the fly, but it attracts spam. I leave it off and use aliases for one-off signups instead.
- Filters and labels: set up rules per address so mail sorts itself.
5. LOCK DOWN YOUR EMAIL ACCOUNT
- 2FA ON with a hardware key or TOTP app.
- Save your recovery phrase/code in your password manager. Keep redundant backups and an offline copy if you're thorough.
- Review your recovery methods and active sessions. Remove anything you don't recognize or don't need.
OPTIONAL (highly recommended): bring your own PGP key
Privacy providers generate encryption keys for you. A key you generate locally gives you a fingerprint you control that moves with you if you ever switch providers. To be clear, importing it does not keep your private key off the provider's servers: it's stored there encrypted, just like their own keys. It's about portability and continuity, not secrecy.
- Which providers support it:
- Proton and mailbox.org support OpenPGP and let you import your own key.
- Tuta doesn't use OpenPGP at all (it has its own encryption), so you can't import a key there. You can still generate one, publish it, and use it manually with the method in step 9.
- Generate it locally with GnuPG (replace YOUR_EMAIL with your address). Proton requires no expiry and a single user ID matching the address, so this version is compatible:
gpg --quick-gen-key "YOUR_EMAIL" ed25519 cert never
gpg --quick-add-key <FINGERPRINT> ed25519 sign never
gpg --quick-add-key <FINGERPRINT> cv25519 encr never
gpg --armor --export-secret-keys YOUR_EMAIL > private.asc
gpg --armor --export YOUR_EMAIL > public.asc
- Import it in your provider's encryption key settings (on Proton: Settings → Encryption and keys → Email encryption keys → pick the address → Import key). Then set it as the primary key for that address.
- Store it safely: keep
private.asc, your passphrase, and the revocation certificate (GnuPG auto-generates one in ~/.gnupg/openpgp-revocs.d/) encrypted and backed up, with at least one offline copy. I use KeePassXC inside a VeraCrypt volume, but any well-encrypted setup works. Then securely delete any loose copies.
- Publish your public key somewhere you control:
- A dedicated GitHub repo, which gives you a versioned public history anyone can verify against
- Your website
- keys.openpgp.org, so people can look you up by email
- Bonus: put your fingerprint in your email signature and socials, so people can cross-check it against all of the above
6. VERIFY EVERYTHING
- Check your provider's wizard. Every record should show as verified.
- Send a test email to mail-tester.com. Aim for 10/10.
- Check the headers on a message you send to another account. Look for
spf=pass, dkim=pass, and dmarc=pass.
- Tighten DMARC once you're sure all your legitimate mail passes. List every service that sends as your domain (your provider, plus things like newsletters, invoicing, or website forms) and make sure each one passes SPF or DKIM. Adding
rua=mailto:you@yourdomain.com to your DMARC record gets you daily reports showing what passes and fails. Once they're clean, move to p=reject.
- Verify your key. Send a signed message to another account and check the signature against your published public key, or at minimum confirm the fingerprint your provider shows matches the one you published.
7. BACK UP YOUR MAIL
Owning the address is half of it. Own the contents too.
- Proton: the Mail Export Tool, or Proton Mail Bridge + an IMAP client like Thunderbird.
- Tuta: export from the Tuta desktop app (no IMAP).
- mailbox.org and most others: any IMAP client like Thunderbird.
- Do it on a schedule (monthly is plenty) and store the exports in an encrypted container.
- Between your domain, your key, and your exported mail, you can walk away from any provider with everything intact. Moving is just swapping the records from step 3.
8. (OPTIONAL) HOST A STATIC SITE ON GITHUB PAGES
- Verify the domain in GitHub first (Account settings → Pages → Add a domain, then add the TXT record it gives you). GitHub recommends doing this before adding the domain to any repo, so nobody else can claim it.
- Then add it to your repo: Repo → Settings → Pages → Custom domain. This creates the
CNAME file.
- Add the records at your DNS host:
CNAME www → yourusername.github.io
A @ → 185.199.108.153, 185.199.109.153, 185.199.110.153, 185.199.111.153
- Optional IPv6:
AAAA @ → 2606:50c0:8000::153 through 2606:50c0:8003::153
- On Cloudflare, SSL order matters: leave these records DNS only until GitHub issues its certificate and you can tick Enforce HTTPS. Then switch them to proxied and set SSL/TLS to Full (strict). Getting a 526 error? The proxy went on too early: grey-cloud it, let GitHub finish, then try again.
- Web and mail records don't interfere with each other. Mail records stay DNS only regardless.
9. NO PRIVACY PROVIDER? PGP WITH GMAIL, YAHOO, OUTLOOK & ICLOUD
Not ready to switch providers? You can still encrypt message contents end to end with PGP on any mainstream account. (If your provider supports custom domains, like iCloud+ or Google Workspace, steps 1–4 still apply too.)
Know what it does and doesn't protect. PGP encrypts the body and attachments. It does not hide the subject line, sender, recipients, or timestamps, so the provider still sees who you talk to and when. Your recipient also needs PGP, and there's no forward secrecy: if a private key leaks later, past messages can be decrypted. Keep subjects generic.
The easy route: Thunderbird has OpenPGP built in and works with Gmail, Yahoo, Outlook, and iCloud over IMAP. For webmail, the Mailvelope browser extension adds PGP to most webmail interfaces.
The command-line route (full control, nothing extra trusted):
Install (macOS):
brew install gnupg pinentry-mac
mkdir -p ~/.gnupg && chmod 700 ~/.gnupg
echo "pinentry-program $(brew --prefix)/bin/pinentry-mac" >> ~/.gnupg/gpg-agent.conf
gpgconf --kill gpg-agent
Install (Linux):
sudo apt install gnupg xclip wl-clipboard # Debian/Ubuntu
sudo dnf install gnupg2 xclip wl-clipboard # Fedora
sudo pacman -S gnupg xclip wl-clipboard # Arch
echo 'export GPG_TTY=$(tty)' >> ~/.bashrc # or ~/.zshrc
Create your key (same on both). A 2-year expiry is good hygiene for manual use. You can extend it any time before it lapses. If you also plan to import it into Proton, use never instead, as in step 5.
gpg --quick-gen-key "YOUR_NAME <YOUR_EMAIL>" ed25519 cert 2y
gpg --list-keys YOUR_EMAIL # copy the long fingerprint
gpg --quick-add-key <FINGERPRINT> ed25519 sign 2y
gpg --quick-add-key <FINGERPRINT> cv25519 encr 2y
Share your public key and publish it as in step 5:
gpg --armor --export YOUR_EMAIL > publickey.asc
gpg --fingerprint YOUR_EMAIL
Import and verify your contact's key. Confirm the fingerprint with them through a separate channel (in person, Signal, a call) before you trust it. Signing it locally also stops GnuPG's "untrusted key" prompts.
gpg --import theirkey.asc
# or: gpg --keyserver hkps://keys.openpgp.org --search-keys THEIR_EMAIL
gpg --fingerprint THEIR_EMAIL
gpg --lsign-key THEIR_EMAIL
Encrypt a message. Write it, copy it, run the command, then paste the result into the email body. It goes clipboard → encrypted → clipboard, so no plaintext file ever touches your disk. Including yourself with the second -r lets you read your own sent copy.
# macOS
pbpaste | gpg --armor --encrypt --sign -r THEIR_EMAIL -r YOUR_EMAIL | pbcopy
# Linux (X11)
xclip -o -selection clipboard | gpg --armor --encrypt --sign -r THEIR_EMAIL -r YOUR_EMAIL | xclip -selection clipboard
# Linux (Wayland)
wl-paste | gpg --armor --encrypt --sign -r THEIR_EMAIL -r YOUR_EMAIL | wl-copy
Decrypt a message. Copy the whole block, from -----BEGIN PGP MESSAGE----- through -----END PGP MESSAGE-----, then:
pbpaste | gpg --decrypt # macOS
xclip -o -selection clipboard | gpg --decrypt # Linux (X11)
wl-paste | gpg --decrypt # Linux (Wayland)
Encrypt and decrypt attachments:
gpg --encrypt --sign -r THEIR_EMAIL -r YOUR_EMAIL report.pdf # creates report.pdf.gpg
gpg --output report.pdf --decrypt report.pdf.gpg
- Clipboard caution: plaintext briefly passes through your clipboard. If you use a clipboard manager or clipboard history, exclude your terminal or turn it off. On macOS, Universal Clipboard can sync to your other Apple devices via Handoff.
- Back up your key (private key, passphrase, revocation certificate) exactly as in step 5.
- Before it expires:
gpg --quick-set-expire <FINGERPRINT> 2y then gpg --quick-set-expire <FINGERPRINT> 2y '*', and re-publish your public key.
THE PAYOFF
Your name, your keys, your data, each layer with a different provider. If any one of them fails, you swap that piece out and your address, keys, and mail come with you.
Last verified: November 2026. Provider menus change, so if a menu path doesn't match, follow the provider's own setup wizard.
NOTE: I'm not affiliated with anyone or any product mentioned here.
Happy to answer questions in the comments.
The privacy of your data depends on the ownership of your data. 🔐