Documentation / Guides

Moving a zone in

Moving DNS to Namecheap from another provider is four steps: capture what you have, put it in a file this tool reads, apply it, and confirm it is really being served before you cut anything over. The order matters — the last step is the one people skip.

1. Lower the TTL first, if you can

A day before the move, drop the TTLs at your current provider to something short. Resolvers cache for the TTL they were given, so a zone still advertising 86400 will keep being answered from cache long after you have changed it. This is the one step that cannot be rushed at the end.

2. Capture the existing zone

Most providers export a standard zone file. This tool reads that format directly — the same one dns export --format zone produces and dns edit shows you:

# host    ttl   type    value

@       1800  A       185.199.108.153
@       1800  A       185.199.109.153
www     3600  CNAME   user.github.io.
@       1800  MX      10 mx1.privateemail.com
@       1800  TXT     v=spf1 include:_spf.google.com ~all
_dmarc  1800  TXT     v=DMARC1; p=none

The value is the last field and runs to the end of the line, so TXT records need no quoting and semicolons survive verbatim — which is what makes DMARC and DKIM records come across intact. Only # starts a comment. An MX or SRV record's priority goes at the start of its value.

If the domain forwards mail, a zone file cannot express that. Handle forwarding separately with dns email set, or capture the finished result as JSON afterwards so it round-trips from then on.

3. Point the domain at Namecheap

Records only take effect once Namecheap's nameservers are the authoritative ones. Reset to them, or check what is there now:

namecheap ns list example.com
namecheap ns reset example.com

Do this after loading the records if you can — a domain pointed at an empty zone resolves to nothing.

4. Load the records

sync diffs the file against the live zone, shows what it will do, and asks. Nothing is written until you agree, and nothing is written at all if any record would be invalid.

# see what it would do, change nothing
namecheap dns sync example.com zone.txt --dry-run

# apply it
namecheap dns sync example.com zone.txt

# make the zone match the file exactly, removing anything not in it
namecheap dns sync example.com zone.txt --delete

Or copy from a domain you already have

If the setup exists on another domain in the account, clone it rather than exporting and re-importing:

namecheap dns clone template.com example.com

# just the records you need
namecheap dns clone template.com example.com -t A,AAAA
namecheap dns clone template.com example.com -t CNAME --host www

clone copies records verbatim — same host, value, TTL and priority. Values are not rewritten: anything naming the source domain, such as a redirect target, a mail host or a verification token, is copied as-is and listed as a warning for you to fix afterwards.

Or start from a preset

namecheap preset list
namecheap preset show github-pages
namecheap preset apply github-pages example.com -V username=myuser

5. Confirm it is actually being served

This is the step that distinguishes "the API accepted my records" from "the internet can see them". verify resolves the domain and compares what comes back:

namecheap verify example.com
namecheap verify example.com -t A
namecheap verify example.com --wait --timeout 300

6. Capture the result

Once it is right, export it and commit it. From then on you have something to diff against, and a bad change is one rollback away.

namecheap dns export example.com > dns/example.com.json
namecheap dns diff example.com dns/example.com.json --check

Transferring the registration too

Moving DNS and moving the registration are different things. To transfer a domain in, unlock it at its current registrar and get the auth code (also called an EPP code or transfer key) from them:

namecheap transfer start example.com --epp-code ABC123XYZ
namecheap transfer list
namecheap transfer status 10

Starting a transfer is an order, not an instant move — the losing registrar still has to release the domain, which can take up to five days. It charges your account, so it always confirms. Transferring out is not a transfer command: it is namecheap domains unlock plus the auth code, which you get from Namecheap's web interface.