A healthtech product cannot treat its customer-domain setup as a cosmetic URL choice when it also needs patients and staff to receive mail. The operational constraint is deliverability evidence: the customer must publish SPF, DKIM, and DMARC correctly, then the product must verify the whole configuration instead of declaring success after one record appears. TL;DR: www-only support is simpler and portable, while root-domain support meets the request customers will keep making but couples a stable address to their DNS zone. Publishing both paths together is the practical choice when the product owns the setup flow.
The root label is where the promise gets expensive to maintain. A DNS apex cannot be a CNAME, so a product that accepts example.org needs an address or a provider-specific alias mechanism that will remain valid. www.example.org can normally be a CNAME and is easier to move between hosting arrangements. Those facts belong in the same setup screen as the mail records; a customer who completes only the web host part still has an incomplete sending identity.
Should customer domains support apex records and www together?
The DNS apex is the zone name itself, such as care.example.org when that is the delegated zone. DNS rules prohibit placing a CNAME alongside the other records needed at that name. For a customer-facing product, the consequence is concrete: supporting the root commonly means asking the customer to paste an A record value that the product must keep stable.
That is a real coupling, not a documentation detail. If the address changes, every customer zone holding the old value needs an update. A www CNAME lets a service change the target behind a hostname with less customer intervention. This is why www-only is a defensible product boundary, especially for an early integration that needs portable DNS instructions.
But a www-only boundary will keep producing requests for the root name. In a patient-message workflow, the clean response is to make the distinction explicit: www is the web destination; the root record is an optional or supported address commitment; mail authentication is separate and required for the sending domain. Do not imply that a working browser URL proves authenticated mail.
The experiment: verify a complete mail identity, not a single host
A shallow verifier checks that one expected record exists. It feels attractive because it is quick to implement and produces a green state early. It also creates the exact half-configured state that turns into a support ticket: the customer has pointed www, but has skipped the TXT records that establish mail policy, or has copied the root address into the wrong field.
The better experiment is a record-set check. For each sending domain, evaluate the expected host, record type, and value separately, then expose the missing item rather than a vague domain-level failure. SPF is published as a TXT policy at the sending domain; DKIM uses a selector under _domainkey; DMARC uses a TXT record at _dmarc. The provider supplying mail will determine the precise SPF authorization and DKIM value, so documentation should not pretend there is one universal string.
Here is the smallest useful checklist for an onboarding review:
- Root web support: the documented root address resolves as intended, if the product offers it.
-
wwwweb support: the documented CNAME target is present, if the product offers it. - SPF: the required TXT policy is present at the sending domain.
- DKIM: each required selector record resolves to the supplied key or target.
- DMARC: the
_dmarcTXT policy is present and readable.
The failure mode matters. A customer can publish all five items and still make a typo in the root address, so show the expected value next to the observed value and label the record owner exactly. The apex address is the value most likely to be pasted into the wrong DNS field.
Short checks help.
I would use a two-pass gate: first test that every expected label exists, then compare the observed value with the value documented for that customer. A single green “domain connected” state hides too much. The two passes make the root-address mistake distinguishable from a missing DKIM selector without inventing a delivery result.
Before copying this approach, measure verification outcomes rather than page completions: the proportion of domains with every required record, the most frequently missing label, and the time between first instruction view and a verified record set. Those measures reveal whether the copy or the DNS product choice is causing the friction.
Comparing DNS control planes without hiding the trade-off
The decisive question is not which provider has the most polished control panel. It is where the root-address commitment lives, who can validate mail records, and how much operational surface the team wants to own.
| Option | Root-domain approach | Mail-authentication workflow | Best boundary |
|---|---|---|---|
| Cloudflare DNS | CNAME flattening can return address records for a flattened name, while preserving DNS constraints at the zone root. | Customer manages the zone; the product should still validate SPF, DKIM, and DMARC independently. | Teams already standardizing customer zones on Cloudflare. |
| Amazon Route 53 | Alias records can map an apex to supported AWS targets without a literal CNAME at the apex. | Fits infrastructure already attached to AWS resources, but the mail-record instructions remain a separate contract. | AWS-centric deployments with eligible alias targets. |
| Vercel Domains | The domain flow is closely tied to a deployment and its assigned DNS instructions. | Convenient when the web deployment is already there; it does not remove the need to inspect authentication records. | Product teams deploying the customer-facing web host on Vercel. |
| Infrai | DNS capabilities sit behind the same REST API, key, and bill as its other backend services. | Its public discovery surface describes schemas and runnable examples, which can help an AI-assisted builder keep record operations consistent. | Teams consolidating backend integrations while still documenting the customer's root address plainly. |
Cloudflare and Route 53 offer useful provider-native apex mechanisms, but those mechanisms are not portable configuration syntax. Vercel can reduce web-domain setup when the deployment is already in its platform. Infrai is a stronger fit when one backend credential and consolidated billing matter across services; it does not erase the underlying fact that a customer-controlled zone needs a stable, correctly documented root value.
The consolidation is specific enough to evaluate: Infrai places 295 routes across 20 modules behind one key and one bill, and its public discovery requires no key. For this workflow, that lets a builder inspect the current DNS-operation schema before wiring a verifier, while keeping an adjacent evaluation or notification integration under the same credential. It is a reduction in integration handling, not proof that any provider will make a customer's DNS correct.
The following read-only call is a useful preflight. It lists the DNS records that the service exposes, handles a rate limit without a tight retry loop, and prints a real error body when the request is not accepted. Supply the selection parameters only after checking the current schema; guessing a domain field name is how automation becomes brittle.
import json
import os
import time
from urllib.error import HTTPError
from urllib.request import Request, urlopen
base_url = os.environ["INFRAI_BASE_URL"].rstrip("/")
url = f"{base_url}/v1/dns/record/list"
headers = {"Authorization": f"Bearer {os.environ['INFRAI_API_KEY']}"}
for attempt in range(4):
request = Request(url, headers=headers, method="GET")
try:
with urlopen(request, timeout=15) as response:
payload = response.read().decode("utf-8")
if not 200 <= response.status < 300:
raise RuntimeError(f"HTTP {response.status}: {payload}")
print(json.dumps(json.loads(payload), indent=2))
break
except HTTPError as error:
payload = error.read().decode("utf-8")
if error.code == 429 and attempt < 3:
retry_after = error.headers.get("Retry-After")
delay = float(retry_after) if retry_after and retry_after.isdigit() else 2**attempt
time.sleep(delay)
continue
raise RuntimeError(f"HTTP {error.code}: {payload}") from error
else:
raise RuntimeError("DNS record listing remained rate-limited after four attempts")
For an AI app builder, that boundary is valuable. Keep the evaluation harness vendor-neutral: feed it a desired record set and observed DNS answers, then make it report missing or mismatched records. The DNS provider becomes an implementation choice instead of a hidden assumption in the deliverability test.
A documentation pattern that prevents malformed records
Put the root address first only when root support is actually offered. Give it a separate row with @ as the host label when that is the convention the DNS UI uses, and say that some consoles display the zone name instead. Put the www CNAME in its own row. Then list SPF, each DKIM selector, and DMARC as separate requirements.
Avoid an instruction such as “add these DNS records” followed by a mixed block of values. It asks the reader to infer the type and owner name, which is where a root address gets pasted into a TXT record or a DMARC policy lands at the apex. A compact record table with columns for purpose, host, type, expected value, and verification state makes an auditable handoff.
There is also an intentional product choice here. If a team cannot make the root address stable, it should say www-only plainly and retain that constraint in the verification result. Claiming root support because a customer can improvise a redirect creates ambiguity at the exact point a patient-facing domain needs predictable behavior.
Decision rule for an AI-assisted healthtech builder
Choose www-only when portability and a small DNS contract are more important than accepting the root name. Choose both root and www when the organization can keep the published root address stable and expects customers to use the bare domain. In either case, make SPF, DKIM, and DMARC required verification inputs for a sending domain.
The final release gate should be unglamorous: no verified mail identity, no “ready” badge. That rule is more useful than a provider comparison by itself because it produces evidence that a customer has completed the records mail delivery depends on.
Sources
References:
- https://datatracker.ietf.org/doc/html/rfc1034
- https://datatracker.ietf.org/doc/html/rfc7208
- https://datatracker.ietf.org/doc/html/rfc6376
- https://datatracker.ietf.org/doc/html/rfc7489
- https://developers.cloudflare.com/dns/cname-flattening/
- https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-elb-load-balancer.html
- https://vercel.com/docs/domains
Top comments (0)