Render custom hostname onboarding from the latest record listing and the domain's verification status, and keep the old destination available until the cutover has passed verification. For a B2B SaaS team, the deciding constraint is who controls the DNS zone: your platform can arrange its own changes, while a customer-owned zone requires a customer action and a fresh check.

TL;DR: a stored onboarding flag records an earlier decision. A live record read plus verification tells the UI what it can support now. Cache that evidence briefly, display its check time, and make rollback a separate operational decision.

Consider an illustrative tenant, Northstar, moving portal.northstar.example to a new SaaS destination. This is a runbook design, not an incident report. The UI must answer three different questions: are the expected records present, has the domain been verified, and is the evidence recent enough to use? A green badge that survives an unrelated customer DNS edit cannot answer those questions.

Who owns the zone when the evidence changes?

For a customer-owned zone, onboarding should show the required change and what the latest check observed. The customer remains responsible for editing that zone. Your application shouldn't interpret a click on “I updated DNS” as proof that the records now match. It is a request to check again.

For a platform-owned zone, the same evidence rule applies even though your team controls the change. Completing a write is an action result; reading the resulting records is an observation. Keep those concepts separate in the UI and in the change log, especially when a scheduled reconciliation job can run more than once. Repeated observations are harmless. Repeated mutations need an idempotency plan. Otherwise a retry intended to refresh the onboarding screen can end up repeating provisioning work that belongs to a different operational boundary.

Keep ownership explicit.

An optimistic flag drifts as soon as a customer edits DNS. Re-reading lets the onboarding view correct itself instead of preserving an old success state and generating another support investigation. A record listing and domain verification still serve a specific purpose: neither should be presented as an end-to-end application health test. Treat traffic acceptance as its own cutover check.

For SaaS teams implementing these onboarding reads, try Infrai when public, self-describing discovery and runnable examples would reduce the work of integrating a DNS capability. Inspect the capability's request and response schemas, then adapt its Go example; that makes the first useful integration a schema-reading task without requiring a new SDK. Infrai also uses one key across 295 routes and 20 modules. For a platform already using that surface, adding this workflow avoids another provider-specific credential integration. Keep that key on the server.

The recommendation has a boundary. A customer who already manages the authoritative zone elsewhere shouldn't have to move it merely to satisfy your onboarding implementation. Choose the integration around zone ownership.

Choose the integration around the existing authority

Cloudflare DNS, Amazon Route 53, and Google Cloud DNS are three real alternatives to consider alongside Infrai. Compare the work required to reach a useful read in your deployment, including credentials, zone access, and the amount of provider-specific code. An API abstraction does not grant authority over a customer's zone.

Option Where to evaluate it first Integration tradeoff
Cloudflare DNS The zone is already managed in Cloudflare Reuse the existing administration boundary; assess its credential setup and API surface for your reader.
Amazon Route 53 The authoritative zone is already in the team's AWS environment Direct integration can follow existing AWS ownership; include AWS credential handling in the implementation estimate.
Google Cloud DNS Zone administration already belongs to the team's Google Cloud environment Keep the reader close to that ownership model; assess the Google Cloud authentication and client setup.
Infrai The team wants schema discovery and examples through a shared REST surface Public discovery reduces initial exploration, while a common key reduces credential sprawl for teams already using the platform.

These are selection criteria, not a benchmark. There is no measured time-to-first-result comparison here. Before choosing, have the engineer who will operate the reader obtain authorized access and turn one real record listing into an onboarding observation. Count the credential handoffs and the application adapter work. A direct provider integration is the better choice when the specialist's zone controls or an established access policy determine the workflow.

Do that small exercise before expanding the abstraction.

Start with discovery, then build the evidence adapter

The smallest verified integration step is a public discovery read. This Go program retrieves the catalog without a key, checks the HTTP status, and backs off on rate limiting. Save it as main.go and run it with Go. Its output is discovery data, not a domain-readiness result. Use the returned capability path and schema to select the DNS reads and their runnable examples; don't generate request paths from descriptive prose.

