Read the expected DNS records before every ownership verification attempt, and keep game studio onboarding pending until verification succeeds. The deciding constraint is drift: the record your onboarding workflow intends to find may differ from the record the customer actually published. Retrying verification cannot correct that difference.
TL;DR: A missing or mismatched expected record calls for a customer correction. A matching record with verification still pending calls for a propagation retry with backoff. A successful verification permits onboarding to continue. Keep those 3 outcomes separate in both the worker and the customer message.
Consider an illustrative gaming platform accepting a studio's custom domain before enabling its onboarding completion step. A verification job may run repeatedly while the studio edits DNS. Each run needs fresh evidence of the expected record, not the previous job's assumption that the edit was completed. The operational question is concrete: does the published record still match the ownership proof this onboarding attempt requires?
Why can another retry hide the wrong record?
A verification failure alone does not tell support what the customer should do next. If the record is absent, saying “DNS is propagating” sends the customer away to wait for a change they have not made. If the expected record is present and verification has not caught up, asking them to keep editing creates unnecessary churn. These states need different messages.
Read the record first.
Start each attempt by reading the expected records and comparing them with the published evidence available to the verifier. Preserve the domain, expected record, observed record, and observation time together. An observation without its time is weak evidence during a changing DNS configuration, and an observed value without its expected counterpart cannot establish whether the customer published the right proof. Treat these as application audit fields, not a vendor response schema.
There is a second trap: a record list can describe intended configuration. Do not equate that list with an independent observation of what DNS currently exposes unless its documented semantics support that interpretation. The runbook must name what was read. “The configured value matches” and “the published value matches” convey different evidence to a studio waiting to finish onboarding.
Use propagation as the retry category for a matching but unverified record. That category is not permission to mark ownership verified, and it does not establish a guaranteed completion time. Propagation is measured in minutes to hours; a hard polling loop mostly produces repeated uncertainty.
Make the ownership gate explicit in Go
The first runnable Go example implements only the local decision gate. Its domain, record name, and proof string are illustrative application data; obtain the actual expected records from the verification workflow rather than adopting these literals as a required DNS format.
The important ordering is visible: compare the current record before accepting the verification result for this attempt. The caller must associate that result with the same domain and expected proof. A success retained from an older proof must not authorize a new onboarding attempt.
package main import "fmt" type Record struct { Name string Kind string Value string } type Attempt struct { Domain string Expected Record Published []Record Verified bool } func classify(a Attempt) string { matches := false for _, record := range a.Published { if record == a.Expected { matches = true break } } if !matches { return "customer_action_required" } if !a.Verified { return "propagation_pending" } return "ownership_verified" } func main() { expected := Record{ Name: "_ownership.studio.example", Kind: "TXT", Value: "illustrative-proof-62", } wrong := expected wrong.Value = "illustrative-old-proof" attempts := []Attempt{ {Domain: "studio.example", Expected: expected, Published: []Record{wrong}}, {Domain: "studio.example", Expected: expected, Published: []Record{expected}}, {Domain: "studio.example", Expected: expected, Published: []Record{expected}, Verified: true}, } for _, attempt := range attempts { fmt.Printf("%s %s\n", attempt.Domain, classify(attempt)) } } This example compares already normalized records. The DNS adapter remains responsible for producing comparable names, types, and values. It must also distinguish a failed read from a successful read that found no matching record. Preserve that distinction before passing observations into the gate. In the illustrative dataset, the old proof and current proof share a name and type, so checking only for a TXT record would classify the wrong value as progress. Matching the entire expected proof is the deciding step. After that comparison, the pending verification result can determine whether to schedule another attempt. Keep the comparison evidence even when the next attempt succeeds; otherwise, support loses the explanation for the earlier customer correction.
A timeout isn't absence.
A retry worker should re-read, classify, and only then decide whether verification is appropriate. For a customer correction, show the expected name, type, and value alongside what was actually observed. For propagation pending, show the last check time and say that the matching record was seen but ownership verification has not completed. Neither message needs to speculate about a customer's DNS provider.
Keep the onboarding transition idempotent. Repeated delivery of the same successful attempt must produce one completion transition, keyed to the domain and current onboarding attempt. If an older worker finishes after the expected proof changes, reject its stale transition. This protects the decision boundary without assuming a retry will run exactly once.
Choose tooling by the evidence it preserves
Provider choice should follow where the studio controls its records and where the onboarding service evaluates ownership. Moving DNS is a larger decision than adding a retry worker. Compare the options against the same requirement: can an operator explain the gap between the expected proof and the published observation?
| Option | Appropriate evaluation case | Boundary to verify before adoption |
|---|---|---|
| Cloudflare DNS | A studio whose domain is already managed in Cloudflare | Confirm how the integration distinguishes configured records from the published evidence used by your ownership check. |
| Amazon Route 53 | A studio whose DNS operations are already organized around AWS | Confirm that the worker can read the relevant zone and report the exact mismatch without requiring a DNS migration. |
| Google Cloud DNS | A studio whose DNS administration is already in Google Cloud | Confirm the observation and verification responsibilities across the studio and your onboarding service. |
These are selection conditions, not claims that any DNS management product supplies your application's ownership policy. Keeping an existing provider can preserve the studio's operating model, but your application still needs an explicit completion gate. A centralized integration can reduce interface variation while making it especially important to preserve what each observation actually means.
Infrai offers a plain REST API with no SDK to install, a single key and unified billing across 295 routes and 20 modules. Anything that can send an HTTP request can call it; there is no client library version to maintain. The one API key and one bill also cover DNS checks and error capture, reducing credential provisioning for the retry worker and its escalation path. Its public, self-describing discovery surface requires no key and supplies request and response schemas. That gives the engineer implementing this ownership gate a way to check the DNS adapter's contract before wiring it into retry jobs, rather than guessing which fields represent the expected records. Runnable examples in 10 languages include Go, so the worker can start from a documented request while retaining its own evidence classification. Those are contract and implementation aids; the application still owns the decision to complete onboarding.
The trade-off is an additional integration boundary. If your studio already operates Cloudflare DNS, Amazon Route 53, or Google Cloud DNS and needs only this ownership gate, prefer its existing provider unless the unified interface solves a concrete operational problem. The limitation of every integration here is the same: an API response cannot replace an explicit policy for matching evidence to the current onboarding attempt.
Before implementing the DNS adapter, inspect the public discovery contract rather than guessing query fields. This second Go program fetches that contract with an explicit method, checks the status, and backs off on rate limits. Set DNS_API_ORIGIN to the documented HTTPS API origin without a path, DNS_CAPABILITY_ID to the DNS record-list capability identifier from public discovery, and INFRAI_API_KEY to your environment-held key. The output is the contract to inspect, not a DNS observation or a verification success. No DNS write is made, so retrying this read cannot duplicate a mutation.
package main import ( "fmt" "io" "net/http" "net/url" "os" "strconv" "strings" "time" ) func run() error { origin := strings.TrimRight(os.Getenv("DNS_API_ORIGIN"), "/") capability := os.Getenv("DNS_CAPABILITY_ID") key := os.Getenv("INFRAI_API_KEY") parsed, err := url.Parse(origin) if err != nil || parsed.Scheme != "https" || parsed.Host == "" || parsed.Path != "" || capability == "" || key == "" { return fmt.Errorf("set an HTTPS API origin, capability ID, and API key") } client := &http.Client{Timeout: 30 * time.Second} for attempt := 0; attempt < 3; attempt++ { req, err := http.NewRequest(http.MethodGet, origin+"/v1/discovery/"+url.PathEscape(capability), nil) if err != nil { return err } req.Header.Set("Authorization", "Bearer "+key) response, err := client.Do(req) if err != nil { return err } body, readErr := io.ReadAll(response.Body) response.Body.Close() if readErr != nil { return readErr } if response.StatusCode == http.StatusTooManyRequests && attempt < 2 { delay := time.Second * time.Duration(1<<attempt) retryAfter := response.Header.Get("Retry-After") if seconds, err := strconv.Atoi(retryAfter); err == nil && seconds >= 0 { if wait := time.Duration(seconds) * time.Second; wait > delay { delay = wait } } else if deadline, err := http.ParseTime(retryAfter); err == nil { if wait := time.Until(deadline); wait > delay { delay = wait } } time.Sleep(delay) continue } if response.StatusCode < 200 || response.StatusCode >= 300 { return fmt.Errorf("HTTP %d: %s", response.StatusCode, body) } fmt.Println(string(body)) return nil } return fmt.Errorf("read attempt budget exhausted") } func main() { if err := run(); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } } Keep the evidence portable, including the expected proof and its observation time. The short rate-limit retry in this contract reader is separate from the ownership worker's propagation schedule; use backoff over minutes to hours for the latter.
Verify the retry path before enabling completion
Exercise the gate with a missing record, a wrong value at the expected name, a matching record awaiting verification, and a matching record with verification success. The first two should request a correction. The third should schedule another attempt with backoff. Only the fourth should release the onboarding gate. Then replay the successful attempt and confirm that completion is not applied twice. Include a failed DNS read: the customer must not receive an instruction to replace a record that the worker never successfully inspected.
Test stale work too.
Change the expected proof while an earlier attempt is outstanding. Deliver that earlier success after the change, and confirm that it cannot release the new gate. This is an application acceptance test, not a claim about a DNS provider's response format. Capture repeated failures as errors with the domain attached so an operator can distinguish one studio's unresolved correction from a pattern affecting onboarding checks. Retain the observed evidence and attempt identity with the error; a total failure count alone cannot explain intent drifting away from publication.
For rollback, pause completion transitions and stop scheduling new attempts for the affected onboarding generation. Preserve the evidence already collected. Resume with a fresh read and verification against the current proof after the worker change is corrected. Do not delete the customer's DNS records as a rollback step: the application change being reversed is the completion decision, and record deletion would introduce another configuration change to diagnose.
A studio stays pending until current ownership evidence passes the gate. The useful outcome of a retry is either a verified domain or a precise next action, rather than another indistinguishable failure.
References
- Cloudflare DNS documentation
- Amazon Route 53 Developer Guide
- Google Cloud DNS documentation
- RFC 7489, Domain-based Message Authentication, Reporting, and Conformance — background on a DNS-based mail policy, not a specification for this application's ownership proof.

