hart domain
Custom domains of the team: add, verify, route
cmd/hart at v1.5.0Custom domains give workspaces your own address. Add the domain, set the DNS record it shows, let it verify, then route paths to workspaces. Changes need the team admin role.
hart domain [flags]
hart domain [command]Examples:
hart domain add shop.example.org
hart domain verify shop.example.org
hart domain route shop.example.org /=123 /api=124,125Subcommands:
hart domain add: Add a custom domainhart domain delete: Remove a custom domainhart domain list: List the team's custom domainshart domain route: Show or replace the routes of a domainhart domain set: Change a domain's settingshart domain show: Show a domain with its DNS records and routeshart domain verify: Check the domain's DNS records now
hart domain add
Adds the domain, unverified, and shows the DNS records to set: the TXT record proves it is yours (only
the TXT record does), the CNAME or A record sends its traffic to Harthelm. Then run hart domain verify.
A domain that is not verified within a few days is removed again, and a team adds only a few domains
an hour. --restricted lets only team members (signed in, or with an API key) reach the domain.
hart domain add DOMAIN [flags]| Flag | Description |
|---|---|
--restricted | only team members may reach the domain |
hart domain delete
The domain stops being served; its certificate and edge objects are pruned. Asks first unless --yes is given.
hart domain delete DOMAIN [flags]Aliases: delete, remove, rm.
| Flag | Description |
|---|---|
-y, --yes | do not ask for confirmation |
hart domain list
List the team's custom domains
hart domain list [flags]hart domain route
Without routes, shows the domain's routes. With routes, replaces ALL of them with the ones given, in this
order (the first match wins): a path prefix such as / or /blog (or an RE2 expression when the domain
uses regex), and the workspaces to send it to. Several workspaces on one route split the visitors
evenly, which makes A/B tests and blue/green switches. --clear takes the domain off the air.
hart domain route DOMAIN [PATH=WORKSPACE[,WORKSPACE...]]... [flags]Examples:
hart domain route shop.example.org /api=124 /=123
hart domain route shop.example.org /=123,125| Flag | Description |
|---|---|
--clear | remove all routes |
hart domain set
Changes the settings you name: --restricted, --regex (routes are RE2 expressions), --max-body-bytes and
--timeout-seconds (0 restores the installation's default).
hart domain set DOMAIN [flags]Examples:
hart domain set shop.example.org --restricted=false --max-body-bytes 10485760| Flag | Description |
|---|---|
--max-body-bytes int | the largest request body the router passes on (0: the default) |
--regex | route paths are RE2 expressions instead of prefixes |
--restricted | only team members may reach the domain |
--timeout-seconds int | how long the router waits for a response (0: the default) |
hart domain show
Show a domain with its DNS records and routes
hart domain show DOMAIN [flags]hart domain verify
Asks the platform to look for the TXT record and, unless --no-wait is given, waits for the answer.
Verified domains are checked again daily: when the record stays missing for some days, the domain lapses
and serves nothing until a check finds it again. Another check within 10 seconds is refused (429).
hart domain verify DOMAIN [flags]| Flag | Description |
|---|---|
--no-wait | return at once, without the result of the check |
--timeout duration | how long to wait for the check (default 1m0s) |