What must a brand's email domain prove before it may route sign-ins to that brand's identity provider?
answer
- a claim over a namespace, not a field
- proof of control, out of band
- pending must never route
- re-check, because domains change hands
- consumer domains on a denylist
basics
~20 sControl of the domain, proved out of band - typically a record the domain's own operator publishes in DNS, which you check and re-check. An unverified claim lets the claiming tenant's identity provider vouch for every address under that domain.
solid answer
~50 sA domain claim is a request to capture every address under it, so it has to be proved by someone who controls the domain, not by someone who typed it into a form. The usual proof is a nonce you issue, published as a DNS TXT record on the domain and checked by you before the claim goes live - out of band, because the whole point is that the claimant must demonstrate authority you cannot otherwise observe. Record who claimed it, when it was verified and when it was last re-checked, and re-check periodically: domains lapse and change hands. Keep shared consumer mail domains on a denylist that no tenant may claim. Without this, adding a domain is an account-takeover primitive: the claiming brand's provider can then assert any address under it, and just-in-time creation will happily mint accounts for people who never worked there.
code
json · 16 lines{
"tenantId": "brand-coastal",
"domain": "coastal-stays.example",
"state": "verified",
"proof": {
"method": "dns-txt",
"recordName": "_app-verify.coastal-stays.example",
"nonce": "7f3c1a9e2b",
"issuedAt": "2026-08-02T09:14:00Z",
"expiresAt": "2026-08-09T09:14:00Z"
},
"firstVerifiedAt": "2026-08-02T10:41:00Z",
"lastCheckedAt": "2026-09-18T02:05:00Z",
"claimedBy": "admin:4412",
"routable": true
}go deeper
Know that a customer typing its domain into a form is a request, not a fact. Something the domain's operator publishes - a DNS record or a file on a host in that domain - is what turns it into a fact.
Explain the flow end to end: issue a nonce, the customer publishes it, you check it server-side, and only then does the domain enter the table routing reads. A pending claim must not be routable.
Show the failure you are preventing and the states around it: unverified-but-routing as an account-takeover primitive, re-verification with a grace window, the consumer-domain denylist, and how existing accounts under a newly claimed domain are handled.
Frame it as the product's namespace policy. Which claims you will honour, what you promise about accounts that pre-date a claim, and what you owe a customer whose domain moves - these set the blast radius of every onboarding your support team performs.
## Why a domain claim is a privileged operation Once a domain routes to a tenant's identity provider, that provider decides who may sign in as any address under it. A domain claim is therefore not a profile field - it is a grant of authority over a namespace. Treat adding one the way you would treat granting an administrator role: it is a privileged write, it is audited, and it needs proof. The attack is direct. A brand onboards, types a domain it does not own into its connection settings, and the next sign-in from that domain is routed to a provider that brand controls. That provider asserts whatever subject and address it likes, first-login creation mints an account, and the claiming brand now reads a namespace it has no relationship with. Nothing in the sign-in path is broken - every signature verifies - because the defect is upstream, in the claim you accepted. ## What the proof looks like - **Issue a nonce**, bound to the tenant and the domain, with an expiry. It is single-use for that claim. - **The domain's operator publishes it** where only someone with authority over the domain can put it: a DNS TXT record on the domain, or a file served under a well-known path on a host in that domain. Both demonstrate operational control; a confirmation mail to an address *in* the domain is weaker, because the person claiming may simply be an employee rather than an authority. - **You check it server-side**, from your own infrastructure, and record the outcome: who requested it, the nonce, when it first verified, and when it was last re-checked. - **You re-check on a schedule.** Domains lapse, get sold, and get reassigned inside a group of brands. A claim verified once and never revisited is an assertion about the past. ## The cases that make this hard | Case | Why it bites | What to do | |---|---|---| | Shared consumer mail domains | One tenant claiming one would capture everyone with a personal address | A denylist checked before a claim is even offered, maintained as data | | Subdomains | A brand controls a subdomain but not the parent, or vice versa | Verify the exact label routed; do not let a parent claim imply its children unless the parent proved it | | Existing accounts under a newly claimed domain | They already exist locally with their own credentials | Do not silently re-home them; decide explicitly, notify, and treat the transition as a migration | | A domain moving between brands in one group | The old tenant's routing keeps working | Re-verification catches it; unique-domain enforcement makes the handover an explicit operation | | A brand that cannot publish DNS records quickly | Central IT owns the zone and moves slowly | The claim stays pending and routing stays local - a pending claim must never route | ## The part people get wrong The dangerous state is not "unverified", it is **"unverified but already routing"**. It appears when verification is modelled as a flag on the same row that routing reads, and some code path sets the row before the check returns. Two habits prevent it: 1. **Routing reads a separate verified-domains table**, written only by the verification job. A claim in progress lives elsewhere and cannot be routed to by construction. 2. **The claim has states** - pending, verified, failed, revoked - and routing matches on `verified` explicitly rather than on "not failed". ## What verification does not prove It proves control of the domain today. It does not prove that everyone with an address under it works for that brand, that the brand's provider authenticates them well, or that the addresses the provider asserts actually exist. Those are separate decisions: the admission policy decides who gets an account, and the assertion itself decides who arrived. What verification buys is narrower and essential - the tenant asking to receive this namespace's sign-ins is the party that operates it. ## Operating it - Keep verification status visible to the customer, with the exact record still to publish and the last check time, so support conversations are self-service. - Alert your own staff when a previously verified domain stops verifying, and keep routing on for a grace period rather than cutting a brand off on a transient lookup failure - then stop. - Record every claim, verification and revocation in the audit trail with the acting administrator; this is the row you will read after an incident.
- A domain that has routed sign-ins for a year stops verifying on the nightly re-check. What do you do?Not cut it off on the first miss - a lookup failure is more often transient than malicious. Retry with backoff over a short grace window, alert your own staff and the tenant's administrators, and keep routing during the window. If it is still failing at the end of it, stop routing the domain and fall back to local sign-in, because a domain you cannot re-prove may no longer be theirs.
- Twelve accounts already exist under a domain a brand has just verified. Do they become that brand's users?Not silently. Verification proves who operates the domain, not that those twelve people agreed to be re-homed. Treat it as an explicit migration: list the affected accounts for the administrator, notify the account holders, and require a positive step before their sign-in is routed to the brand's provider. Silent absorption is exactly the takeover shape you verified the domain to prevent.
saying these in an interview costs you the question
- Accepts a domain typed into a settings form as proof of ownership
- Routes sign-ins while the domain claim is still pending verification
- Verifies once at onboarding and never re-checks the record
- Lets a verified parent domain imply every subdomain under it
- Allows a tenant to claim a shared consumer mail domain
- Silently re-homes existing accounts when a domain becomes claimed