# Domains and DNS

> Buy a domain, attach your own, renew it, and manage its DNS records, from the CLI or an agent.

<Callout title="In brief">

- Every project has its own address from the moment it is created: `<project>.extraorbital-apps.com`, listed as `reserved` until the first deploy.
- `npx extraorbital domains buy <name>` shows the price, asks once, buys the domain and puts it on the project.
- `npx extraorbital domains attach <domain>` attaches one you already own elsewhere and prints the DNS records to set.
- A domain bought here renews every year on its own; `domains auto-renew <domain> off` lets it expire.
- `npx extraorbital dns` lists, adds and removes the records of domains bought here, like `vercel dns`.

</Callout>

Domains belong to the **team**, and are attached to one of its projects or to none. Every command below acts on the project linked in the folder (`.extraorbital.json`); run [`extraorbital link`](/docs/cli#extraorbital-link) first. Agents do the same with the MCP tools named in each section.

## The project's own address

| | |
| --- | --- |
| Production | `https://<project>.extraorbital-apps.com`, then a redirect (307) to the primary domain once that one is live |
| Previews | `https://preview.<project>.extraorbital-apps.com`, and `preview-<branch>.<project>…` for a branch (MCP only) |

The label is the project id made a DNS label, unique across all teams: the same id in another team gets a suffix (`shop-3fa2`). It is given when the project is created and never changes. It shows in `domains` as `reserved` until the first deploy, then follows HTTPS like any other domain. It cannot be detached.

## Find and buy a domain

```bash
npx extraorbital domains check maisonlune        # names like it, with their price
npx extraorbital domains check maisonlune.fr     # one name, plus suggestions
npx extraorbital domains buy maisonlune.fr       # price, one question, bought and attached
```

The price is per year, in US dollars, with the renewal price beside it. Domains are bought and renewed one year at a time for now. `buy` prints the price, asks once, then charges the team: `--yes` skips the question and is required without a terminal. A team on the Free plan, or over its budget, gets the reason and the link to its billing page instead, and nothing is bought.

A bought domain is set up at once: its DNS stays at name.com, pointed at the project, with `www` redirecting to the apex. It is live with HTTPS once the project is deployed and its registry has published it, usually within minutes (about 30 minutes for `.xyz`). Do not open it before `domains` says `live`: a lookup made earlier is remembered as "no such domain" for up to an hour.

| Flag | |
| --- | --- |
| `--primary` | Make it the domain the project's other hosts redirect to |
| `--no-attach` | Keep it in the team, on no project; `attach` sets it up later |
| `--dry-run` | Show the price, buy nothing |

MCP: `check_domain`, then `buy_domain` with its `quote_id` (valid 10 minutes), after the person said yes to the price.

## Attach a domain

```bash
npx extraorbital domains attach app.maisonlune.fr        # a subdomain of one the team holds: live in seconds
npx extraorbital domains attach www.example.com --wait   # your own domain, held elsewhere
```

| Domain | What happens |
| --- | --- |
| Bought here | Attached to the project; one detached from another project moves here |
| A subdomain of one the team holds | Its record is written for you: live in seconds |
| Held elsewhere (external) | The records to set at its DNS provider are printed, then `domains verify` checks them |

The records for an external domain:

| Domain | Records |
| --- | --- |
| An apex (`example.com`) | An `A` record at `@`, or its nameservers pointed at `ns1.vercel-dns.com` and `ns2.vercel-dns.com` |
| A subdomain (`www.example.com`) | A `CNAME` to the target printed |
| Either, when Vercel asks | A `TXT` record at `_vercel.<apex>` that proves it is yours |

`domains verify <domain>` checks again; `--wait` checks every 10 seconds until it is live. `domains inspect <domain>` shows each layer: the registry, DNS, Vercel and HTTPS, which one it is waiting on, and the records to fix.

MCP: `add_domain`, `domain_status`, `retry_domain`.

## Primary domain, detach, move

```bash
npx extraorbital domains primary maisonlune.fr    # the others redirect to it once it is live
npx extraorbital domains detach old-shop.fr       # off the project, still the team's
npx extraorbital domains --all                    # every domain of the team, and its project
```

Detaching never deletes a domain. A domain bought here stays the team's, still renewed; an external one stays listed until it is attached again, or until someone else who holds it attaches it. Moving a domain between projects is `detach`, then `attach` on the other project.

MCP: `set_primary_domain`, `remove_domain`, `list_domains` (`all: true` for the team).

## Renewals

A domain bought here renews every year, 30 days before it expires, and the renewal is charged to the team.

```bash
npx extraorbital domains auto-renew maisonlune.fr off   # let it expire at the end of its term
npx extraorbital domains renew maisonlune.fr           # renew now for a year: price, one question
```

`renew` shows the price of one more year and the new expiry, then asks once. The expiry shown is the registrar's, read again each time. External domains renew at their own registrar.

MCP: `set_auto_renew`, and `renew_domain`, which answers the price without `price_in_cents` and renews with it. ChatGPT's app has no `renew_domain`.

## DNS records

For domains bought here: an external domain's DNS stays at its own provider.

```bash
npx extraorbital dns ls                                           # every zone the team holds here
npx extraorbital dns add maisonlune.fr @ MX mx1.improvmx.com 10   # a mail server
npx extraorbital dns add maisonlune.fr _dmarc TXT "v=DMARC1; p=none"
npx extraorbital dns add maisonlune.fr _sip._tcp SRV 1 5 5060 sip.example.net
npx extraorbital dns rm rec_abcdefghij
```

| Type | Notes |
| --- | --- |
| A, AAAA, ALIAS, CNAME, TXT | `@` is the domain itself; no CNAME at `@` (use ALIAS) |
| MX | A value and a priority |
| SRV | Priority, weight, port and target |
| CAA | Only for domains on Vercel DNS |

A TTL is 300 seconds at least (`--ttl`). Records marked `locked` make a domain work (its `A`, `www`, a subdomain's `CNAME`) and cannot be removed: detaching the domain takes them away.

MCP: `list_dns_records`, `add_dns_record`, `remove_dns_record`.

---

More for agents: [Sitemap](https://extraorbital.dev/sitemap.md) · [llms.txt](https://extraorbital.dev/llms.txt) · [agents.md](https://extraorbital.dev/agents.md)
