Shipping Sites on Custom Domains and Subdomains Without Hosting Lock-In
How DomainFA routes custom root domains, app subdomains, and instant .build.domainfa.com slugs directly to isolated web containers.
Table of Contents
- →Publish any AI Builder site to
<slug>.build.domainfa.com(/s/<slug>/), a root domain, or a spun-out subdomain likeapp.yourdomain.com. - →Never route custom hosts by
Host-header alone—DomainFA enforces cryptographic_domainfa-verifyTXT ownership before serving traffic. - →Ingress proxies strip platform cookies,
Authorizationheaders, and Referer CSRF state so custom sites cannot pivot into your account.
Generating a landing page or interactive web tool in an AI studio is only half the workflow. Until it resolves cleanly over HTTPS on a domain your customers trust—without shared-platform navigation chrome—you do not have a shipping product; you have a temporary preview link.
DomainFA's hosting router bridges that last mile cleanly: every website generated in AI Builder can bind to your own root domain, a spun-out product subdomain, or a free instant subdomain without lock-in.
Three Publishing Topologies Supported in Console
Inside DomainFA Console under AI Websites -> Connect Domain / Subdomain, each project supports three distinct routing topologies depending on whether you want speed, full apex branding, or side-by-side coexistence with an existing marketing site:
| Binding Mode | Example Hostname | DNS Record Required | Best Fit |
|---|---|---|---|
| Instant Slug Route | launch.build.domainfa.com or /s/launch/ | None (provisioned immediately) | Staging demos, investor previews, fast prototypes |
| Root Apex Domain | yourdomain.com | A @ -> 130.210.14.176 + verify TXT | Standalone SaaS apps, micro-utilities, ventures |
| Spun-Out Subdomain | demo.yourdomain.com or app.yourdomain.com | CNAME app -> <slug>.build.domainfa.com | Launching tools alongside an existing root site |
Preventing Dangling-DNS Domain Takeovers
Multi-tenant SaaS platforms frequently make a subtle security mistake: they bind an incoming HTTP Host header directly to whichever tenant first types app.company.com into a form.
If company.com later deletes its project—or creates an A record pointing at 130.210.14.176 before claiming the domain inside the platform—any third party could register the dangling hostname and hijack traffic on the victim's domain.
DomainFA prevents this by keeping every newly created custom binding unroutable (verified: false) until one of two cryptographic proofs resolves publicly:
- TXT Challenge Token: Publish
_domainfa-verify.<your-host>as aTXTrecord containing your account-scopeddomainfa-verify=<token>secret, then click Verify DNS (POST /api/console/site-bindings/:id/verify). - Unique CNAME Delegation: Point a subdomain via
CNAMEto your unique<slug>.build.domainfa.comtarget, whose slug reservation was validated atomically against reserved platform routes at creation time.
Cookie & Session Isolation Between Edge and Builder
When CustomHostMiddleware matches an incoming verified hostname—or serves an instant slug under /s/<slug>/—traffic passes through a strict zero-trust boundary before reaching the container's Vite/static upstream:
- Zero credential forwarding: Incoming
CookieandAuthorizationheaders are scrubbed so visitors on custom domains never carry or leakdomainfa_sessioncredentials into third-party generated JavaScript. - No cross-boundary session mutation: Outbound
Set-Cookieheaders from user containers are dropped, and DomainFA's globalcsrfGuardrejects any state-changingPOST/PUT/DELETEAPI call whoseRefereroriginates from/preview/or/s/. - Lazy cold-rebuild on idle containers: If a project container was slept or pruned during VPS maintenance,
ServeBoundSitereconstructs the sandbox from durable disk custody seamlessly rather than serving a dead502or infinite spinner.
Why Automated Scanners Miss Business Logic and Authorization Bugs
Why dependency and signature scanners stay green even when state-machine bypasses, sibling-route authorization gaps, and accounting invariant breaks sit in production code.
Securing AI Agent Tool Boundaries and Ephemeral Build Sandboxes
Practical defense-in-depth patterns for AI coding agents and web builders: MCP filesystem confinement, immutable build harnesses, networkless ephemeral sandboxes, and dedicated preview domains.