tori domains
connect your own hostname to an app
npx tori.host domains list [app]Your own hostname on an app. add prints the DNS record to create: a CNAME to the app's own name for a subdomain (www.example.com), or an A record to the zone's addresses for a zone apex (example.com, shop.co.uk), plus a TXT record that proves you own the name when an A record is used. The control plane checks the records on a schedule and, once it points here, the zone obtains a certificate. Nothing is issued before the record resolves. check re-runs the DNS check now, at most once per 30 s.
primary marks one active hostname as the one the app is canonically reached on, and redirect on makes every other hostname — the app's own tori.cloud name included — answer 301 to it with the path and query kept. Off by default. While the primary is not active (withdrawn after DNS drift, or its certificate expired unrenewed), every hostname serves again until it is back. Preview: primary and redirect are not yet generally available on api.tori.host; the static-deploy guide says when they are.
[app] is the app's slug. When it is left out, the app is read from ./tori.json. --json prints the API's answer instead of the lines.
Options
Section titled “Options”--json— print the API's answer instead of the lines--no-browser— do not open a browser; sign in only with a code typed on another device (chosen automatically over SSH or with no DISPLAY)
Subcommands
Section titled “Subcommands”tori domains list [app]— list the app's custom domains and their statetori domains add [app] <hostname>— connect a hostname; prints the DNS record to createtori domains remove [app] <hostname|id>— withdraw a hostnametori domains check [app] <hostname|id>— re-run the DNS check nowtori domains primary [app] <hostname|id>— choose the primary hostnametori domains redirect [app] on|off— redirect the other hostnames to the primary
Examples
Section titled “Examples”Connect a subdomain
Section titled “Connect a subdomain”npx tori.host domains add my-app www.example.comServe everything on the apex, with www and the tori.cloud name redirecting to it
Section titled “Serve everything on the apex, with www and the tori.cloud name redirecting to it”npx tori.host domains primary my-app example.com && npx tori.host domains redirect my-app onRe-run the DNS check after fixing the record
Section titled “Re-run the DNS check after fixing the record”npx tori.host domains check my-app www.example.comRead the state as JSON
Section titled “Read the state as JSON”npx tori.host domains list my-app --jsonThis reference matches tori.host@0.16.4.
Download this page as Markdown.