Custom domains
Attach apex and subdomain hostnames per deployment environment, verify DNS, and get automatic TLS.
Domains are project-scoped. Service domain pages redirect to the project Domains settings.
Platform hostname
Every public web/static service gets a platform URL. Production keeps a short host; other persistent environments include the env slug in the hostname. Use platform URLs for smoke tests before pointing real DNS.
Deployment environments
With deployment environments enabled, custom hosts bind to a specific environment (not “the whole project” ambiguously). Filter the Domains hub by environment. Previews never receive customer custom routes.
Pattern A — stage subdomain
Keep the apex on production; create {slug}.{apex} for each extra stage (for example staging.example.com). The Duplicate / Domains wizard can create these after you have an apex.
Pattern B — apex per stage
Bind a different apex (or dedicated host) to each environment when stages need distinct brands or DNS zones.
Catch-all / default routes remain production-only (F8) unless you explicitly bind another stage.
Add a custom domain
- Open the project → Domains (optionally filter by environment).
- Add an apex (
example.com) or subdomain (api.example.com/staging.example.com). - Create the DNS records Bytstack shows:
- TXT challenge at
_bytstack-challenge(verification) - CNAME (or ALIAS/ANAME for apex) to the project edge hostname
- TXT challenge at
- Wait for verification — TLS certificates provision automatically once DNS is correct.
- Use Add stage subdomain / Bind apex to environment when attaching hosts to non-production stages (
stage-bindings).
Path routing & multi-service
A project edge can route paths across services (for example / → marketing static, /api → Node API) within the same environment. Configure routes on the domain detail page. Preview services are excluded from custom-domain route tables.
HTTPS
Platform-managed certificates renew automatically. You do not upload cert files for standard custom domains.
Previews
Preview deployments use generated hostnames (…-pr-{n}-…). They are not attached to custom domains. See Preview deployments.