← Building This Site

Part 2

Email that lands: SPF, DKIM, DMARC, and verifying your domain

Anyone can put your address in a From line. SPF, DKIM, and DMARC are how a receiving server tells your real email from a forgery — and why unverified mail lands in spam. Here's what each one does and how verifying a sending domain actually works.

The reason a "from your own domain" email is more work than it should be comes down to one uncomfortable fact: email has no built-in proof of who sent it. Anyone can type From: you@yourdomain.com and hit send. SPF, DKIM, and DMARC are the three DNS records that let a receiving server tell your real mail from a forgery — and without them, your perfectly innocent welcome email gets filed under spam. This chapter is what each one does, in plain terms, and how "verifying a sending domain" actually works.

The problem: From is just a label

When your provider sends mail as hello@yourdomain.com, the receiving server (Gmail, Outlook…) has to answer a question you can't see: is this sender actually allowed to send for yourdomain.com, or is it a spammer wearing your name? With nothing to check, the safe assumption is "suspicious" — so unauthenticated mail gets throttled, foldered, or dropped.

No auth records

SPF + DKIM + DMARC pass

Provider sends as
hello@yourdomain.com

Receiving server:
is this legit?

Spam / rejected

Inbox

The three records answer that question from three angles. You don't have to love the acronyms; you just need the one-line job of each.

SPF — which servers may send for you

SPF (Sender Policy Framework) is a TXT record that lists who is allowed to send email on your domain's behalf. When mail arrives, the receiver checks the sending server against your list. On the list → pass. Not on it → suspicious.

TXT   send.yourdomain.com   "v=spf1 include:amazonses.com ~all"

That include: delegates to your provider's own SPF (here, Amazon SES, which many providers send through). The ~all at the end means "anything not listed is a soft-fail." One rule worth burning in: a given name can have only one SPF record. Two SPF TXT records on the same host is a misconfiguration that breaks both — if you already have one, you merge, you don't add a second.

DKIM — a signature that proves it wasn't forged

DKIM (DomainKeys Identified Mail) is the strong one. Your provider holds a private key and cryptographically signs every message. You publish the matching public key as a TXT record. The receiver uses the public key to verify the signature — which proves both that the mail was authorized and that nobody tampered with it in transit.

TXT   resend._domainkey.yourdomain.com   "p=MIGfMA0GCS...your-public-key...AQAB"

The resend._domainkey part is a selector — a label so a provider can rotate keys and run more than one. The long p=… value is the public key; paste it exactly, as one unbroken string. (The private half never leaves the provider — that's the whole point.)

DMARC — what to do when checks fail, and a paper trail

SPF and DKIM each prove something, but they don't say what a receiver should do on failure, and they don't quite tie the check to the visible From: address. DMARC (Domain-based Message Authentication) closes both gaps: it sets a policy and requests reports.

TXT   _dmarc.yourdomain.com   "v=DMARC1; p=none; rua=mailto:you@yourdomain.com"
  • p=none — monitor only (don't act on failures yet). Start here.
  • p=quarantine — send failures to spam.
  • p=reject — refuse them outright.

The smart sequence is none → quarantine → reject: start in monitor mode, read the reports (rua=) to confirm your legitimate mail passes, then tighten. Going straight to reject before you've verified your own mail authenticates is how people accidentally send their own newsletter to the void.

p=none
(monitor + collect reports)

p=quarantine
(failures → spam)

p=reject
(failures refused)

Putting it together: verifying a sending domain

"Verify your domain" in a provider's dashboard is just this dance: the provider generates the records, you publish them in DNS, the provider checks they're live.

Found

Not yet

1 · Add your domain
in the provider

2 · Provider gives you
DNS records (DKIM, SPF, MX)

3 · Add them to your DNS

4 · Provider checks
they're published

Verified → you can send
from your domain

Wait for DNS to propagate,
re-check

A few things that trip people up at step 3 and 4:

  • Providers often put these on a subdomain (e.g. send.yourdomain.com). That isolates your sending reputation and your SPF from your apex domain's existing mail — a feature, not a quirk.
  • There's usually an MX record too (send → some feedback-smtp… host). That's for bounce and complaint handling, so the provider knows when a send failed.
  • DNS-only, never proxied. If your DNS host has a proxy toggle (Cloudflare's orange cloud), these records must be DNS-only. TXT and MX aren't proxyable anyway, but it's worth checking.
  • Propagation is real. After you add the records, the provider may not see them for minutes. "Not verified yet" right after adding is almost always propagation, not a mistake. Confirm what's actually published with a quick DNS query before you assume you got a value wrong:
dig +short TXT resend._domainkey.yourdomain.com @1.1.1.1
dig +short TXT send.yourdomain.com @1.1.1.1     # SPF
dig +short MX  send.yourdomain.com @1.1.1.1

If dig shows the values but the dashboard still says unverified, you're just waiting. If dig shows nothing, the record didn't save — fix that, not the provider.

The scoreboard

RecordOne-line jobExample host
SPF (TXT)Which servers may send for yousend.yourdomain.com
DKIM (TXT)Public key to verify the signatureselector._domainkey.yourdomain.com
DMARC (TXT)Policy on failure + reports_dmarc.yourdomain.com
MXWhere bounces/feedback gosend.yourdomain.com

The mental model that makes all four click: email is trust you have to publish. SPF says who may speak for you, DKIM proves the words weren't changed, DMARC says what to do if either fails and mails you the receipts, and MX catches the bounces. Publish them, wait for DNS, verify — and your mail starts landing in inboxes instead of spam.