# Use your own domain for links

Your links live on your project's link host, such as `acme.<link domain>`. You can also serve them on a domain you own, such as `go.example.com`. Once it's active, every short URL and QR code uses your domain, and your links keep working on the Mocco host too.

A project has one link domain. Only owners and admins can add, re-check or remove it; members see it.

## 1. Before you start

- Turn on **Deep links** for the workspace and choose the project's **Subdomain** under **Link host** (see [Deep links overview](https://www.mocco.club/docs/en/articles/xz8btr-overview#3-choose-your-link-host)). Your domain serves the same links, so Mocco asks for the subdomain first.
- Pick a hostname you don't use for anything else, such as `go.example.com` or `link.example.com`. Mocco takes over every path on it.

## 2. Add the domain

On **Deep links → Settings**, find **Your domain**. Enter the hostname, such as `go.example.com`, without `https://` or a path, and click **Add domain**. Mocco says right away if it can't take it, for example when another project already uses it.

## 3. Create the DNS records

With whoever hosts your domain's DNS, create the records Mocco shows:

- a `TXT` record at `_mocco-challenge.<your hostname>` whose value is the `mocco-verify-…` token. It proves the domain is yours;
- a `CNAME` record at your hostname pointing where Mocco shows (on the hosted Mocco, `cname.vercel-dns.com`), or an `A` record for a bare domain such as `example.com`.

The records and the provider steps are the same as for a help center's domain: see the DNS examples in [Use your own domain](https://www.mocco.club/docs/en/articles/im56b3-help-center#dns-examples) of the help center guide. On Cloudflare, set the CNAME's **Proxy status** to **DNS only** (the grey cloud).

## 4. Wait for it to become active

The domain moves through **Waiting for DNS**, **Issuing certificate** and **Active**, and the page updates on its own. Mocco looks for the TXT record within a minute, then less often, for 7 days; **Re-check** looks again now and starts a fresh 7 days. Issuing the certificate usually takes a few minutes once the domain is verified.

Once it's **Active**:

- **Short URLs and QR codes** use your domain: `https://go.example.com/spring`. The **Link host** shows it under **Your domain**, ready to copy. Links you already shared on the Mocco host keep working.
- **Opening the app**: your domain serves the same files that let your app open from links. Add it to your app too: the lines under **Open the app from links** now list your domain, so copy them again into your app's associated domains (iOS) and intent filter (Android), then ship the app. See [Open the app from links](https://www.mocco.club/docs/en/articles/ikc6rm-open-the-app). iOS's "Open in app" keeps using the Mocco host, so you need no second domain.

You can delete the TXT record then; the CNAME or A record must stay.

## Removing the domain

**Remove** asks you to confirm, then stops serving your links on the domain right away. Short URLs go back to the Mocco host, and the links keep working there, but any link or QR code you shared with your domain stops opening. Remove it only if you no longer use it.

## With an agent

An agent connected to Mocco can add, re-check and remove the link domain for you (`mocco_domains_add`, `mocco_domains_recheck`, `mocco_domains_remove`) when you allow it to set up deep links and the workspace allows agents to make changes. It asks you to confirm each change.
