# Custom domains

###### LocalCan allows Public URLs (tunnels) to be created on a domain you own.

This option improves branding and creates a more professional look. Unlike Public URLs on the localcan.dev domain, custom domains never expire.

> [!NOTE/Availability]
> Custom domains are available on paid plans and work with HTTP Public URLs only, not TCP. The option is not shown on the Free plan.

#### Add and verify your domain

Custom domains are added and verified on the [Dashboard](https://www.localcan.com/dashboard/custom-domains). The **Add Custom Domain…** option in the desktop app opens the same page.

1. Use a subdomain of a domain you own. For instance, if you own `example.com`, add `preview.example.com`.
2. Add the CNAME record shown there at your DNS provider.
3. Verification usually takes a few minutes. From then on, LocalCan handles the SSL/TLS certificate lifecycle for you.

> [!WARNING/Note for Cloudflare users]
> When adding this CNAME record on Cloudflare dashboard, set the Proxy status to **DNS only** instead of **Proxied**, otherwise LocalCan won't be able to verify the domain.

#### Use your domain

**In the app.** Verified domains appear under **On Custom Domain** when you click **Add Public URL** on an app's card. A domain still verifying shows as `(pending)`, and one already attached to an endpoint shows as `(in use)`.

**From the CLI.** Point a quick tunnel at your domain:

```sh
localcan http 3000 --domain preview.example.com
```

See [Quick tunnels](/docs/cli/quick-tunnels).

**In a project file.** Pin the domain to any service:

```yaml title="~/.localcan/projects/checkout.yml"
services:
  web:
    target: http://localhost:3000
    endpoints:
      - provider: localcan
        url: preview.example.com
```

Drop the file into `~/.localcan/projects/` and run `localcan reload`. See [Configuration → Projects](/docs/configuration/projects).

See guide: [Setting up SaaS development environment with LocalCan](/docs/guides/setting-up-saas-development-environment-with-localcan)

