ADR-0095 — A domain is verified when it points here, not when you own it
Status: Accepted · Date: 2026-08-29 · Track: 007 phase 04 · Supersedes nothing · Builds on: ADR-0089
Context
domains.is_verified has existed since the domains surface shipped, with a
Verify button, a badge, and a repository method that set the column to TRUE
for anything that called it. The handler then asserted the same on the struct it
answered with, so the response and the row agreed about something neither had
checked. There was no DNS call anywhere in apps/api.
Making the button mean something requires deciding what it should assert, and the two candidate answers are not the same claim:
Ownership. A TXT record carrying a token we issued proves the person controls the name. It is the industry-standard check, and it needs a token column, a migration, a place in the UI to show the token, and a way to rotate it.
Delivery. The name resolves to this deployment. That is a weaker claim about
who someone is and a stronger one about whether the product works: redirect.go
resolves a request's Host to a domains row and serves that domain's links,
so a domain that does not resolve here serves nothing no matter who owns it.
Decision
Verified means the host points at this deployment. Two shapes count, because both are legitimate DNS for a customer:
- a CNAME whose final target is
DOMAIN_VERIFICATION_TARGET; - A/AAAA records sharing an address with that target's own — which is what an apex domain must do, a CNAME being illegal there.
Names are compared case-insensitively and without the trailing dot DNS answers
carry, because EXAMPLE.COM. and example.com are the same name and a
comparison that says otherwise fails a correctly configured domain.
A deployment that cannot say what to point at verifies nothing. With
DOMAIN_VERIFICATION_TARGET unset the endpoint answers 503 and writes nothing.
There is no default: a guessed target would verify domains against a name nobody
chose, which is the shape of the defect being closed.
The outcome is recorded either way. SetVerified takes the result, so a
domain that has stopped pointing here stops being verified when anyone
re-checks, and last_verified_at records when the check ran rather than when
it last passed.
Our own failure is not the customer's verdict. If this deployment cannot resolve its own target, the endpoint answers 503 and leaves the row untouched — otherwise our DNS outage would un-verify every working customer domain.
Consequences
- Ledger row
domain-dns-verificationis enforced — 6 of 8 → 7 of 8, phase 04 1/1. Only pixel emission remains. - This is not an ownership check, and it should not be described as one. A
domain someone else points at us would pass it; what they would gain is a
hostname serving our 404s, since no
domainsrow is theirs. If ownership is ever needed — for issuing certificates, say — that is a TXT token and a second check, not a redefinition of this one. - The backfill of rows verified by the old no-op stays an owner decision (007 charter blocker 1). It is now less pressing: a re-check clears a stale badge wherever anyone presses the button.
- Track 009's subdomain addressing inherits the question one level down — a subdomain of our domain needs no customer DNS at all, so it needs no verification, which is worth saying before that track invents one.
- The Verify button's answer now reaches the operator, naming the host and the target: a real check that can fail must say why, or it reads as a button that does nothing.
Source: docs/decisions/0095-a-domain-is-verified-when-it-points-here-not-when-you-own-it.md