Skip to content

Get started

Create a zone, add records and point a new domain at its nameservers, with the console, the ezgh CLI or the API.

Updated View as Markdown

This creates a zone for a domain that isn’t live anywhere yet, adds its records and points the domain at the zone’s nameservers. For a domain that’s already answering from another DNS provider, follow Move a domain with no downtime instead.

In the console, Create zone takes the domain, and the zone’s page walks you through the same steps. The rest of this page uses the CLI and the API.

Before you start

  • The ezgh CLI, signed in, with a project selected. The commands take --project, or EZGH_PROJECT.
  • DnsFullAccess on the project, or the root user.
  • Access to the domain’s registrar, to set its nameservers.

1. Create a zone

ezgh dns zones create example.com
ID:           0199f000-0000-7000-8000-0000000000a1
Slug:         zon_4k2m9x0a7qpe
Domain:       example.com
Status:       pending
Nameservers:  abcd2345.ns1.ezghdns.org, abcd2345.ns2.ezghdns.org
TXT name:     _ezgh-challenge.example.com
TXT value:    mfrggzdfmztwq2lknnwg23tpobyxe43u

The zone is pending, and doesn’t answer yet. With the API, this is CreateZone:

curl -sS -X POST "https://dns-api.ezghcloud.com/v1/organizations/$ORG_ID/projects/$PROJECT_ID/zones" \
  -H "Authorization: Bearer $EZGH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{ "domain": "example.com" }'

2. Add records

Records can be added while a zone is pending, so everything answers from its first moment.

ezgh dns records set example.com @ A 192.0.2.10 --ttl 300
ezgh dns records set example.com www CNAME example.com.
ezgh dns records set example.com @ MX "10 mail.example.com." "20 mail2.example.com." --ttl 3600
ezgh dns records list example.com

@ is the zone itself. Each set replaces what’s at that name and type. See Records.

3. Set the domain’s nameservers

At your registrar, set the domain’s nameservers to the zone’s two. Use exactly those two: they’re what ties the domain to your zone. A registrar can take from minutes to a few hours to publish the change.

4. Check that it’s live

Checks run on their own, and this runs one now:

ezgh dns zones verify example.com

Within seconds of the status becoming active, the zone answers:

dig +short A example.com @abcd2345.ns1.ezghdns.org

Next

Navigation

Type to search…

↑↓ navigate↵ selectEsc close