Home/Guide library/Moving to a new host
Hosting Guide

How to Move a Website to a New Host Without Downtime

The order of operations that keeps your site online, your email flowing and your search rankings intact while you change hosting company.

Published 29 November 2026 ยท 9 minute read

Why moves go wrong

Almost every painful migration has the same causes: the DNS was switched before the new server was tested, email was moved by accident along with the website, something that only existed on the old server was forgotten, or the old account was cancelled too early. The plan below is built to avoid each of those.

Before you start: make an inventory

Write down everything the site depends on. It takes twenty minutes and prevents most surprises.

The migration, step by step

  1. Lower the DNS TTL a day or two aheadSet the TTL on the records you will change (usually the A and AAAA records for the domain and www) to 300 seconds. Do this at least as long before the move as the current TTL, so the old, longer value has expired everywhere.
  2. Set up the new hosting to matchCreate the account, the databases and their users, and choose the same PHP version and extensions as the old server. Matching the environment first removes most "it worked on the old host" errors.
  3. Copy the files and the databaseCopy files over SFTP or rsync. Export each database with mysqldump or phpMyAdmin and import it on the new server. Update the site's configuration with the new database name, user and password.
  4. Test before anyone else sees itPoint your own computer at the new server by adding the domain and the new IP address to your hosts file, or use a temporary preview address. Click through every important page, submit the contact form, log in, and run a test checkout.
  5. Freeze changes and do a final syncFor a shop or any site that takes data, pause edits or orders briefly, copy the database one last time so nothing written in the meantime is lost, then switch.
  6. Change the DNSUpdate the A and AAAA records to the new server, or switch nameservers if the new host will run your DNS. Leave the MX records alone unless you are moving email too. With a low TTL most visitors arrive at the new server within minutes.
  7. Issue the SSL certificateFree certificates are usually validated over HTTP, which needs the domain pointing at the new server. Issue the certificate straight after the DNS change, or use DNS validation to issue it beforehand.
  8. Watch, then clean upFor the next few days check error logs, forms, payment notifications and email delivery. Keep the old hosting account for one to two weeks before cancelling it, and raise the TTL back to a normal value once everything is settled.

Moving email safely

If your email lives with your old web host, treat it as a separate move. Create the same mailboxes on the new service, copy existing messages across with an IMAP migration tool, then change the MX records. Update the SPF record and set up DKIM for the new mail service, or messages may land in spam. Doing email on a different day from the website halves the number of things that can go wrong at once.

Common mistakes to avoid

Moving to Agrin Host

If you are moving to us, tell us what you are moving before you start. We will confirm the matching PHP version, help you test on the new server before any DNS change, and agree a time to switch. Our hosting plans list what each plan includes, and the shared hosting vs VPS guide helps you pick the right size.

Frequently asked questions

How long does it take to move a website to a new host?

The copying usually takes an hour or two for a typical small site. The full move takes a few days because you lower the DNS TTL a day or two beforehand and keep the old host running for a week or two afterwards while the change spreads.

Will moving hosts affect my Google rankings?

Not if the URLs, content and redirects stay the same and the site stays online. Search engines see a new server address, not a new website. Problems come from downtime, broken redirects or a changed domain, which a careful move avoids.

Do I have to move my email at the same time?

No. Your website and email are separate DNS records. You can move the site and leave email where it is by leaving the MX records unchanged, then move email later as its own project.

What is DNS propagation?

Resolvers around the internet cache your DNS records for as long as the TTL allows. After you change a record, some visitors keep reaching the old server until their cached copy expires. Lowering the TTL in advance shortens that window to minutes.

Planning a move?

Tell us where your site is now and what it runs. We will tell you what the move involves before you commit.

Talk to Us About Moving โ†’