Account

Guides

How to move a site to new hosting without downtime

A site can move to another host without visitors noticing if the steps go in the right order: lower the TTL ahead of time, bring up a copy on the new server before you touch DNS, and only then switch the records. You need this when you change hosts or upgrade to a more powerful plan.

Check your site

>
  1. Lower the TTL in advance

    A day before the move, set the TTL of your A and NS records in the current DNS zone to 300 seconds. Then, after an A record switch, the new address reaches everyone in about 5 minutes instead of an hour or a day. A change of NS takes longer whatever you set here, because the registry of the domain zone keeps its own copy of the NS records, often for a day or two.

  2. Bring the site up on the new server

    Create the account and upload the files and databases to the new host. On cPanel the easiest ways are the Backup Wizard or a full account transfer in WHM. Leave DNS as it is for now, so the old site keeps serving visitors.

  3. Test the copy before changing DNS

    Add the new IP to the hosts file on your own computer and open the site. Check that the pages, forms and admin panel work and that they come from the new server, not the old one.

  4. Issue SSL on the new host

    AutoSSL on the new server usually can issue the certificate only once the domain points there, so run it right after the switch and check the padlock. Until the certificate is issued, visitors who already reach the new server get a not secure warning.

  5. Switch the NS or the A record

    If DNS moves too, change the NS at your registrar to the new ones. If the zone stays with the old provider, change only the A record to the new IP. Do it during your lowest-traffic hours.

  6. Keep the old server for a few days

    Providers do not all refresh DNS at once, so keep the old account for 3 to 5 days before deleting it. Some visitors will still reach the old IP for a while.

  7. Restore the TTL and check mail

    Once all traffic clearly goes to the new server, raise the TTL back to 3600. Check the MX records separately so that mail does not stay behind on the old host.

How to verify the result

Check the domain with the SpoofLens DNS checker: the A record (or NS) should point to the new server, and the MX records should lead to the right mail server.

Tip: Do not change the NS or the IP until the copy on the new server fully works, or visitors will land on a broken page.

Related guides