Back to Articles

How to Switch Web Hosts Without Losing Data or SEO (Zero-Downtime Guide)

Last updated:

A website moving safely from one hosting server to another with its ranking line staying unbroken

Most people put off changing hosts for one reason: they are afraid the site will go down, the emails will stop, or the rankings they spent years earning will vanish overnight. That fear is reasonable, because a badly run migration can do all three. A well run one does none of them, and the difference is almost entirely about order. Move the pieces in the right sequence and your visitors never see a flicker. Move them in the wrong sequence and you find out the hard way that DNS does not update instantly. This guide walks through the sequence we use, so you can copy it.

How do you switch web hosts without losing data or SEO?

You switch hosts by building a complete, working copy of your site on the new server first, testing it there privately, and only then pointing your domain at it. The one rule that prevents almost every disaster: never cancel or wipe the old host until the new site is live and verified. The old host is your safety net.

Everything else follows from that principle. Because the new copy is built and tested before any visitor is sent to it, there is no window where the site is broken in public. Because the old host stays running untouched, you can undo the whole thing by leaving the domain where it was. We keep the previous environment intact on every migration for exactly this reason, and it is the single habit that turns a nerve-wracking move into a boring one. The rest of this article is that principle broken into steps.

What do you need to back up and check before you move anything?

Before you touch the new host, take a full backup of the current site and write down how it is put together. That means every file, the database if the site uses one, your email accounts, your DNS records, and a note of the exact software versions the site runs on. If you cannot restore the old site from what you have saved, you are not ready to start.

A "website" is usually more moving parts than people expect, and the parts that get forgotten are the ones that break after the move. Here is the checklist worth completing before anything else happens:

  • All site files. The full public directory, not just the theme or the pages you remember editing.
  • The database. Most content-managed sites (WordPress and similar) keep their content, settings, and users in a database, not in the files. A file backup alone will restore an empty shell.
  • Email accounts. Mailboxes hosted at your current provider do not travel with the website automatically. Export the mail and note every address, or you can lose messages when the domain moves.
  • DNS records. Screenshot or export your current DNS zone: the A records, MX records for email, any TXT records for SPF, DKIM, and domain verification. These are easy to forget and they are what keeps email flowing.
  • Software and version notes. The PHP version, the database version, and any server settings the site depends on. Matching these on the new host avoids surprises.
  • A record of your current TTL. More on this below, because it decides how fast the final switch happens.
  • A fresh backup made today. If your current host runs daily backups, grab the most recent one as a second copy, but still take your own fresh backup on the day you migrate. A backup from last week does not include this week's orders or comments.

What are the steps to migrate a website to a new host, in order?

Build the new site fully on the new host, confirm it works there, lower your DNS TTL, then point the domain across and watch. Do it in that order and the public site is never in a half-finished state. The sequence below is the whole job.

Two things frame the sequence before you start it. If you are still deciding what kind of hosting to move onto, our guide on shared, VPS, and managed hosting covers which type fits which situation. And plan to keep the old host running for at least a few days after the switch, because until every DNS cache worldwide has updated, some visitors are still being sent to the old server, and you want it answering normally when they arrive.

  • 1. Set up the account and matching environment on the new host. Same or newer PHP and database versions, the same server type where it matters. Do not point your domain at it yet.
  • 2. Copy the files and import the database to the new server. Keep the file structure identical so nothing has to be rewritten.
  • 3. Build the site to answer on a temporary address the new host provides, or by editing your own computer's hosts file, so you can load the real site from the new server while the public still sees the old one.
  • 4. Test everything on the new server. Open the key pages, submit a form, log in, check images and downloads load, and confirm the database-driven parts work. Fix problems here, in private, where no visitor can see them.
  • 5. Lower your DNS TTL on the domain to a short value (300 seconds is common) at least a day before the switch, so the final change propagates in minutes instead of hours.
  • 6. Reduce writes right before the cutover. On a busy site, briefly pause anything that changes the database (new orders, comments) and do a final sync of files and data so nothing created in the last hour is stranded on the old server.
  • 7. Update the DNS records to point the domain at the new host's IP address, and update MX records only if your email is moving too.
  • 8. Watch both servers while DNS propagates. Traffic shifts gradually from old to new as caches expire. Because both are serving the same site, visitors get a working page whichever one they hit.

How do you keep your site online during the move with zero downtime?

Zero downtime comes from overlap: the new site is fully working before you change DNS, and the old site keeps running after you change it. At no point does the domain point at an empty or broken server. Lowering your TTL beforehand shrinks the changeover from hours to minutes.

The thing most people get wrong is treating DNS like a switch that flips instantly. It does not. Every network that has looked up your domain recently holds the old answer until its cached copy expires, and that expiry time is your TTL. If your TTL is set to 24 hours, some visitors keep hitting the old server for a full day after you change the record, which is completely fine if the old server is still serving the same site, and a real outage if you already tore it down. That is why the sequence matters more than any single step. Lower the TTL a day ahead, keep both servers live through the transition, and the "downtime" everyone fears never actually has a place to happen.

How do you avoid losing SEO rankings when you change hosts?

If you keep the same domain and the same page addresses, a host change on its own does not cost you rankings, because Google indexes your URLs, not your server. You lose SEO when the move breaks something: the site goes down during the switch, the addresses change, HTTPS stops working, or a crawler block gets carried over from the staging copy. Protect those four things and your rankings travel with you.

