First, work out what is actually moving
Three separate things are often bought from one company, and it helps to pull them apart:
- The registrar is where the domain name is registered and renewed.
- The DNS host is whoever runs your nameservers and holds your records.
- The web host is the server your site's files and database live on.
Changing web host only needs the third one to move. The domain can stay registered where it is, and if your DNS is at your registrar or at a service like Cloudflare, that can stay too. The whole move then comes down to editing one or two records. If your DNS is run by the host you are leaving, the nameservers have to change as well, which needs more care. The "who runs my DNS?" lookup tells you which situation you are in.
Don't transfer the domain to a new registrar at the same time. The move does not need it, and it adds a second thing that can go wrong.
The day before: prepare
- Write down every DNS record you have. Not only the A record. Note the MX records, every TXT record (SPF, DKIM, DMARC and verification codes), any CNAMEs for subdomains and any CAA record. Export the zone or take a screenshot if the panel allows it.
- Find out where your email lives. If your mailboxes are on the old host's server, cancelling that hosting deletes them. Email needs its own plan: move the mailboxes to the new host or to a dedicated mail service before you cancel anything.
- Lower the TTL on the records you are going to change to 300 seconds. Do it at least one full old TTL ahead. The day before is safe for almost any setup, and this post explains why the timing matters.
Build and test the new site before touching DNS
Copy the files and the database to the new host and get the site running there while the domain still points at the old one. Then test it under its real name by overriding DNS on your own computer only. Add a line to your hosts file with the new server's IP address:
203.0.113.10 yourdomain.com www.yourdomain.com
The file is /etc/hosts on macOS and Linux and C:\Windows\System32\drivers\etc\hosts on Windows. Your browser now loads the new server while everyone else still sees the old one. Click through the pages, forms, logins and checkout. Remove the line when you have finished.
Ask the new host how SSL will be handled. Many hosts issue a free certificate automatically, but only once the domain points at them, which can mean a short spell of browser warnings after the switch. If that matters, ask whether you can install your existing certificate in advance. If the domain has a CAA record, make sure it permits the new host's certificate authority, or the certificate will not be issued.
Make the switch
- Freeze changes. If the site takes orders, comments or sign-ups, put the old copy into maintenance mode, then copy the database across one last time so nothing is left behind.
- If the nameservers are staying put, edit the A record for the root and the record for
wwwso they point at the new host. With a 300-second TTL, most visitors are on the new server within minutes. - If the nameservers are changing, recreate every record from your list at the new DNS provider first, including MX, SPF, DKIM and DMARC. Check them, then change the nameservers at your registrar. Leave the old zone untouched, because some resolvers will keep asking the old nameservers for a day or two.
- Check from outside. Query a public resolver with
dig @1.1.1.1 yourdomain.com A +short, or let the Route Planner check each record for you. Then send and receive a test email.
Editing records and changing nameservers looks different in every panel. Find yours in the provider guides: there are walkthroughs for GoDaddy, Namecheap, Cloudflare, IONOS, cPanel and many more.
Afterwards: don't cancel too early
- Keep the old server running for at least 48 hours. A few visitors will still arrive there from stale caches. If the old copy is in maintenance mode they see a holding page, not an out-of-date shop.
- Put the TTL back up to an hour or more once you are happy.
- Then cancel the old hosting. If the domain is registered through the old host, check that closing the hosting plan leaves the domain registration and its renewal in place.
If something looks wrong after the switch, the cause is usually a missed record or a leftover one. The troubleshooting page lists the common ones in order, and our propagation explainer covers what is and is not worth waiting for.



