Attach a domain to an environment

Adding a domain to Velumi sets up its DNS. Attaching a hostname from that domain to an environment is what actually makes a site serve at that address.

How to attach

Open the project, choose the environment, and go to the Domains tab. Then:

  1. Pick the domain from the list of your managed domains.
  2. Enter the subdomain part — for example app to get app.example.com. Leave it empty to use the root domain (example.com).
  3. Choose a role (see below) and add it.

Velumi handles the underlying DNS for the hostname automatically — you don't create a record for it by hand.

Domain roles

RoleBehavior
PrimaryThe canonical URL for the environment. Each environment has exactly one.
AliasAn additional hostname routed to the same environment.
RedirectMarks the hostname as intended to redirect to the primary. Your application handles the redirect.

The first domain on an environment becomes Primary automatically; later ones default to Alias. For the full details on roles, removing domains, and search-engine indexing, see Custom domains.

The two-step model

It's worth repeating, because mixing these up is the most common source of confusion:

  • A domain (example.com) is added once and gives Velumi control of its DNS.
  • A hostname (example.com, app.example.com, staging.example.com) is attached to a specific environment to serve traffic.

One managed domain can supply hostnames to many environments — your production environment on example.com, staging on staging.example.com, and a preview on preview.example.com, all from the one domain you added.