carlos / platform Public

Custom domains: stale misdirected verdict after a DNS fix; apex beyond A records Issue open

What happened (2026-11-23, flagship)

A member switched registrars for an apex domain (example.co.uk). For a short while its A records pointed somewhere else, then they fixed them. Public resolvers (Google, Cloudflare over DoH) returned exactly the four ingress addresses we ask for, with TTL 60. carlos domains verify still said:

STATE: misdirected - This hostname resolves, but not to this deployment. Update the records below to point it here. Create: A example.co.uk -> (the same four addresses they already have)

They tried an ALIAS too. Nothing they could do would help, and the output told them to create records that already existed.

Why

  • The verdict is a box stamp, not a live check. Every platform box re-resolves every 5-6 min through its system resolver (resolveHost, internal/host/agent.go:4071; loop at :4258), and dnsStatus (internal/domains/reconcile.go:551) stamps "pointing" if any answer is ours. verify and the domains door only read the stamps.
  • The box's resolver caches the WRONG answer for the TTL that record had when it was fetched (often 3600 at a new registrar), not the new 60 s. So a fix can sit behind "misdirected" for up to an hour plus a sweep.
  • That costs more than wording. While the stamp is not "pointing", the edges-file pass withholds the alias (internal/host/edgesfile.go:763), so only the home box serves it and other regions' edges cannot answer or order its cert.
  • The guidance does not say what we actually saw, so neither the member nor support can tell a stale cache from a wrong record.

Plan

A. Authoritative second look on the box (fixes the delay). In dnsStatus, when the recursive answer reads "elsewhere", ask the domain's authoritative nameservers once (LookupNS, then a net.Resolver{PreferGo: true} whose Dial targets an NS address; no new dependency). If the authoritative answer is ours, stamp "pointing". It is safe for the #287 publication bound, because that bound is about whether the name really resolves to us, and the zone's own servers say it does. Cost: one extra lookup only for hosts already reading "elsewhere", capped per pass, 3 s timeout, and failure falls back to today's verdict. "unresolved" and NXDOMAIN keep their current meanings.

B. Record what we saw. Stamp the observed addresses (capped at 8) beside dns_status and carry them through status.AliasReading and domainListItem as an additive observed field. A misdirected row then says "We see 1.2.3.4. These records should be:", not a bare list.

C. A fresh check on verify. The per-host door and carlos domains verify do the same authoritative lookup live (rate-limited per host). If the zone is already right but the edges have not caught up, show a new reason (say "propagating", still not live) with no records to create and an honest wait ("within a few minutes"). That needs the console box to have outbound port 53 to arbitrary nameservers. Check this on dev first; if it is blocked, C falls back to B's observed field and A's shorter wait.

D. CLI wording. Replace "Create:" with wording that holds when the records exist ("Records:", and mark which ones we already see). Copy review before it ships.

E. Apex without A records (Paul to rule). For apexes, also offer an ALIAS/ANAME/flattened CNAME at the steering host (edge.<apps-domain>) as an alternative set, with A records as the fallback. The box check already accepts it (any answered address in the set is "pointing"). It needs a structured record type for it (additive) and copy review.

Tests (targeted -run only): dnsStatus authoritative fallback (recursive elsewhere + authoritative ours = pointing; authoritative error = elsewhere stays); claimState propagating; domainRecords apex alias set; guidance/records lockstep.

Out of scope here: fixed apex IPs (Global Accelerator), set aside on 2026-11-01 in the domain registration spec (non-goals; section 5.4 leaves room). Raised to Paul again separately.

Correction: the "Why" and plan item A above were written from a checkout 236 commits behind main. Main already has A. Since #724 (f3a9531e, then 89f6d8ed and 0b6fb0c9; on flagship since v0.34.40), StampHealth gives every un-pointing custom name ("" or "elsewhere") an uncached look through FreshResolver (internal/domains/freshdns.go), and that look can upgrade the verdict to "pointing". So "cached for the old record's TTL" is not the explanation.

Candidate causes for this report, none confirmed yet:

  1. Timing: the member checked within one stamp pass (5-7 min) of the fix.
  2. Nameserver change: FreshResolver gets the registrable domain's NS set from the cached resolver (LookupNS). A registrar move that also moved DNS hosting leaves the boxes asking the OLD provider for that NS set's TTL. If the old provider still serves the zone with the wrong records, both looks read "elsewhere". The NS set's TTL is 3600 on the new provider (DNSimple), and the .uk parent delegation TTL is 2 days.
  3. Backoff: a fresh look that failed during the switch is answered from the 30-minute failure backoff.

Next: ask the member whether it has cleared and whether the nameservers changed. Read the flagship home box's domains log only with Paul's OK. Do not change freshdns.go until the cause is known; for cause 2, the fix would be to take the registrable domain's NS from the parent zone's referral rather than the cache.

Being built now, valid whatever the cause:

  • D: the CLI's "Create:" lead is wrong when the records already exist; plus the misdirected detail says a just-made change shows on the next check.
  • E: apexes are offered ALIAS/ANAME/flattening at the steering host (an additive "alias" record set) beside the A records, wherever the deployment has a steering host (flagship does: edge.oncarlos.com).

Cut: B (observed addresses in the stamp: registry schema change) and C (live console lookup), since #724 covers the box side. Reopen if cause 2 holds and the member needs more to see while waiting.

Branch apex-alias-1383 (e43d2479): items D and E built. Astra round 1 READY, no findings; census envelope . approved on #280. Waiting on Paul's copy review of the six strings before merge.

Follow-up from Astra (not a finding on this branch): the ALIAS target edge.<apps-domain> carries what steering publishes (armed fixed-box EIPs, internal/steering/steering.go:374), while boxes judge "pointing" against PLATFORMEDGEIPS plus published box addresses, and configured ingress is a third list (CONSOLEREGIONINGRESS). Today they line up by operator practice, not by an enforced subset. When G5 moves the public front door to load-balancer addresses, or fixed boxes retire, steering's records, the edge set and the ingress list have to move together, or ALIAS (and the subdomain CNAME, which has the same dependency already) users read "misdirected". Worth a line in the G5 card.

Cause confirmed on flagship (annie-welding, 2026-11-23): the box's resolver still caches the domain's OLD NS set; the old provider still answers authoritatively with the old A record (TTL 86400). FreshResolver takes the registrable domain's NS from the cache, so it asks the old provider and stamps "elsewhere"; the alias is never published, and the other regions answer "unknown host". The owner can fix it by matching the records at the old provider.

Small fix (fresh-elsewhere-cached-1383, 4df34a2d): CUT, not merged. Astra R1 NOT READY with a P1: the old host's A record proves nothing at the new host, so the cached query can plant an NXDOMAIN there (the #724 family). Census REJECTED by Astra. Fable R1 READY AFTER FIXES with the same concern at P2. Both named the root fix.

Now (Paul's go): parent-delegation-1383. FreshResolver takes the delegation from the parent zone's servers, uncached and verified, with a fallback to today's cached NS set. Fable builds and Astra reviews, at most three rounds.

parent-delegation-1383 at 5404bae1: Astra round 1 READY AFTER FIXES (no P1; one P2: referred-nameserver lookup could spend the fallback's time). P2 fixed with a regression test that fails without it; Astra fix check FIX CONFIRMED. Census approved on #280. CI running.

Accepted limits (fall back to the cached NS set, i.e. main's behaviour): a registry server that also holds the registrable zone and answers with authority; a referral through an intermediate zone; a truncated referral (no EDNS). Follow-ups if they ever bite.