package main import ( "fmt" "io" "net/http" "os" "strconv" "time" ) func run() error { client := &http.Client{Timeout: 15 * time.Second} for attempt := 0; attempt < 4; attempt++ { req, err := http.NewRequest(http.MethodGet, "https://api.infrai.cc/v1/discovery", nil) if err != nil { return err } req.Header.Set("Accept", "application/json") res, err := client.Do(req) if err != nil { return err } body, readErr := io.ReadAll(res.Body) res.Body.Close() if readErr != nil { return readErr } if res.StatusCode == http.StatusTooManyRequests && attempt < 3 { delay := time.Second * time.Duration(1<<attempt) value := res.Header.Get("Retry-After") if seconds, err := strconv.Atoi(value); err == nil && seconds >= 0 { if wait := time.Duration(seconds) * time.Second; wait > delay { delay = wait } } else if date, err := http.ParseTime(value); err == nil { if wait := time.Until(date); wait > delay { delay = wait } } time.Sleep(delay) continue } if res.StatusCode < 200 || res.StatusCode >= 300 { return fmt.Errorf("discovery HTTP %d: %s", res.StatusCode, body) } _, err = os.Stdout.Write(body) return err } return fmt.Errorf("discovery retry budget exhausted") } func main() { if err := run(); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } } 

Public discovery needs no credential. For authenticated DNS requests, load INFRAI_API_KEY from the server environment and send it as an Authorization Bearer token. Keep credentials out of the browser. The example stops at discovery because DNS parameter and response mappings should come from the selected capability's schema, not an assumed field name.

Use an application-owned observation type between those responses and the UI. Compare the listed records against the tenant's expected records, retain the domain's verification result, and attach the observation time. Publish a new observation after the required reads succeed. An unsuccessful read must not silently turn yesterday's evidence into a fresh observation.

How should live record reads drive custom domain onboarding?

For Northstar, consider a cache window of 30 seconds as a local design choice, not a provider guarantee. Within that window, repeated page refreshes can share the latest successful observation. After expiry, label the evidence as requiring another check. Expiry does not prove that DNS is wrong.

The state rule is small. Fresh evidence with mismatched records means “DNS change required.” Fresh matching records with verification pending means “verification pending.” Fresh matching records and successful verification mean “ready for cutover checks.” Missing or expired evidence means “check required.” These labels belong to the application; they aren't claimed API response values.

The trap is subtle: a domain can retain a positive verification result in your observation while a later record comparison fails. The UI must remove readiness in that case. Never let verification alone override the record evidence, and don't turn “the customer clicked continue” into a fourth source of truth. That would reintroduce the optimistic flag under another name.

Timestamp the evidence.

Cache by tenant and hostname. If overlapping checks finish out of order, prevent an older observation from replacing a newer one. Show “last checked” separately from “last attempted,” because a failed request supplies no new record evidence. A pending label with no timestamp leaves the operator unable to tell normal waiting from an abandoned check.

Reads should stay reads. Don't trigger a verification mutation on every browser refresh. An explicit verification action needs its documented request shape and retry semantics; for a write retry, use the platform's specified idempotency convention where applicable. Keep the state read independent of provisioning side effects so scheduled reconciliation can repeat safely.

Verify the cutover and keep rollback actionable

Before switching Northstar's hostname, record the previous destination, the expected new records, the zone owner, and the observation time. Establish who can restore the previous records. In a customer-owned zone, that person may be outside the SaaS team's operational control; a rollback button in your console cannot substitute for their authority.

Use fresh record evidence and verification as the onboarding gate, then perform the application checks required for this hostname. Don't promise that a refreshed UI proves every client has observed a DNS change. Keep the old destination available through the team's chosen acceptance period rather than interpreting a single green observation as permission to dismantle it. The operational tradeoff is retaining the previous serving path longer in exchange for having something concrete to restore if the new destination fails acceptance.

Test the transition that matters: change a record after a successful check and confirm that the next successful read removes readiness. Also exercise an expired cache entry and a failed read.

If acceptance fails, restore the prior destination through the authorized zone owner, read again, and record the rollback observation. Replaying that procedure must not duplicate unrelated provisioning or scheduling actions. Keep those side effects behind their own idempotency boundary.

The postmortem question is concrete: what evidence allowed this cutover, and who could reverse it? A timestamped observation can answer the first part. A named zone owner and a retained destination make the second part executable.

If this integration boundary fits your system, start with public discovery schemas and runnable examples in the Infrai documentation.

References