Understanding the consequence.
WHAT CHANGES
Which servers answer DNS questions for your domain.
Everything follows from that: website, email, subdomains, verification records.
WHAT DOES NOT CHANGE
Your files, your database, your mailbox contents.
A nameserver change does not move anything. It redirects where people are told to look.
WHAT BREAKS IF YOU ARE NOT CAREFUL
Mail, if MX records are not recreated at the new provider Verification records for third-party services Subdomains Anything relying on a TXT record
THE PREPARATION
Export or record the existing zone before changing anything.
Recreate every record at the new provider before switching, so the new nameservers already hold correct answers.
THE ORDER THAT WORKS
- Record the existing zone
- Create every record at the new provider
- Verify the new provider returns correct answers, by querying it directly
- Change nameservers at the registrar
- Test everything
WHAT NOT TO DO
Change nameservers first and create records afterwards. There is a window where the domain resolves to nothing.