> ## Documentation Index
> Fetch the complete documentation index at: https://getfloo.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom Domains

> Add a custom domain to your floo app with automatic SSL.

Every floo app gets a default URL on `*.on.getfloo.com`. You can add your own domain with automatic SSL.

## Add a domain

```bash theme={null}
floo domains add myapp.com --app my-app
```

```
Domain added: myapp.com
Status: pending

Configure DNS:
  CNAME myapp.com → my-app.on.getfloo.com
  TXT _floo-verify.myapp.com → <claim token from the command>
```

## Configure DNS

Add both records shown by `floo domains add` at your DNS provider:

| Type  | Name                     | Target                                  |
| ----- | ------------------------ | --------------------------------------- |
| CNAME | `myapp.com`              | `my-app.on.getfloo.com`                 |
| TXT   | `_floo-verify.myapp.com` | The claim token from `floo domains add` |

For apex domains (e.g., `example.com` without `www`), use your provider's CNAME flattening or ALIAS record feature.

The traffic record routes requests to floo. The per-domain TXT token proves that
the current claimant controls DNS, even if an old record already points at floo.

## Verify DNS

Once both records are in place, verify ownership from the CLI or the dashboard:

```bash theme={null}
floo domains verify myapp.com --app my-app
```

Or click **Verify DNS** on the pending domain in the dashboard.

floo checks the traffic record and the exact `_floo-verify` TXT token. Once verified:

* Domain status changes to **active**
* SSL is provisioned automatically
* Org admins receive a confirmation email

Run verify again after DNS propagation if the first check fails.

<Note>DNS changes can take up to 24 hours to propagate, but most providers update within minutes.</Note>

## Confirm control of an existing active domain

Domains activated before claimant-specific TXT proof was introduced stay live.
The dashboard and `floo domains list` mark these domains as **reproof required**
and show the TXT value to publish.

Add that TXT record, then run:

```bash theme={null}
floo domains verify myapp.com --app my-app
```

Staged reproof checks that TXT evidence without refreshing the existing route.
Failed reproof does not take the domain offline. Until control is confirmed,
floo keeps the current route serving but blocks service or environment rebinding.

## Check status

```bash theme={null}
floo domains list --app my-app
```

```
Domains for my-app:
  myapp.com  active  CNAME → my-app.on.getfloo.com
```

## Per-service custom domains

For multi-service apps, you can bind a custom domain to a specific service by adding `domain` to `floo.app.toml`:

```toml theme={null}
[services.api]
type = "api"
path = "./api"
port = 8000
ingress = "public"
domain = "api.example.com"
```

Then add it via the CLI with `--services` to bind it to the service, and configure DNS:

```bash theme={null}
floo domains add api.example.com --app my-app --services api
```

The CNAME target is the per-service hostname:

| Type  | Name              | Target                      |
| ----- | ----------------- | --------------------------- |
| CNAME | `api.example.com` | `my-app-api.on.getfloo.com` |

A custom domain on a service overrides path-prefix routing — traffic to `api.example.com` goes directly to the `api` service. The app's `access_mode` still applies on the custom domain.

## Remove a domain

```bash theme={null}
floo domains remove myapp.com --app my-app
```

## For agents

```bash theme={null}
# Add domain and get DNS instructions
floo domains add myapp.com --app my-app --json 2>/dev/null | jq '.data'

# Verify after user configures DNS
floo domains verify myapp.com --app my-app --json 2>/dev/null | jq '.data'

# Check domain status
floo domains list --app my-app --json 2>/dev/null | jq '.data.domains'
```

JSON output:

```json theme={null}
{
  "hostname": "myapp.com",
  "status": "pending",
  "claim_verified_at": null,
  "dns_instructions": "Add a CNAME record: myapp.com -> edge.getfloo.com\nAdd a TXT record: _floo-verify.myapp.com with value <claim token>"
}
```
