Moving a site to a new host
Move the files first and the name last. Visitors should keep reaching the old site until the new one answers correctly. Then point the domain, and then watch it.
Write down what you have
- The domain registrar: the company you pay for the name. It may not be the host.
- Where DNS is edited. That is often the registrar, sometimes the host, sometimes a third company. The name servers (NS records) tell you who answers.
- The files, the database if there is one, and the email. Email often breaks in a move because nobody copied the MX records.
- The certificate. Many hosts issue a new one after the name points at them. Until then, test on the temporary address the new host gives you.
Copy the site while the old one still serves visitors
- On WordPress, use the host's migrator if they offer one, or export the files and the database. SiteGround's page says the first migration is free. DreamHost's page describes a WordPress plugin and a manual path for other sites. Read the host you picked.
- On a static site, upload the same files, or connect the same repository.
- On a virtual server, install the system on the new machine and copy the app and the data. Do not cancel the old server yet.
- Open the new site on the temporary address. Click the pages a customer uses: home, contact, sign-in, checkout if you have one.
Lower the old DNS timer, then switch
A DNS record has a time-to-live, the number of seconds a resolver may remember it. If that number is large, some visitors will keep the old address for hours after you change it. A day or two before the move, set a shorter value if you can, such as 300 seconds. The DNS lookup on this site shows the value a public resolver has.
When the new site works, change the A or AAAA record, or the CNAME, to the new host. Change only the website records. Leave MX and the mail-related TXT records alone unless you meant to move email too.
Wait. Some resolvers will still show the old address until the previous time-to-live runs out. Check from the DNS lookup, and ask one person on another network to open the site.
Check the certificate and the status line
After the name points at the new host, open the certificate check. Read the not-after date and the names. A certificate that does not list your name, or that is still the old host's certificate, is a warning visitors will see.
Open the HTTP check on the public address. You want a normal answer, or a redirect you intended, not a 500. The status code guide is the list of numbers.
Watch it, then cancel the old host
- Add an uptime monitor the same day, even a free one. The new host's own status page tells you about their outage. It does not tell you that your site is the thing that is down. The free uptime guide is the short setup.
- Keep the old host for a few days, until you have seen the new site answer and you have a copy of the files stored somewhere that is not only the new server.
- Then cancel. A virtual server keeps billing until you delete it. Hetzner's docs say a powered-off server is still billed. Read the host you are leaving before you assume 'off' means 'free'.
Checks to use during the move
- DNS lookupSee the address and other DNS records a public resolver returns for a domain.
- Certificate checkRead the TLS certificate a public lookup service sees on port 443.
- HTTP status and headersSee the status line and headers a public lookup returns, and whether your own browser can open the address.
- Uptime and downtime calculatorTurn a percentage such as 99.9% into hours and minutes, or turn minutes of downtime back into a percentage.
Related guides
- Pointing a domain at a new host
- How to choose hosting for a small business site
- How to set up free uptime monitoring
- What to check when a website is down
This is general information, not professional advice. Check the provider’s own documentation before you change a live site.