---
title: "Register a domain"
description: "Search for a name, choose its term, registrant and DNS, and pay, from the console, the CLI or the API."
---

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

# Register a domain

Set your organization's registrant contact first: in the console under **Domains › Registrant
contact**, or with `ezgh domains contact set`. New domains are registered to it.

Registering needs `domains.domains.create`. With EZGH DNS it also needs `dns.zones.create`, and the new
zone counts against your DNS zones quota.

## In the console

1. Open **Domains** in the project and choose **Register domain**.
2. **Domain:** search for a name. A name without a dot is checked in every TLD offered. Pick an
   available one: each shows its first-year price and what it renews at.
3. **Term:** 1 to 10 years, and whether it renews automatically.
4. **Registrant:** filled in from the organization's contact. Change it for this domain if you need to.
5. **DNS:** **EZGH DNS** with DNSSEC, or **External nameservers** (2 to 13).
6. Check the total in the summary, accept the terms, and choose **Pay**.

The domain's page then follows the registration. When it's done the domain is **Active**, and its
DNSSEC shows **Published** once the zone answers.

## With the CLI

```sh
ezgh domains contact set --first-name Ada --last-name Lovelace --address1 "1 Main St" \
  --city Springfield --state IL --zip 62701 --country US \
  --email ada@example.com --phone +15550100100

ezgh domains check example
ezgh domains register example.com --years 1 --wait
```

`register` checks the price, shows it with the terms, and asks before it charges your card. In a
script, give the price you agree to pay and accept the terms:

```sh
ezgh domains register example.com --price 14.99 --accept-terms --wait
```

`--nameservers ns1.example.net,ns2.example.net` registers with nameservers of your own, without
DNSSEC. `--no-dnssec` and `--no-auto-renew` turn those off.

## With the API

[Check availability](/domains-api/CheckDomainAvailability/) with `{ "domains": [...], "years": 1 }`
to price up to 50 names. Then [register one](/domains-api/RegisterDomain/):

```http
POST /v1/organizations/{orgId}/projects/{projectId}/domains
Idempotency-Key: 6f1c…

{ "domain": "example.com", "years": 1, "expectedPrice": "14.99",
  "nameservers": { "mode": "ezgh" }, "dnssec": true, "autoRenew": true,
  "registrant": null, "acceptedTerms": "2026-11-03" }
```

- `expectedPrice` is the total you agreed to, as a decimal string. If the price is different now, the
  request is refused with `409 price_changed` and nothing is charged. The refusal's `error.price` is the
  new total: send it as `expectedPrice`, with a new `Idempotency-Key`, to register at it.
- `acceptedTerms` is the `terms.version` from the availability answer, once you've accepted its
  documents (`terms.links`).
- `registrant: null` uses the organization's contact, and is refused (`400`) if the organization has
  none.
- Retry with the same `Idempotency-Key`: a retry is never charged twice.

The answer is `202` with an operation. Read it, or the domain, until the registration finishes. A
registration that fails ends the operation with the reason, and the domain shows **Failed**.

| Refusal | Means |
| --- | --- |
| `409 price_changed` | The price isn't `expectedPrice` any more. `error.price` is the new total. |
| `409 payment_method_required` | The organization has no card. Add one in **Billing › Payments**. |
| `409 domain_unavailable` | Someone has the name. |
| `400 tld_not_supported` | The TLD isn't offered. |
| `409 premium_not_supported` | Premium names aren't offered. |
| `400 terms_not_accepted` | `acceptedTerms` isn't the current terms version. |
| `409 quota_exceeded` | The organization has as many domains as its quota allows. |
| `429 quota_exceeded` | The organization has registered as many domains as it may this hour. |
| `payment_failed` (on the operation) | The card was declined, with the issuer's reason. Nothing is registered. |
| `zone_unavailable` (on the operation) | The domain's DNS zone isn't available. You aren't charged. |

Source: https://docs.ezghcloud.com/domains/register-a-domain/index.mdx
