Creating one
Project settings → Environments.Using one
Pick it when triggering a run: from the app, from a schedule, or via the API and CLI. Without one, the run uses the project’s own address. For a one-off address change and nothing else, a base-URL override is simpler:Headers
Headers are the right place for an API token, a preview-deployment bypass header, or a feature flag.Cookies
A cookie’s domain must match the project’s base address host. You cannot set a cookie for a site the project does not test. Cookies are encrypted at rest, which makes them the correct place for a session token, unlike variables, which are plain configuration. A project may hold up to 50 cookies per environment.Other per-run overrides
Beyond address, headers and cookies, an environment can pin the browser’s timezone, locale and geolocation, so a date-formatting or currency test is checking the site rather than the machine it ran on.A typical setup
production
The project’s own address. Scheduled nightly. Alerts to Slack.
staging
Staging base URL plus a bypass header. Run on demand.
preview
Base URL supplied per run by the GitHub PR bot, plus the same bypass
header.