This is the part where honest expectations save you a lot of worry. A pure host move, same domain, same URLs, same content, is close to invisible to search engines. There is no "change of host" you need to report to Google, and no reason for rankings to drop. Problems appear when a migration is bundled with other changes or run carelessly. Watch these specifically:

  • Do not change your URLs unless you have to. Keep every page at the same address. If a migration is also a redesign and the addresses do change, put a permanent 301 redirect from each old URL to its new equivalent, one to one, not everything dumped onto the homepage.
  • Avoid downtime during the crawl. A short outage rarely hurts, but repeated errors while Googlebot is visiting can. The zero-downtime method above is your protection here.
  • Carry HTTPS across correctly. Make sure the new host serves your site over HTTPS with a valid certificate before you switch, and that the redirect from http to https still works. Our hosting includes a free SSL certificate, so the secure version keeps answering without a gap.
  • Check for blocked crawling on the new copy. Test and staging sites are usually blocked from search with a noindex tag or a robots.txt disallow. That block often survives the copy to the new host. Confirm the live site is crawlable before and after the switch.
  • Keep the content identical. Rankings are attached to the pages Google already knows. If the text, titles, and headings change during the move, you have changed the thing being ranked, not just where it is hosted.
  • Confirm indexing after the switch. Open Google Search Console and use URL Inspection on a few important pages to confirm they are still crawlable and indexed. You do not need the Change of Address tool for a host move, that tool is only for moving to a different domain.

How do you verify the migration actually worked?

Go through the new site the way a real visitor and a search engine would: load the main pages, test a form and a login, send a test email in and out, and inspect a couple of URLs in Search Console. The migration is done when the new server passes all of these and the old one is no longer receiving traffic.

A migration that "looks fine" on the homepage can still be broken three clicks in, so check the parts that fail quietly:

  • Forms and checkout. Submit a real form and complete a test transaction if you sell online. These depend on server settings that do not always carry over.
  • Email in both directions. Send a message to an account on the domain and send one out from it. Broken MX records show up here and nowhere else.
  • Images, downloads, and links. Load pages with media and click internal links to catch anything still pointing at the old server or a temporary address.
  • HTTPS and redirects. Confirm the padlock shows and that http addresses redirect to https.
  • Indexing status. URL Inspection in Search Console tells you the live page is reachable and indexable.
  • Traffic on the old server. When its logs go quiet, DNS has finished propagating and you can retire it safely.

What mistakes cause downtime or data loss during a host switch?

The failures that actually cost people their site and rankings are predictable, and every one of them comes from breaking the "test first, keep the old host" rule. Knowing them in advance is most of the protection.

  • Cancelling the old host too early. The most expensive mistake. Once the old server is gone, your safety net and your fallback are gone with it, and any DNS still pointing there hits nothing.
  • Forgetting the database. Copying files but not the database leaves a content site empty. The content lives in the database, not the files.
  • Not lowering the TTL first. Skip this and the switch that should take minutes drags on for hours, with visitors split between servers the whole time.
  • Losing email in the move. Mailboxes and MX records are easy to overlook because they feel separate from the website. Export the mail and copy the records before you touch DNS.
  • Leaving a staging block in place. A noindex tag or a robots.txt disallow copied over from the test site can quietly remove your live pages from Google days later.
  • Changing URLs without redirects. If addresses change and nothing redirects the old ones, you keep the traffic loss and hand Google a set of dead links.

Should you migrate the site yourself or have it done for you?

Do it yourself if you are comfortable with backups, DNS, and databases and the site is simple. Have it done for you if the site earns money, runs on a database, or you are not certain you could restore it from your own backup. The cost of a botched migration is almost always higher than the cost of a clean one.

There is no shame in either choice, and the honest deciding factor is what a mistake would cost you. A small brochure site you can rebuild in an afternoon is a fine one to practice on. A store taking orders, or a site that took years to rank, is not the place to learn DNS under pressure. This is the exact job our website migration service exists for: we build and test the new site before touching your domain, move it with zero downtime and no data loss, and keep the old environment as a fallback until the new one is confirmed. If you are moving because your current hosting has been unreliable, our managed web hosting includes daily backups and free SSL, so the next move, if there ever is one, starts from a much safer place.

If your site earns money or took years to rank, a migration is not the place to gamble. Tell us your domain and where you want to move, and we will handle the switch with zero downtime and no data loss, keeping your old host as a fallback until the new one is verified. Talk to Web Roots about moving your website.

FAQ

Frequently Asked Questions

Will I lose my Google ranking if I change web hosts?

Not from the host change itself, as long as you keep the same domain, the same URLs, and the same content. Google indexes your web addresses, not your server, so moving the files to a new host is invisible to it. Rankings drop only when a migration causes downtime, changes your URLs without redirects, breaks HTTPS, or carries over a crawler block from the staging copy.

How do I move my website to a new host without downtime?

Build a complete, working copy of the site on the new host and test it there privately first. Lower your DNS TTL a day ahead so the change propagates quickly, then point your domain at the new server while the old one keeps running. Because both servers serve the same site during the transition, visitors always reach a working page.

Do I need to tell Google I changed hosting?

No. Changing hosts while keeping the same domain does not require the Change of Address tool in Search Console, which is only for moving to a different domain. After the switch it is worth using URL Inspection on a few key pages to confirm they are still crawlable and indexed, but there is no host change to report.

What is the most common mistake when switching web hosts?

Cancelling or wiping the old host before the new one is confirmed working. The old server is your fallback and your safety net. Until DNS has fully propagated, some visitors are still being sent to it, so it needs to keep answering for several days after you point the domain at the new host.

How long does a website migration take?

The build and testing on the new server is the bulk of the work and varies with the size of the site. The final DNS switch itself is quick if you lowered the TTL beforehand, often minutes rather than hours. Full DNS propagation across every network can take up to 24 to 48 hours, which is why the old host stays live throughout.