# dflow apps:route:set

> Give one application a hostname you can open.

Web page: /docs/cli/path/apps-route-set/

This gives one application a hostname. Leave `--host` off to ask dFlow for a platform hostname. Pass `--host` only when you already have a domain of your own. The port comes from the deployment. There is no `--port` flag on this command.

```bash
dflow apps:route:set APP [--host HOST] [--wait-tls]
```

## Flags

`--host` is optional. When you set it, it is a lowercase DNS name of at most 253 characters, with at least two labels, and with no scheme, path, port, or wildcard.

`--wait` keeps polling after the route is stored, until the platform hostname answers. A custom hostname is stored and the command exits 0 while its certificate is still pending. The CLI prints that TLS stays pending until DNS points at the platform. `--wait-tls` keeps waiting until that custom hostname itself answers over HTTPS.

`--wait-timeout` and `--idempotency-key` are optional. The CLI does not read `DFLOW_APPS_DOMAIN` from your environment. The usual global flags still apply.

## What you see

The terminal prints the operation `id` and `status`. The hostname itself is on `dflow apps:route:show`. The application is the one in the current workspace, project, and environment. Exit 0 when the operation succeeded.

## When it fails

Exit 1: validation. Exit 2: auth. Exit 3: the application was not found. Exit 4: the hostname is already taken. Exit 5: the operation failed, including `ingress not admitted`. Exit 6: a precondition failed. Exit 7: the wait ended first. Exit 10: the API could not be reached.
