drift Docs
Start
What is Drift?
The tour, if you are new here.
Why Drift?
The case for a smaller cloud.
Getting started
Nothing to deployed, in one command.
Architecture
How a slice is put together.
What it costs
The free grant, five unit prices, two rules.
Build
Canvas
Static sites, same origin as your API.
Tools
Operate
Auth
Accounts, tokens and scopes.
Security
Boundaries, sandboxing and hardening.

Domains: custom hostnames

domains is a top-level list of the hostnames the slice answers on, beyond its default <user>-<slice>.ondrift.eu. It sits beside atomic / backbone / canvas, not inside them.

Driftfile
domains:
    - host: forms.gemeente.example
    - host: tenants.example.org
      wildcard: true                     # every subdomain reaches this slice
TypeDefaultMeaning
  • host
    Type
    string
    Default
    required
    Meaning
    The hostname the slice should answer on.
  • verify
    Type
    string
    Default
    dns-txt
    Meaning
    Ownership-proof method. dns-txt is the only accepted value.
  • wildcard
    Type
    boolean
    Default
    false
    Meaning
    Route every subdomain of host to this slice too.

The deploy reconciles the set: a host declared here and missing on the slice is added, a host live on the slice and absent here is removed. Adding a host doesn't finish the job: point your DNS at the slice, then run drift slice domain verify <host>, which checks the TXT record and issues the certificate. Domain reconcile is best-effort: a failure is reported but doesn't abort the rest of the deploy.

Two things wildcard does not mean.

It is routing, not certificates: each subdomain still gets its own certificate, issued on demand, and there is no wildcard cert. And it is not multitenancy: telling alice.example.org from bob.example.org is your app's job. The deploy's own add path sends host and verify only, so set the wildcard flag with drift slice domain add <host> --wildcard.