---
title: "tori domains"
description: "connect your own hostname to an app"
---

connect your own hostname to an app

## Usage

```
npx tori.host domains list [app]
```

Your own hostname on an app. add prints the DNS record to create: a CNAME to the app&#39;s own name for a subdomain (www.example.com), or an A record to the zone&#39;s addresses for a two-label name (example.com). The control plane checks the record 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.

[app] is the app&#39;s slug. When it is left out, the app is read from ./tori.json. `--json` prints the API&#39;s answer instead of the lines.

## Options

- `--json` — print the API&#39;s answer instead of the lines
- `--no-browser` — sign in with a code you type on another device (chosen automatically over SSH or with no DISPLAY)

## Subcommands

- `tori domains list [app]` — list the app&#39;s custom domains and their state
- `tori domains add [app] <hostname>` — connect a hostname; prints the DNS record to create
- `tori domains remove [app] <hostname|id>` — withdraw a hostname
- `tori domains check [app] <hostname|id>` — re-run the DNS check now


## Examples

### Connect a subdomain

```sh
npx tori.host domains add my-app www.example.com
```

### Re-run the DNS check after fixing the record

```sh
npx tori.host domains check my-app www.example.com
```

### Read the state as JSON

```sh
npx tori.host domains list my-app --json
```

This reference matches `tori.host@0.9.7`.

Download this page as [Markdown](/downloads/markdown/cli/domains.md).
