Custom Domains
Connect and verify domains you own from the command line.
Manage bring-your-own domains for an app's dev and prod environments. See Custom domains for DNS and login guidance.
All subcommands default to the prod environment and resolve the app from your git remote or active app, like the rest of the CLI.
List Domains
buildspace domains list
buildspace domains list --jsonShows every custom domain across both environments with its status, TLS certificate state, whether login redirects are allowed, and — while it is still pending — the DNS records you need to create.
Add a Domain
buildspace domains add app.yourbrand.com
buildspace domains add dev.yourbrand.com --env dev
buildspace domains add app.yourbrand.com --no-authAttaches the domain to that environment's runtime service and prints the CNAME and TXT records to create at your DNS provider. The app keeps serving on its *.apps.buildspace.studio hostname until the domain verifies.
Record hosts are relative to your DNS zone; @ is the zone apex. Most providers reject a CNAME on @, so create the apex record as an ALIAS/ANAME (or CNAME-flattened) record. To serve both yourbrand.com and www.yourbrand.com, add each one; the apex becomes the app's canonical public URL.
Options
| Flag | Description |
|---|---|
--env dev|prod | Target environment (default: prod) |
--no-auth | Don't allow login redirects to this domain |
--app <slug> | App slug (default: git remote or active app) |
--json | Output as JSON |
Verify a Domain
buildspace domains verify app.yourbrand.com
buildspace domains verify dev.yourbrand.com --env devRe-checks DNS and certificate state immediately instead of waiting for the background reconcile. Run it after creating the records; DNS changes can take minutes to hours to propagate.
verify exits 0 once the check runs, even while the domain is still pending. To poll instead, add --wait: it re-checks every 15 seconds for up to --timeout seconds (default 120), then exits 0 if the domain is active or 1 if it isn't yet — safe for scripts and agents to retry.
buildspace domains verify app.yourbrand.com --wait
buildspace domains verify app.yourbrand.com --wait --timeout 300Toggle Login Redirects
buildspace domains auth app.yourbrand.com on
buildspace domains auth app.yourbrand.com offControls whether login.buildspace.studio accepts auth callbacks to this origin. On by default when you add a domain.
Remove a Domain
buildspace domains remove app.yourbrand.com # asks first; --yes in scripts/agentsDetaches the domain; the app falls back to its Buildspace hostname. Delete the DNS records at your provider afterward.
JSON Output
Every subcommand accepts --json and emits errors as a single { "error", "code" } line on stderr with a non-zero exit code — see JSON output.
buildspace domains list --json
buildspace domains add app.yourbrand.com --json