# Custom domains and TLS

> Connect a domain you own to your app with CNAME and TXT records. Ferrite obtains and renews the TLS certificate.

Your deployed app already has an HTTPS address. Find it on the `host:` line in the deploy receipt or run `ferrite host` in the project directory. To give the same app an address you own, such as `shop.example.com`, claim that name and publish the records below. Your original address keeps serving the app.

## Bind a domain you own

1. Claim the hostname with `ferrite domains add shop.example.com`, in **Domains** in the Dashboard, or with the MCP tool `claim_domain`. Save the one-time `verify_token` (`ferrite domains add` saves it locally until verification completes). If the Dashboard shows an ownership record starting with `_ferrite-challenge`, use the TXT name and value below.
2. Publish the two CNAME records and the ownership TXT record below. Run `dig +short TXT _ferrite-verify.shop.example.com` and wait for the complete value to appear.
3. Verify and bind the name in the client where you claimed it: rerun `ferrite domains add shop.example.com` in the CLI, or over MCP call `verify_domain` with the hostname and the raw token as `presented_token`, then call `bind_domain` with the hostname and app once it returns `verified: true`.
4. Open the new HTTPS address after the certificate is ready.

If you lose the token before verification, the pending claim expires 24 hours after creation. Claim the name again, save the new token and update the TXT record. Verified names do not expire on this timer.

## Use a free name in Ferrite’s zone

Bare vanity names under `ferrite.run` (such as `shop.ferrite.run`) are reserved. Durable accounts can claim an account-suffixed name of the form `<slug>-<account_tag>.ferrite.run`, subject to reserved-term, brand, punycode, and quota checks.

With the CLI, run `ferrite domains suggest <slug>` to see your account's suffixed hostname, then run `ferrite domains add <slug>-<account_tag>.ferrite.run` to claim, verify, and bind it. Over MCP, call `claim_domain`, pass the returned `verify_token` unchanged to `verify_domain` within 24 hours (no DNS TXT record is required for eligible account-suffixed names), and then call `bind_domain`.

## Add the DNS records

For `shop.example.com`, publish these records where your domain's DNS is hosted (your registrar such as Namecheap, GoDaddy, or Squarespace, or a DNS host such as Cloudflare or DNSimple):

| Name | Type | Value | Purpose |
| --- | --- | --- | --- |
| `shop` | CNAME | `ferrite.cloud` | Routes visitors to Ferrite |
| `_acme-challenge.shop` | CNAME | `_acme-challenge.shop.example.com.acme.ferrite.cloud` | Delegates DNS-01 certificate validation without exposing your zone |
| `_ferrite-verify.shop` | TXT | `ferrite-verify=<verify_token>` from the claim | Proves domain ownership |

Most DNS providers ask only for the subdomain prefix shown above; some require the full hostname. Use a TTL of 300 seconds or less while setting up so corrections propagate fast.

If your provider proxies HTTP traffic (such as Cloudflare's orange cloud), turn proxying off on the traffic record so it resolves as DNS-only. Proxying blocks TLS certificate issuance.

### Using the bare domain

Standard DNS forbids a CNAME at the zone apex (`example.com`). Point an `ALIAS`, `ANAME`, or flattened CNAME record at `ferrite.cloud` instead (Cloudflare, DNSimple, and most modern DNS providers support one). If your provider does not, bind `www.example.com` with a CNAME and configure a redirect from the bare domain to `www.example.com` at your provider. The `_acme-challenge` record is always a normal CNAME because it sits beneath the apex.

## Check that it works

```bash
ferrite domains check shop.example.com
```

`ferrite domains check` queries public DNS and requests `https://shop.example.com/`. Within about ten minutes of both CNAME records resolving, Ferrite obtains the certificate and starts serving your app on the custom name. If a record was missing when Ferrite first checked, it retries an hour later, so give a fixed record up to an hour to issue.

## Good to know

- Names are claimed first come, first served across the installation. If a domain you own is already claimed by another account, [contact the Ferrite team](/kb/guide/get-help-from-the-ferrite-team/).
- There is no command or button to release a claim or remove a binding yet. Binding the name to another app in your account moves it there.
- Pick one canonical address for sign-in, links, `sitemap.xml`, and `llms.txt`. Sign-in cookies belong to a single host, so a user signed in on one name is not signed in on the other.
- `ferrite deploy` re-binds the app's domains automatically after each deploy. If you deploy through MCP alone, verify each domain after deploying and call `bind_domain` again if needed.

For the full reference, read [Domains](/docs/domains).
