How to leave a host without losing anything
People leave hosts for all sorts of reasons: prices went up, the server got slow, support stopped answering, or you need a different country. During a move you can lose data, emails, your domain and the money for months already paid. Here is an order of steps in which the old and new servers run side by side for a while, so that switching off the old one breaks nothing.
The main rule of any move is not to switch off the old setup until the new one has been checked. So the plan goes like this: first an inventory and copies, then the new server and testing, then the DNS switch, and only after a quiet period cancelling the old service and transferring the domain.
Inventory: what you have at the host
A host usually holds more of your things than it seems. Before the move, make a list:
- websites and applications, their files, databases and cron jobs;
- mailboxes, forwarding rules and autoresponders, if your mail is with the same host;
- the DNS zone: every record, including TXT records for verifying services, SPF, DKIM and subdomain records;
- domains registered through the host and their renewal dates;
- SSL certificates, if they are paid and were issued through the host;
- additional IP addresses, backups, storage and add-on services that renew automatically.
Export the DNS zone in full, from the panel or by hand into a spreadsheet. A lost TXT record that verified your domain with a mail or payment service tends to surface a week later, when something stops working.
Exporting data and backups
Make a fresh full copy with your own tools rather than relying on the host's backups: once the account is closed, they will no longer be available. Copy files with rsync or as an archive, databases as a dump (mysqldump, pg_dump) and mail over IMAP. Keep the copy outside both the old and the new server, for example in object storage; the options are covered in the article File storage on a VPS: disks and object storage, and checking copies in the article VPS backups: strategies and tools.
If you might lose access to the panel, for example because the host is shutting down or the account has been suspended for non-payment, export the data first, before any negotiations. Test the copy by restoring it on the new server: an archive that will not open is usually discovered only after the old server has been switched off.
Running both servers in parallel
Rent the new server in advance, deploy the site on it from the copy and test it at a temporary address or through the hosts file on your own computer. Meanwhile the old server keeps running. Allow at least a week for the parallel period: during that time SSL certificates get issued, and forgotten cron jobs and integrations show up.
Paying for two servers costs less if you can first take the new one for a short term. According to the accsly.io catalog as of November 2026, 173 hosts explicitly state hourly billing, and 818 of 2,248 VPS hosts, or 36%, offer a money-back guarantee, most often for 30 days. Collections: VPS with hourly billing and VPS with a money-back guarantee. The step-by-step process of moving a site is described in the article How to move a website from shared hosting to a VPS.
Lowering the TTL and switching DNS
Every DNS record has a TTL, the time in seconds for which ISP resolvers may cache its value, as defined back in RFC 1035. If the TTL is a day, some visitors will keep reaching the old server for a whole day after the IP address changes.
- One or two periods of the old TTL before the move, lower the TTL of the A, AAAA and MX records to 300 seconds. If the TTL was 86,400 seconds, do this at least two days ahead.
- Right before the switch, synchronise the data once more: files uploaded by users and new orders in the database. Shops turn on maintenance mode for this time.
- Change the addresses in the records. Thanks to the short TTL, most visitors will reach the new server within a few minutes.
- After a few quiet days, set the TTL back to an hour or a day.
If the DNS zone is served by the old host's name servers, first move it to your registrar or to a separate DNS service with the same records, and only then change the domain's name servers. How records and name servers work is explained in the article Domains and DNS for a server owner.
Transferring the domain to another registrar
You can keep the domain at its current registrar and change only the DNS; that is the simplest path. A transfer makes sense if the registrar is the very host you are leaving. For gTLD domains (.com, .net, .org and others), the rules are set by the ICANN Transfer Policy:
- at the owner's request, the registrar must provide the transfer code (AuthInfo, also called the EPP code) and remove the transfer prohibition (ClientTransferProhibited, which panels call the registrar lock) within 5 calendar days;
- a transfer may be denied within the first 60 days after the domain was registered or after a previous transfer, and after a change of registrant the registrar applies a 60-day lock, which the owner can opt out of in advance;
- the code is entered at the new registrar, and you pay for a one-year renewal; unless the old registrar objects, the registry completes the transfer within 5 days.
Country-code domains (.de, .uk, .ru and others) follow the rules of their own registry, and the procedure for changing registrar differs from the ICANN one; for .ru, for example, the rules are published on the registry's documents page. Do not transfer the domain in the same days as the server, and do not start a transfer a few days before the registration expires: if something goes wrong, the domain must not end up expired.
Moving mail
Mail is the most fragile part of a move. Create the mailboxes at the new mail provider or on your own server, then copy the messages from the old mailboxes over IMAP, for example with imapsync, which transfers folders and, when run again, fetches only what is new. Then change the MX, SPF and DKIM records to the new provider's values, and a day later run the synchronisation again to pick up messages that arrived at the old server while DNS was updating. If you are setting up mail on your own VPS, the requirements are described in the article Mail server on a VPS: SPF, DKIM, DMARC.
Cancelling the service and getting a refund
Cancel the old service only when traffic and mail have stopped arriving at the old server and the copy has been checked. Before that, turn off auto-renewal and remove the saved card so you are not charged for the next period, and ask for written confirmation that the account is closed.
Whether you can get back the unused part of your payment depends on the host's terms: some hosts refund the unused months, sometimes minus the discount for a long term, while others refund only during the guarantee period. Beyond the terms, your rights depend on the law of the host's country and on the consumer protection rules where you live; consumers in the EU, for example, should check what the contract and the law of their country provide, and business customers usually rely on the contract alone. Guarantees are covered in more detail in the article Free trials and money-back guarantees, and contracts with a host abroad in the article Hosting provider jurisdiction: what it affects.