# Environments and domains

The Markdown copy of <https://yeeted.ai/docs/environments-and-domains.html>.

A preview to try a change, production for real users, and a stable URL for each.

## Development previews

A development deploy is a **preview**: perfect for trying a change. A preview runs for
15 minutes after each deploy or wake, and traffic does not extend it. When the time is up it stops to save
resources, and the next request wakes it automatically (you'll see a brief “starting…” page). From the
dashboard you can **Extend** a running preview to restart its timer, or
**Relaunch** a stopped one.

A branch of your code can run as its own preview next to the project's, with its own address; see
[Version control](https://yeeted.ai/docs/version-control.html#edit).

## Production

Promote to production for an **always-on** service with a stable URL that has no timer and
is automatically restarted if it crashes. Production is included on Small Business (1 app) and
High Availability (10 apps); neither is on sale during the beta.

## Your URLs

Every app gets a hostname made of its project name and your account's short id, such as
`your-app-a1b2c3d`. Each deploy hands your agent the exact URL.

- **Default:** `your-app-a1b2c3d.gw.yeeted.ai`: serves whatever you have deployed.
- **Production:** `your-app-a1b2c3d.prod.yeeted.ai`: always serves your production
  deployment, never a preview, so it's safe to share with real users.

## Custom domains

Ask your agent to attach your own hostname to an environment. `domain_set(project_id, domain, environment)`
returns the exact DNS record to create; publish it, then `domain_verify(project_id, environment)` starts it
serving and issues the certificate. `domains_list` shows both environments and where to point DNS, and
`domain_remove` clears one. A `domain` key (or a `domains:` block, one per environment)
in `yeeted.yaml` does the same on deploy. The dashboard's **Domains** tab shows which names are
attached and which still need verifying, with a Verify button.
