A domain name is not your website's files. DNS records direct visitors and mail to the appropriate services. Moving hosting, transferring a registration and changing nameservers are separate operations.
Know the main records
- A maps a name to an IPv4 address.
- AAAA maps a name to an IPv6 address.
- CNAME provides an alias to another DNS name.
- MX identifies incoming mail servers.
- TXT holds text such as verification data and SPF policies.
Copy the complete DNS zone
Before changing nameservers, preserve mail records, DKIM, SPF, DMARC, verification entries and subdomains as well as the website's address. Prepare the new zone before switching.
Test before switching
Move files and databases, test the new environment, then update the appropriate records. Cached answers can remain in use until their TTL expires, so keep the previous hosting available while checking the transition from different connections.
A registration transfer moves your domain between registrars. Check how existing nameservers will be retained and keep the transfer code private. Read the transfer page before proceeding.
Technical reference: Cloudflare DNS records.

