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

# Custom domains

> Serve your services from domains you own, with automatic TLS.

By default, every public service gets a managed `*.spcf.app` URL. To serve a service from a domain you own, attach a custom domain to it.

## Attach a custom domain

Deploy the service first, then run:

```bash theme={null}
specific domain add <service> <domain>
```

For example:

```bash theme={null}
specific domain add web api.example.com
```

The command prints the DNS records to configure at your registrar. The DNS change is the one step Specific can't do for you.

By default the command targets the environment linked in your project directory (set by the most recent `specific deploy`). To target a different environment, pass `--environment`:

```bash theme={null}
specific domain add web api.example.com --environment staging
```

## DNS records

The output includes two options; pick one based on what your DNS provider supports:

* **CNAME** - recommended for subdomains (`api.example.com`, `app.example.com`). Points the subdomain at `ingress.specific.dev`.
* **A record** - recommended for apex domains (`example.com`), since most DNS providers don't allow CNAMEs at the zone apex. Points the domain at one of three Specific ingress IPs (any one works; the output shows one).

TLS certificates are issued automatically via Let's Encrypt once DNS resolves to Specific's ingress. There is no separate verification step: configure DNS and wait a few minutes.

## Confirming the domain

Adding a domain registers it with Specific, but doesn't verify that DNS is configured correctly or that TLS has been issued. To verify end-to-end once DNS is configured:

```bash theme={null}
curl https://<domain>
```

## Managing domains in the dashboard

Custom domains can also be added, listed, and removed in the [dashboard](https://dashboard.specific.dev). The dashboard is currently the only way to **remove** a custom domain; there is no `specific domain remove` command.
