# Links and domains

Every app gets a link on toupas.app as soon as it's live, with HTTPS. Apps on a plan can also have a custom name on toupas.app, or your own domain, or both.

## The app's links
`toupas links` lists them. One is the **main link**: by default the others go to it, so people and search engines see one address. `toupas links main <link>` picks another. `toupas links serve-all on` makes the app answer on every link instead.

## A custom name on toupas.app
```
toupas subdomain check corner-shop
toupas subdomain set corner-shop
```
Names use lowercase letters, numbers and single hyphens, 3 to 40 long. If a name is taken, Toupas suggests ones that are free.

A custom name is a yearly add-on of your account, not of one app. Setting a name that's on another of your apps moves it here, with what you paid for it. After a rename, the old name goes to the new one for 90 days (`--no-redirect` to stop that). `toupas subdomain remove` keeps the name for you on no app; `--release` gives it up, so the payment can cover another name. If you don't have a free name, Toupas gives you a link to pay in your browser.

## Your own domain
```
toupas domains add shop.example.com
```
Toupas answers with two DNS records to add where you manage your domain (GoDaddy, Namecheap, Cloudflare and so on):

| Type | Name | Value |
|---|---|---|
| CNAME | `shop.example.com` | `cname.toupas.app` |
| TXT | `_toupas.shop.example.com` | `toupas-verify=…`, as Toupas shows it |

Toupas checks every minute for the first hour, then every 15 minutes for 7 days. Once both records are there, it gets the certificate itself, usually within 10 minutes of finding them. `toupas domains status <domain>` shows how far along it is, and `toupas domains retry <domain>` starts checking again after 7 days. If you use Cloudflare for DNS, set the CNAME to **DNS only** (grey cloud), not Proxied.

### A domain without www
Most DNS providers don't allow a CNAME on a domain's root (`example.com`). Two ways work:
- Move your domain's DNS to a free Cloudflare account, and add the CNAME at the root (name `@`), set to DNS only.
- Or connect `www.example.com` to Toupas, and at your registrar forward `example.com` to `https://www.example.com`.

Like custom names, domains are yearly add-ons of your account, for any of your apps on a plan. An app can have up to 10. `toupas domains list` shows them and `toupas domains remove <domain> --yes` disconnects one.

The free website keeps its toupas.app link. For a custom name or your own domain, move it to a plan. Prices are on [Pricing](/pricing).
