Previews
Every deployment is reachable before you activate it. That is the point of a preview: you check the build in a real server environment — real build output, real gateway calls — while your production domain still serves the previous deployment.
Three hostnames per deployment
Each deployment generates three hostnames on the platform's sites domain, and they differ in how long they stay meaningful:
| Hostname | Shape | Stays pointed at |
|---|---|---|
| Unique | <id>.sites.revenexx.io | This exact deployment, forever |
| Commit | commit-<commit-hash>.sites.revenexx.io | The deployment built from that commit |
| Branch | branch-<branch-name>-<hash>.sites.revenexx.io | The latest deployment from that branch |
The unique one is the permanent address of one build — use it in a review comment or a bug report, where you want the link to keep showing the thing you were looking at.
The commit hostname is keyed to the commit hash, so it's the natural link to attach to a pull request or a CI status.
The branch hostname is the one that moves. It follows the latest build from a branch, which makes it the right link to hand to a stakeholder — "staging is always here" — without re-sending a URL after every push. The trailing hash keeps one branch name from colliding across sites, so don't try to construct these by hand; read them from the deployment.
This is also why commit- and branch- are reserved prefixes on custom domains.
Protecting a preview
A preview host is a real host on the public internet. Before a customer's unreleased storefront is on one, put access control in front of it. Three mechanisms combine:
- Basic auth — one or more username/password credentials. The simplest way to hand a build to a customer without publishing it.
- An IP allowlist — addresses and CIDR ranges that get through without a login, for internal networks and monitoring.
- Path rules — an exclude list of paths that stay reachable without a login (a health check, a webhook receiver), and an include list which, when set, inverts the default: only those paths need a login and everything else is public.
They resolve in that order of specificity: an allowlisted IP wins, then an excluded path, then — if an include list exists — only listed paths are protected, and otherwise everything is.
That last rule is the one to be careful with. Setting an include list makes the rest of the site public. If your intent is "protect everything except the health check", use the exclude list, not the include list.
Finding a deployment's preview URLs
Over the API, fetch the deployment:
curl -s 'https://api.revenexx.com/v1/sites/<SITE_ID>/deployments/<DEPLOYMENT_ID>' \
-H 'X-Revenexx-Tenant: <tenant-slug>' \
-H 'X-Revenexx-Api-Key: <api-key>'
Or list them to find the one you want:
revenexx sites list-deployments --site-id <SITE_ID>
What to check on a preview
A preview catches the class of problem that never appears in npm run dev, because dev mode runs against mocked services and an unminified build. Worth checking every time:
- Server-rendered pages return real HTML — view source, don't just look at the rendered page.
- The data domains you switched from mock to live actually resolve, and failures degrade gracefully.
- Branding is applied on first paint, with no flash of the default palette.
- The paths you excluded from basic auth really are reachable, and the ones you didn't really aren't.
Related
- Deployments — statuses, and what
readymeans - Instant rollbacks — promoting a previewed deployment, and going back
- Domains — pointing a real domain at the site