Apollo Editor
Windows 10 & 11 Buy now · $69.95
Publishing

How to Move a Static Website to a New Web Host Without Downtime

Move a static HTML website to a new web host step by step: copy the files, test on the new server, switch DNS and check email, with no downtime.

Updated 6 minute read The Apollo Editor team

To move a static website to a new host, make a full copy of your site files, set up the new hosting account, upload the files there and test them before anything changes for visitors. Then point your domain at the new host by updating its DNS records, wait for the change to spread, and only cancel the old hosting once the site and your email are working from the new one. Because both hosts serve the same site during the switch, visitors see no downtime.

This guide covers what to check before you start, copying and testing the site, switching DNS safely, keeping email working, and tidying up afterwards.

Before you start: what you need to know

Gather a few facts first. They decide how smooth the move will be.

  • Where your domain is registered (the registrar) and where its DNS is managed. These may be your old host, a separate registrar or a DNS service. You change DNS records wherever they are managed, and you may not need to move the domain at all.
  • Login details for the old host, the registrar and the new host.
  • Whether your email is hosted with the old web host. If your addresses use your domain and the mailboxes are on the old hosting account, you need a plan for email too (see below).
  • Anything besides HTML files, such as a contact form script provided by the old host, password-protected folders or redirect rules in a .htaccess file. These may need setting up again on the new host.

Do not cancel your old hosting until the very end. Keeping it running during the switch is what prevents downtime and lost email.

Step 1: make a complete copy of your site

If you already keep the master copy of your site on your PC, make sure it matches what is live. If not, download everything from the old host using SFTP, FTP or the host's file manager. Download the whole public folder (often public_html, www or htdocs), including:

  • All HTML, CSS, JavaScript, image and download files.
  • Hidden files such as .htaccess. Many FTP programs hide files starting with a dot unless you turn on an option to show them.
  • robots.txt, sitemap.xml and any verification files for search tools.
  • Any form scripts and their settings.

Keep this copy as a backup, separate from any folder you edit.

Step 2: set up the new host and upload

  1. Sign up for the new hosting and add your domain to the account. The host gives you its DNS details (name servers, or an IP address for the A record) and your upload login.
  2. Upload the site to the new host's public folder. Upload the contents of your site folder, so index.html sits directly in the public folder. If you need a refresher, see how to upload a website to your web host.
  3. Set up HTTPS. Many hosts can only issue a certificate after the domain points to them, so this may need finishing after the DNS switch.
  4. Recreate anything extra, such as form scripts, redirects and protected folders.

Test the new copy before switching

Your domain still points to the old host, so you need another way to see the new copy. Hosts usually offer one of these:

  • A temporary address or preview link from the new host.
  • Editing your PC's hosts file so your computer alone sends your domain to the new server's IP address. Remove the line when you have finished testing.

Click through every page, check images, styles and downloads, and test the contact form. Fix anything now, while visitors are still using the old site.

Step 3: switch DNS to the new host

Lower the TTL in advance

Every DNS record has a TTL (time to live), which tells other servers how long they may cache it. If your A record has a TTL of several hours, some visitors may keep going to the old host for that long after you change it.

To make the switch quicker, lower the TTL on the records you will change (for example to 300 seconds, which is five minutes) at least 24 hours before the move, and ideally 48. The lead time matters because the old, longer TTL is still cached until it runs out. If your DNS provider does not let you edit the TTL, skip this step and allow more time.

Change the records

There are two common ways to point a domain at a new host:

MethodWhat you changeThings to watch
Update recordsThe A record (and AAAA if used) for your domain and for www, at your current DNS providerLeaves all other records, including email, untouched. Usually the safest choice.
Change name serversThe name servers at your registrar, so the new host manages all DNSYou must recreate every record you need on the new host first, especially MX and any TXT records.

After the change, many visitors reach the new host within minutes or hours, but caches around the internet can keep the old answer for longer. Name server changes in particular can take up to 48 hours. Because both hosts serve the same site, it does not matter which one a visitor reaches during this time.

Avoid making edits to the site while DNS is switching. If you must, upload the change to both hosts.

Keep your email working

Email for your domain is directed by its MX records, which are separate from the records for your website. Before you switch anything, look up your current MX records in your DNS settings or with an online DNS lookup tool, and note where they point.

  • Email hosted elsewhere (with a separate email provider): keep the MX records and any related TXT records exactly as they are. If you change name servers, copy them to the new DNS first.
  • Email hosted with the old web host: decide whether to move mailboxes to the new host or to a separate email service. Create the mailboxes on the new service, update the MX records, and copy old messages across before the old account closes.

Send test messages to and from your addresses after the switch, from an outside account as well as your own.

Step 4: check, then close the old account

Once DNS has switched, check the live site properly:

  • Visit the site in a private window and on a phone using mobile data.
  • Check that HTTPS works with no certificate warnings, on both the plain domain and www.
  • Test the contact form and any redirects.
  • Check search tools such as Google Search Console for new errors over the following days.

Give it a few days, then raise the TTL back to its normal value, take a final backup from the old host and cancel the old account.

The easier way: publish to any host from Apollo Editor

When your site is plain HTML files on your PC, moving hosts is mostly a matter of uploading the same folder somewhere new. Apollo Editor is a Windows desktop HTML editor with optional publishing built in that makes that part simple.

  • Saved server profiles for FTP, FTPS and SFTP, so you can keep the old and new hosts side by side.
  • A connection test before you upload, with secure password storage.
  • Whole-site or selected-file uploads with progress, a publishing log and transfer verification.
  • Local folder and ZIP export for backups or hosts with their own upload tools.

There is no proprietary project format, so your site is never tied to one host or tool. Before moving, it is worth reading FTP vs SFTP vs FTPS and why website changes are not showing. You can also see all features.

Frequently asked questions

Will my website go offline when I change hosts?

Not if you keep the old hosting active until the domain's DNS has switched to the new host and you have checked the new copy.

How long does a DNS change take?

Often within a few hours, but it can take up to 48 hours depending on DNS caching. Lowering the TTL a day beforehand can speed it up.

Do I need to move my email too?

Only if your email is hosted with the old web host. Check your domain's MX records before switching so email keeps working.

Get three guides like this every month, plus software update notices.Subscribe →