# Connect a domain

> Put your own hostname in front of a live web service with a TXT proof and a routing record.

Source: https://daster.io/docs/domains/connect-a-domain/ · Last updated: 2026-12-01

## Add the domain

1. Open **Domains › Your domains** and choose **Add domain**.
2. Enter the hostname, for example `shop.example.com`, and pick the web service. Only a live web service can receive a domain.
3. DASTER shows the domain's **TXT record**. Add it at your DNS provider.
4. Add the routing record shown on the **Traffic routing** card:
   - for a subdomain, a **CNAME** to the target shown (`edge.ap-south-1.daster.io`);
   - for an apex domain (`example.com`), an **A** record with the address shown. Do not add an **AAAA** record: the edge is IPv4 only, and every address of the name must be DASTER's.
5. Choose **Check now**.

To see what public resolvers return for your TXT and routing records, and their TTLs, use the free [DNS lookup](https://daster.io/domains/dns-lookup/).

## States

| State               | Meaning                                                                |
| ------------------- | ---------------------------------------------------------------------- |
| Pending DNS         | The TXT value is missing or wrong                                      |
| Verified            | Ownership is proved; the routing record is missing or points elsewhere |
| Pending certificate | Both records found; the certificate is being issued                    |
| Connected           | The hostname serves your app over HTTPS                                |

**Check now** explains what it found: not found, a wrong value, points elsewhere, issuing, connected, or DNS unavailable. A second check within 10 seconds returns the last result.

DASTER checks both records again about once a day. If the TXT record disappears, the domain goes back to Pending DNS; if the routing record moves away, it goes back to Verified. Routing stops in both cases.

A service's **Settings › Domains** lists its custom domains. **Disconnect** removes the route and certificate at once and releases the hostname.

## Hostname rules

Hostnames are lowercased and international names are converted to their `xn--` form. Wildcards, IP addresses, ports, paths, single labels, reserved names (`localhost`, `.local`, `.test`, `.internal`) and shared suffixes (`co.uk`, `github.io`) are refused.

## With the API

```http
POST /v1/projects/{projectId}/domains?organizationId={organizationId}
Content-Type: application/json
Idempotency-Key: domain-shop-1

{ "hostname": "shop.example.com", "purpose": "application", "appId": "<web service id>" }
```

Then `POST …/domains/{domainId}/check` (with an `Idempotency-Key`) and `GET …/domains/{domainId}` to follow it. `DELETE …/domains/{domainId}` disconnects it.

| Refusal                           | Meaning                                        |
| --------------------------------- | ---------------------------------------------- |
| `invalid_hostname` (400)          | The hostname breaks a rule above               |
| `domain_claim_conflict` (409)     | This project already uses it on another app    |
| `domain_pending_limit` (409)      | Too many domains are waiting for DNS           |
| `domain_claim_rate_limited` (429) | More than 10 claims for the project in an hour |

## HTTPS certificates

Once both records are found, DASTER gets a certificate for the hostname from Let's Encrypt, then checks it the way a browser would before it marks the domain **Connected**. You do not upload a certificate, and renewal happens by itself. DASTER asks for a certificate only for a hostname that passed both checks.

Two things stop the certificate:

- a proxying CDN in front of the hostname. At Cloudflare, set the record to **DNS only**;
- a `CAA` record that does not allow `letsencrypt.org`.
