---
title: "Move a domain with no downtime"
description: "Move a live domain to EZGH DNS from another provider. Load its records, prove control with a TXT record, then change nameservers."
---

> 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.

# Move a domain with no downtime

The [console](https://console.ezghcloud.com/dns) walks you through this on the zone's page: choose
**Already live elsewhere**. The steps below use the CLI.

Moving a domain takes it from one set of nameservers to another. The zone here has to be complete
and answering before the switch, so that resolvers get the same answers from either side while
the change spreads. The TXT record makes that possible: it proves control while your domain keeps
answering from your current provider.

## 1. Create the zone

```sh
ezgh dns zones create example.com
```

Keep the `TXT name`, `TXT value` and `Nameservers` it prints. `ezgh dns zones get example.com` shows
them again.

## 2. Copy your records

Add every record your domain has at its current provider, except the apex `NS` and `SOA`, which
each provider has its own of. DNS serves the types listed under [Records](/dns/records#types). A
record of another type, such as `HTTPS` or `TLSA`, can't be moved, and stops answering at the
switch. So does an alias or flattened CNAME at the apex: replace it with `A` and `AAAA` records.

If your provider exports a zone file, import it. Otherwise, a scan finds the common names:

```sh
ezgh dns records import example.com example.com.zone
ezgh dns records scan example.com
```

Each shows what it would add and what it left out, then asks. A scan can't list your domain, so
check it against your provider and add what it missed:

```sh
ezgh dns records set example.com legacy A 192.0.2.10
ezgh dns records set example.com @ TXT "v=spf1 include:_spf.example.net -all"
```

Compare the two before you go on:

```sh
ezgh dns records list example.com --all
```

## 3. Publish the TXT record

At your current DNS provider, add a TXT record at the `TXT name`, with the `TXT value`. Your domain
keeps answering from there; nothing changes for your visitors.

```sh
ezgh dns zones verify example.com
```

Within seconds of the status becoming `active`, the zone answers on its nameservers, though nothing
points at them yet.
Check a few names against what your current provider answers:

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

## 4. Lower your TTLs

Resolvers hold answers for their TTL, and registries hold the domain's `NS` records for their own.
A day or more before the switch, lower the TTL of any record you may need to change quickly, at
your current provider.

## 5. Remove any DNSSEC at the registrar

If your domain is signed at your current provider, note the DS's TTL (`dig DS example.com`), remove
the DS at your registrar, and wait for that TTL to pass after the parent zone stops serving it. A DS
from the old provider doesn't match this zone, so leaving it would stop the domain resolving for
resolvers that validate. You can sign the zone once the move is done: see [DNSSEC](/dns/dnssec).

## 6. Change the nameservers

At your registrar, set the domain's nameservers to the zone's two.

## 7. Keep the old zone for a while

Resolvers move over as the old `NS` records expire, usually within 48 hours. Until then some of
them still ask your old provider, so leave its zone in place and make any changes on both sides.
Afterwards, delete the zone there, and the TXT record with it.

Source: https://docs.ezghcloud.com/dns/move-a-domain/index.mdx
