A customer-domain page should show the media operator two observations: published DNS records checked against configuration intent, and the outcomes a reader actually receives. Imagine the alert reads “edition.customer.example failed its reader check; configured records match intent.” This is a proposed alert, not an incident report. It gives the on-call a useful starting point: a matching control-plane record has not established that the publication works.
Short answer: alert on outcomes; investigate with records. A record read tells you what you published. An outcome check tells you whether it works through the resolver and service path being tested. Emit both so configuration drift can be separated from an external failure.
Keep them separate.
Why can DNS records match configuration while reader outcomes fail?
For a media product accepting customer domains, intent is the approved mapping for a publication, not whatever the DNS provider currently returns. Compare that intent with published records. Then exercise the reader's path independently. A read against the management interface can agree with intent while a caching resolver still supplies a different answer; a provider-side verification requirement or a typo in record content can also escape a check that merely confirms the record exists.
That distinction changes the investigation. Record presence is weaker than content agreement, and content agreement at the publisher is weaker than a successful outcome. A dashboard that paints all three green from one list-records response hides the boundary where the failure matters.
Use an illustrative customer, edition.customer.example. Store its approved destination and onboarding revision as durable application state. A record comparison should evaluate the relevant name, type, and content against that revision, rather than treating any returned record as success. Keep a separate observation of the public reader request. Neither observation should overwrite the other when a scheduled check finishes late.
The trap is stale evidence.
A retry from an earlier onboarding revision must not mark a later configuration healthy. Make the observation identity include the customer, revision, check kind, and scheduled interval. Accept repeated delivery idempotently, and reject results that belong to superseded intent. These are proposed application rules, not claims about a provider's response fields.
Work backwards from the page to the missing signal
Start with the symptom the customer cares about: the publication is unreachable or the checked response does not satisfy its delivery contract. A successful request alone may be insufficient if the service can return the wrong publication. Define the expected result explicitly before choosing an alert threshold.
Then ask which earlier observation would have made that page easier to act on. If the approved mapping changed while published content did not, that is configuration drift. If published content matches but a resolver or reader check fails, investigate that external path. If both fail, preserve both observations; a forced single “DNS healthy” flag discards the evidence needed to explain the event. Outcome checks are slower and noisier, so attach their observation time and probe context rather than pretending they describe every reader everywhere.
The instrumentation change is small in concept: emit separate measurements for intent agreement, reader outcome, ownership evidence, and observation age. These are application metric names you choose, not API field names. Record the onboarding revision in diagnostic state, and keep sensitive challenges out of logs.
Use two independently evaluated signals for the publication decision. This number describes the proposed design, not a measured reliability improvement.
A missing sample also needs a state. Otherwise a stalled scheduler leaves yesterday's successful result on screen indefinitely. Treat stale evidence as unknown, then choose whether that state should notify an operator or delay onboarding. The decision depends on the customer-facing consequence; it should not silently become success.
Ownership proof is a handoff, not a reader check
The same onboarding workflow must bind a domain to an authorized account. A fresh TXT challenge can establish control of DNS, but it does not prove employment or authorize an account merely because an email suffix matches. Generate the challenge from trusted onboarding state, bind it to the authenticated request and intended domain, expire it, and check the account relationship separately. Keep that evidence distinct from publication reachability.
Infrai fits teams that want DNS and the user directory behind one API key: a vendor change behind a capability can preserve the application-facing contract, while public schema discovery helps check the request and response contract before wiring the handoff. That reduces integration work for this workflow. The combined choice also means one vendor to trust, one bill, and one outage surface.
The following Go program shows the narrow handoff: a selected TXT value from a record-list response must equal the current challenge bound to an account email; only then is that email passed to the directory lookup. Both requests use the same key and base URL. The TXT convention is application-owned: a random challenge token, one space, then the bound account email. It is not a provider field or an industry standard.
Request shapes for these two operations must be checked against their current schemas. Set DNS_QUERY to the schema-approved, URL-encoded record-list query, DNS_TXT_POINTER to a JSON Pointer selecting the returned TXT string, and AUTH_EMAIL_PARAMETER to the documented email query parameter. This deliberately requires an explicit field mapping: there is no assumption that a provider returns a field named records or content. Set BACKEND_BASE_URL to the deployment's API base ending in /v1, INFRAI_API_KEY to its secret, and CHALLENGE_TOKEN and ACCOUNT_EMAIL from trusted onboarding state. The code uses Go 1.20 or later and the standard library.
package main import ( "context" "encoding/json" "fmt" "io" "net/http" "net/url" "os" "strconv" "strings" "time" ) func required(name string) string { value := os.Getenv(name) if value == "" { panic("missing environment variable: " + name) } return value } func get(ctx context.Context, client *http.Client, target, key string) ([]byte, error) { for attempt := 0; attempt < 4; attempt++ { req, err := http.NewRequestWithContext(ctx, http.MethodGet, target, nil) if err != nil { return nil, err } req.Header.Set("Authorization", "Bearer "+key) resp, err := client.Do(req) if err != nil { return nil, err } data, readErr := io.ReadAll(io.LimitReader(resp.Body, 1<<20)) resp.Body.Close() if readErr != nil { return nil, readErr } if resp.StatusCode >= 200 && resp.StatusCode < 300 { return data, nil } if resp.StatusCode != http.StatusTooManyRequests || attempt == 3 { return nil, fmt.Errorf("HTTP %d: %s", resp.StatusCode, data) } delay := time.Second * time.Duration(1<<attempt) retry := resp.Header.Get("Retry-After") if seconds, err := strconv.Atoi(retry); err == nil && seconds >= 0 { delay = time.Duration(seconds) * time.Second } else if when, err := http.ParseTime(retry); err == nil { delay = time.Until(when) if delay < 0 { delay = 0 } } timer := time.NewTimer(delay) select { case <-ctx.Done(): timer.Stop() return nil, ctx.Err() case <-timer.C: } } return nil, fmt.Errorf("retry budget exhausted") } func selectString(data []byte, pointer string) (string, error) { var node any if err := json.Unmarshal(data, &node); err != nil { return "", err } if !strings.HasPrefix(pointer, "/") { return "", fmt.Errorf("expected a non-root JSON Pointer") } for _, part := range strings.Split(pointer[1:], "/") { part = strings.ReplaceAll(strings.ReplaceAll(part, "~1", "/"), "~0", "~") switch value := node.(type) { case map[string]any: node = value[part] case []any: index, err := strconv.Atoi(part) if err != nil || index < 0 || index >= len(value) { return "", fmt.Errorf("invalid array index") } node = value[index] default: return "", fmt.Errorf("pointer does not select a value") } } value, ok := node.(string) if !ok { return "", fmt.Errorf("selected TXT value is not a string") } return value, nil } func run() error { base := strings.TrimRight(required("BACKEND_BASE_URL"), "/") parsed, err := url.Parse(base) if err != nil || parsed.Scheme != "https" || parsed.Host == "" || parsed.User != nil || parsed.RawQuery != "" || parsed.Fragment != "" || !strings.HasSuffix(parsed.Path, "/v1") { return fmt.Errorf("expected an HTTPS API base ending in /v1") } key := required("INFRAI_API_KEY") client := &http.Client{ Timeout: 10 * time.Second, CheckRedirect: func(_ *http.Request, _ []*http.Request) error { return http.ErrUseLastResponse }, } ctx, cancel := context.WithTimeout(context.Background(), 45*time.Second) defer cancel() query, err := url.ParseQuery(required("DNS_QUERY")) if err != nil { return err } records, err := get(ctx, client, strings.TrimSuffix(base, "/v1")+"/v1/dns/record/list?"+query.Encode(), key) if err != nil { return err } proof, err := selectString(records, required("DNS_TXT_POINTER")) if err != nil { return err } token := required("CHALLENGE_TOKEN") email := required("ACCOUNT_EMAIL") if strings.ContainsAny(token, " \t\r\n") || strings.ContainsAny(email, " \t\r\n") || proof != token+" "+email { return fmt.Errorf("TXT proof does not match current onboarding intent") } directoryQuery := url.Values{} directoryQuery.Set(required("AUTH_EMAIL_PARAMETER"), strings.TrimPrefix(proof, token+" ")) _, err = get(ctx, client, strings.TrimSuffix(base, "/v1")+"/v1/auth/user/get_by_email?"+directoryQuery.Encode(), key) if err != nil { return err } fmt.Println("TXT matched; directory lookup completed; authorization still required") return nil } func main() { if err := run(); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } } This is a runnable integration boundary check, not a complete onboarding service. A management record read is preliminary evidence; enforce challenge freshness and domain binding in the caller, perform the resolver check separately, and interpret the directory result according to its response schema before granting anything. The program intentionally grants no access. An HTTP success alone does not establish that the intended user exists.
Both API operations are reads, so retries do not create duplicate resources. For the surrounding workflow, persist a successful ownership transition once per onboarding revision and make duplicate scheduler deliveries harmless. A reader probe still has to run independently: a valid ownership challenge says nothing about whether the publication can be served.
Choose the stack by the evidence it can preserve
The operational comparison is about retaining intent, publication state, and observable outcomes. Products occupy different parts of that chain. None makes a management record read equivalent to a reader check.
| Option | Useful role in this workflow | Boundary the application must own |
|---|---|---|
| Amazon Route 53 | DNS record management and health-check facilities | Decide which outcome represents the correct publication and correlate it with onboarding intent. |
| Cloudflare DNS | DNS record management within its platform | Keep resolver observations and the publication's delivery contract separate from record existence. |
| Auth0 Organizations | Organization and account relationships alongside an external DNS workflow | Bind a successful domain challenge to the correct authenticated account and organization. |
These are different tools, not interchangeable DNS monitors. Choose Route 53 or Cloudflare where the existing DNS control plane is the natural place to maintain records. Choose an organization directory for the account relationship it manages. Preserve a separate reader check in either design.
The in-house TXT check plus Auth0 Organizations alternative requires an Auth0 signup and its credential set, together with access to the chosen DNS control plane. Starting without either account means two service signups and two credential sets; with an existing DNS account, only the directory signup is new. The local TXT-checking code itself needs no service signup. You would write challenge issuance, expiry, domain-to-account binding, resolver observation, and the glue that applies verified evidence to organization membership.
That glue can be worthwhile. The trade-off is control versus maintenance: you can choose the exact policy, but you'll own its incident handling. It gives the team direct control over the authorization transition, but it also becomes code the on-call must understand when ownership evidence and directory state disagree. A shared contract can reduce provider-specific wiring; it cannot remove the need to define the authorization policy.
Set the threshold against noise, then keep the evidence
Close the loop on the original page. Attach the current intent revision, last record comparison, resolver observation, reader result, and their ages. If records match but the outcome fails, the page should say so. Do not make an operator reconstruct this from a single green configuration badge.
For an initial policy, consider requiring three consecutive failed outcome observations before paging, while recording each failure immediately. Three is an illustrative threshold, not a universal recommendation or a measured safe value. Space the observations according to the service's freshness requirement, account for intended DNS changes, and test the policy against expected resolver variation before using it for production escalation.
Too low a threshold turns transient observations into unnecessary pages. Too high a threshold delays detection of a real broken publication. Record reads help explain that trade-off; they cannot settle it.
References
The DNS and DMARC standards provide context for resolver behavior and mail-domain policy. DMARC is relevant when the media workflow also sends mail for a customer domain; it is not proof that a reader-facing publication works. The product documentation below describes the separate control-plane and identity tools in the comparison.
