Skip to main content

Domains

Your published content is served on a domain you connect. Use tpc domains to add that domain, see what to change at your DNS provider or reverse proxy, and check when it works. Pass --scope <org-slug>/<product-slug> to select the product. There are two kinds of domain:
  • A subdomain, such as docs.acme.com, points at TPC with a DNS CNAME record.
  • A subpath, such as acme.com/aeo, is mounted by your own reverse proxy. It needs no DNS change.
For the same steps in the web app, see Set up custom domain.

List domains

Text output shows each domain, whether it is a subdomain or a subpath, whether it is active, whether it is the product’s default, and its ID.

Connect a subdomain

The command adds the domain and prints the DNS records to add, with the purpose of each:
Keep the CNAME record DNS-only: turn off any CDN proxying on it.

Connect a subpath

The output lists the public URL, the upstream origin to forward requests to, the steps, and a config snippet for your stack. TPC may store the host your site redirects to, such as www.acme.com instead of acme.com. Running connect again for a domain the product already has prints its instructions and does not add it twice.

Check the status

The status is connected, pending, or inactive, followed by a message that says what is still missing. A subpath can also show a reason, such as not_pointed or bot_protection. --wait checks every 10 seconds until the domain is connected. It works without a terminal. If --timeout (default 10m) passes first, the command prints the last status and exits with 1. DNS changes can take from a few minutes to an hour. For a subpath, pass the same --stack you used with connect to get the same snippet.

JSON output

With --format json, connect and status print the connection object: