Copy the site to the new host while the old one keeps serving visitors, preview the copy through your computer's hosts file, and lower your DNS TTL a few days early. Then point the domain's records at the new server, leave mail (MX) records alone unless email moves too, and cancel the old plan only once its traffic stops.
| Stage | What you do | Site still live? |
|---|---|---|
| 1. Prepare | Full backup, list DNS records, lower TTL | Yes, on the old host |
| 2. Copy | Upload files, export and import the database | Yes, on the old host |
| 3. Test | Preview the new copy via your hosts file | Yes, on the old host |
| 4. Switch | Change A or CNAME records, check SSL | Yes, on both while DNS updates |
| 5. Close | Watch old host traffic fall to zero, then cancel | Yes, on the new host |
Updated
Downtime during a host move almost always comes from doing things in the wrong order: cancelling the old plan first, switching DNS before the new copy works, or forgetting that email lives in the same DNS zone. This guide keeps the old site running until the new one is proven, and the checklist below lets you tick off each step as you go.
0 of 16 steps done
Clear ticks
Your current TTL: 14400 seconds (4 h)
After lowering the TTL, wait at least 4 h before switching, so caches holding the old value have expired.
Ticks are saved in this browser only.
Replace the example names, IP addresses and paths with your own. Run database commands on a server or computer that has the MySQL client installed.
203.0.113.10 stands in for the new server's IP address. Add both the bare domain and the www name.
# macOS / Linux: sudo nano /etc/hosts
# Windows (as administrator): C:\Windows\System32\drivers\etc\hosts
203.0.113.10 example.com
203.0.113.10 www.example.commysqldump writes the database as SQL statements; the mysql client replays them into the new, empty database.
# On the old host
mysqldump -u olduser -p shop_db --result-file=shop_db.sql
# On the new host, after creating an empty database called shop_db
mysql -u newuser -p shop_db < shop_db.sqlRun before and after the switch. The second command confirms the mail records did not change.
dig +short example.com A
dig +short example.com MX| Record | What it does | Change it? |
|---|---|---|
| A / AAAA | Maps the domain to the server's IP address | Yes, to the new host's IP |
| CNAME | Maps a name such as www to another domain name | Yes, if the new host asks for one |
| MX | Delivers email to your mail server | No, unless email is moving |
| TXT | Holds text such as email checks and site verification | Usually no |
Your computer checks its hosts file before asking DNS, so one line that maps your domain to the new server's IP address lets only you see the new copy under the real domain. Microsoft's own documentation suggests this for previewing a site on a new hosting provider.
On Windows the file is in C:\Windows\System32\drivers\etc and needs an administrator to edit. On a Mac or Linux it is /etc/hosts and needs sudo.
Sites built on WordPress and similar systems keep content in a database. Export it from the old host (phpMyAdmin or mysqldump), create an empty database on the new host, import the file, and update the site's configuration with the new database name, user and password.
If your old host charges by the month, do not cancel until the new site has run cleanly for a while; a spare month is cheap insurance.
The copying usually takes an hour or two for a small site. The waiting is the longer part: give the lowered TTL time to spread before you switch, then keep the old host running until its traffic stops, which Google's site-move guide treats as the signal to shut it down.
If the URLs stay the same and the site works throughout, Google's guide for moves without URL changes describes it as an infrastructure change. Watch Search Console afterwards, and use the URL Inspection tool to check that Googlebot can reach the new server.
Cloudflare's documentation defines TTL as a field on DNS records that controls how long each record is cached. A lower TTL means resolvers check for changes sooner, so your switch reaches visitors faster.
Not if your MX records still point at your mail provider. An MX record is what delivers email to a mail server. Moving web hosting changes the A or CNAME records; leave MX and the related TXT records as they are unless your email is moving too.
Many hosts use Let's Encrypt. Its HTTP-01 check places a file on your server and must be done on port 80, so it only succeeds after the domain points at the new host. The DNS-01 check uses a TXT record and can be done before the switch if your host supports it.
Related: Domain vs hosting, MX records explained, Site migration SEO checklist, How much website hosting costs.
Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.
We.Inc is an AI-powered website builder you can resell under your own brand. Launch a branded client dashboard, bill on Stripe Connect, and deliver AI-generated websites in minutes. White-label plans start at $99 a month for 25 client sites, with a 7-day free trial and no per-site fees.