Before a custom domain can route to a Freestyle VM, prove ownership with a
DNS TXT record. You can verify a domain or one of its parents; verifying
example.com also lets you map app.example.com.
Create A Verification
import { Freestyle } from "freestyle";
const freestyle = new Freestyle();
const verification =
await freestyle.domains.verifications.create("example.com");
console.log(verification.id);
console.log(verification.recordName, verification.verificationCode);
Publish verificationCode as a TXT record at recordName. DNS providers
often append the zone automatically, so enter the relative record name when
the provider expects one.
Complete Verification
After the TXT record propagates, complete the challenge using either its ID or domain:
const ownership =
await freestyle.domains.verifications.complete(verification.id);
console.log(ownership.domain, ownership.verifiedBy);
When several people are verifying the same domain, use the ID so only this challenge’s verification code can satisfy the request.
Inspect Verifications And Ownership
const pending = await freestyle.domains.verifications.list({ state: "pending" });
const challenge = await freestyle.domains.verifications.get("example.com");
const domains = await freestyle.domains.list();
domains.list() returns the verified domains directly as an array.
Withdraw A Pending Challenge
await freestyle.domains.verifications.delete(verification.id);
Deleting by domain withdraws every outstanding challenge for that domain. A completed verification is a permanent ownership record and cannot be deleted.
Verification proves ownership; it does not change DNS or route traffic. Next, point DNS at Freestyle and create a TLS ingress rule, or set up wildcard domains to serve every subdomain at once.
Verification runs entirely over DNS, so it works regardless of which address records your domain carries — including before you have pointed the domain at Freestyle at all.