How to Move Hosting Without Losing Email
Short answer: set everything up on the new host first — website, database and every mailbox — test it, and change the DNS records last. Then copy the email again to catch messages that arrived during the switch, and keep the old hosting running until nothing reaches it any more.
Email is lost in a move for one reason: the old mailboxes are switched off before every message has been copied and before the domain's mail records point at the new server. Doing the steps in order avoids that.
1. Make a list of what you are moving
- Websites, databases and any scheduled tasks (cron jobs).
- Every mailbox, forwarder and alias, including ones only one person uses.
- How people read mail: IMAP keeps messages on the server; POP3 may have downloaded them to one computer only.
- Every DNS record for the domain, including the records for mail authentication (SPF, DKIM, DMARC). Take a screenshot or export.
- Where the DNS is hosted: at the registrar, at the old host, or at a separate DNS service. That is where you will make the change.
2. Lower the DNS TTL a day before
The TTL tells other servers how long to cache a record. Lower it on the website (A) and mail (MX) records about 24 hours before the move, so the switch takes effect faster when you make it.
3. Build the new account
- Create the same mailboxes on the new host. Same addresses; new passwords are fine if you tell people.
- Copy the website files and import the database.
- Install an SSL certificate if the new host can issue it before DNS changes, or plan for it right after.
4. Test before anyone sees it
Open the new site without changing public DNS: many hosts give a temporary address, or you can edit your computer's hosts file to point the domain at the new server. Check pages, forms, logins and checkout. Send a test email from each new mailbox.
5. Copy the email
Copy existing messages from each old mailbox to the new one with an IMAP migration tool (many control panels and mail clients include one). Do the large mailboxes first.
6. Switch DNS
Change the website (A) record and the mail (MX) records — or the nameservers, if the new host also runs your DNS. Update SPF and DKIM to the new host's values. From this point, new mail starts arriving at the new server as the change spreads.
7. Copy the email again
For a day or two, some senders still deliver to the old server. Run the IMAP copy again so those messages end up in the new mailboxes.
8. Keep the old hosting for a while
Do not cancel the old account until mail stops arriving there and you have confirmed everything is on the new server. A week or two is a common safety margin.
Pitfalls
- Cancelling the old host too early. The most common cause of lost email.
- Forgetting the MX records. The website moves but mail still goes to the old server.
- POP3 users. Messages that exist only on one person's computer will not be in an IMAP copy. Ask them to upload or keep them.
- Editing DNS in the wrong place. Changes at the old host do nothing if the nameservers point somewhere else.
- Expecting zero downtime. Careful moves keep disruption small, but DNS changes spread at different speeds for different visitors. Plan the switch for a quiet time.
Moving to SAFI
On shared hosting, each plan includes cPanel and a set number of mailboxes. If you want help with a move, send support the list from step 1 before you order, and agree the scope, any charge and the date in writing.
Moving WordPress to another host: a reversible sequence
- Record the current WordPress/PHP versions, plugins, file and database sizes. Agree the target account's limits and migration scope before payment.
- Take independent copies of files and the database. Check that you can restore them; a backup icon alone is not a restore test.
- Rebuild on the destination and test with a hosts-file override or an agreed staging URL. Check admin login, permalinks, media, forms and test transactions using the application's test mode.
- For a shop or membership site, agree a short content/order freeze and final database copy. Avoid accepting new orders into two separate databases.
- Switch only the required DNS records. If email stays with the existing provider, retain its MX, SPF, DKIM and DMARC records rather than replacing all DNS blindly.
- Monitor the new site, complete any final mail sync, and keep the old account and rollback copies until the migration is accepted.
Domain transfer, website migration and mailbox migration are separate jobs. A hosting move does not itself require changing the registrar. Share access through an agreed secure channel after scope approval, not in an initial enquiry. Compare shared and managed WordPress responsibilities if you need ongoing maintenance after the move.
About the Author
SAFI
SAFI.pk sells web hosting and domains in Pakistan. This guide describes the general order of a website and email move; agree the exact scope of any move with support before you order.
