Migrating email to new hosting: complete guide
Want to migrate email to new hosting? Moving email accounts during a hosting switch is an important part of the migration. In this article we explain how to migrate email to new hosting successfully without data loss.
Switching to a new hosting provider? Then it's crucial to carefully carry out your email migration to new hosting. A mistake in this process can lead to lost emails, missed messages, or prolonged downtime. In this comprehensive article we explain step by step how to migrate your email to new hosting without losing a single message.
Why migrate email to new hosting?
There are various reasons why you might want to move your email to a new hosting provider:
- Better performance – Faster mail servers and better uptime
- More storage space – Larger mailboxes for your email addresses
- Better spam filtering – More advanced spam filters and malware protection
- Hosting consolidation – Website and email with the same provider
- Cost savings – A better rate with a different provider
- Better support – Faster and more knowledgeable help with issues
Preparation: email migration to hosting checklist
Good preparation is half the work. Go through this checklist before you start the migration:
| Step | Action | Status |
|---|---|---|
| 1 | Take stock of all email accounts | Make a list of addresses, passwords, and aliases |
| 2 | Note current server settings | IMAP/POP3/SMTP servers, ports, and SSL |
| 3 | Check storage usage | How many GB in use per mailbox |
| 4 | Document forwarding rules | Aliases, forwards, and autoresponders |
| 5 | Note DNS records | MX, SPF, DKIM, and DMARC records |
| 6 | Plan the timing | Choose a quiet moment, preferably on a weekend |
| 7 | Inform users | Warn colleagues about possible brief interruptions |
Step 1: Create email accounts at the new hosting
Start by creating all email accounts at your new hosting provider. Make sure you use the same email addresses and set strong passwords.
- Log in to your new hosting's control panel (e.g. DirectAdmin)
- Go to email management
- Create each email account with sufficient storage space
- Set up the same aliases and forwarding rules
- Configure autoresponders if you had any
Step 2: Copy emails from old to new
This is the critical step. There are several methods to transfer your emails:
Method A: Via an email client (recommended)
The simplest method for most users is to add both accounts to an email client such as Thunderbird or Outlook:
- Add the old email account via IMAP
- Add the new email account via IMAP
- Wait until both accounts are fully synchronized
- Select all messages in a folder of the old account
- Drag or copy them to the corresponding folder in the new account
- Repeat this for every folder: Inbox, Sent, Drafts, etc.
Method B: Via imapsync (technical)
For larger migrations or multiple accounts, imapsync is a powerful command-line tool that automatically copies all folders and emails from one server to another:
- Install imapsync on your computer or server
- Run the command with the details of both accounts
- imapsync copies all folders, emails, and flags (read, unread, etc.)
- You can run it multiple times for incremental synchronization
Method C: Backup and restore
Some hosting control panels offer the option to create and restore a full mailbox backup. This is the fastest method if both providers use the same control panel (e.g. DirectAdmin to DirectAdmin).
Step 3: Update DNS records for email migration to hosting
After copying your emails it's time to update the DNS records so new emails arrive at your new server:
Changing MX records
The MX record (Mail Exchange) tells the internet which server should receive your email. Change this to your new provider's mail server:
| Record | Type | Value (old) | Value (new) |
|---|---|---|---|
| @ | MX | mail.oldprovider.com (prio 10) | mail.newprovider.com (prio 10) |
Updating the SPF record
Update your SPF record so the new mail server is allowed to send on behalf of your domain. An incorrect SPF record can cause your outgoing emails to be marked as spam.
Setting up the DKIM record
Request the DKIM key from your new provider and add the DKIM record to your DNS. This is essential for email verification and prevents your messages from ending up in recipients' spam folders.
Step 4: Update email clients
After the DNS change, all devices using email need to be updated with the new server settings:
- Desktop – Update the server details in Outlook, Thunderbird, or Apple Mail
- Smartphone – Adjust the settings on your iPhone or Android
- Tablet – Don't forget your iPad or Android tablet either
- Webmail – Use your new provider's webmail from now on
Step 5: Testing and verification
After the migration it's important to test thoroughly:
- Sending – Send a test email to an external address (e.g. Gmail)
- Receiving – Ask someone to send you a test email
- Folders – Check that all folders and emails have been transferred correctly
- SPF/DKIM – Check the email headers of your test message for correct authentication
- Spam filter – Check that the spam filter is working correctly with your new provider
Common problems when migrating email to hosting
Emails don't arrive after the migration
- DNS propagation can take up to 48 hours - wait and try again
- Check whether the MX records are set correctly
- Verify that the email account exists with the new provider
Outgoing mail ends up in spam
- Check the SPF record - does it point to the new mail server?
- Is DKIM set up correctly at the new provider?
- Consider adding a DMARC record
Missing emails after the migration
- Check whether all folders were copied (not just the Inbox)
- With POP3, emails may exist only locally on the old device
- Run imapsync or the client method again for missed messages
Tips for a smooth email migration
- Lower the DNS TTL to 300 seconds a day in advance
- Keep the old mailbox active until you're sure everything works (at least 2 weeks)
- Plan the migration outside office hours to limit the impact on your daily work
- Make backups of all your emails before starting the migration
- Document everything so you can repeat the steps if something goes wrong
Migrating email to new hosting doesn't have to be complicated if you approach it step by step. Prepare with a good inventory, copy your emails via IMAP or imapsync, and carefully update your DNS records. Test thoroughly after the migration and keep the old mailbox active for a while as a safety net.
Looking for a reliable hosting provider for your email? At Theory7 you get fast mail servers, extensive spam filtering, and personal help migrating your email addresses. Get in touch and we'll gladly help you with the switch.
Email migration to hosting: specific scenarios
Depending on your current and new hosting setup, the migration can look different. Here we cover the most common scenarios.
From shared hosting to shared hosting
This is the most common scenario. You move from one web hosting provider to another. Use the IMAP client method or imapsync to copy your emails. Both providers likely use DirectAdmin or cPanel, which makes the process relatively straightforward.
From shared hosting to VPS
When switching to a VPS, you have more control but also more responsibility. You have to configure the mail server yourself (Exim, Postfix, or Dovecot) unless you choose a managed VPS. Email migration works the same way, but the DNS configuration requires more attention.
From external mail to hosting mail
If you're switching from an external email service such as Google Workspace or Microsoft 365 to email at your hosting provider, you need to account for a few extra steps. The MX records need to be changed from the external service to your hosting server. Also check whether all the functionality you were used to, such as calendar and contacts, is also available at your new provider.
From hosting mail to external mail
The reverse scenario is also possible. If you want to move your email to Google Workspace or Microsoft 365, use the migration tools these services offer. Google offers a Data Migration Service and Microsoft offers an IMAP migration tool. These tools can automatically fetch all emails from your old server.
Advanced tips for migrating email to hosting
Understanding DNS propagation
After changing your MX records, it takes some time before all DNS servers worldwide have the new information. This is called DNS propagation and can take up to 48 hours, although it's usually complete within a few hours. During this period some emails may still be sent to your old server while others already go to your new server.
Strategy for zero-downtime migration
To avoid missing a single message during the migration, you can apply the following strategy:
- Create the email accounts at your new provider but don't change the DNS yet
- Set up a catch-all or forwarding at your new provider so all incoming mail is retained
- Copy all existing emails via IMAP or imapsync
- Change the MX records and lower the TTL beforehand
- Keep both servers active for 48 hours after the DNS change
- Run imapsync again to synchronize the last emails that still arrived at the old server
- Only switch off the old mail server once you're sure all DNS servers have been updated
Mailbox size and limits
Before migrating, check whether your new hosting provider offers enough storage for all your mailboxes. If your current mailboxes are large due to years of emails with attachments, it may be wise to clean up first. Remove old emails with large attachments and archive messages you don't need daily but want to keep.
Frequently asked questions about migrating email
How long does an email migration take?
The duration depends on the amount of email and the speed of both servers. For an average mailbox with a few thousand messages, copying via IMAP usually takes 30 minutes to a few hours. Larger mailboxes with tens of thousands of messages can take several hours to a day.
Can I migrate email without technical knowledge?
The IMAP client method via Thunderbird or Outlook requires little technical knowledge. You only need to add two accounts and drag files. Many hosting providers also offer help with the migration as part of their service.
What if I lose messages during the migration?
By keeping the old mail server active until at least two weeks after the migration, you minimize the risk of lost messages. If you still miss messages, you can run the synchronization again. It's also wise to make a full backup of all mailboxes beforehand.
Email migration to hosting: frequently asked questions
The same questions often come up around email migration to hosting. Migrating email to hosting can range from simple to complex, depending on the number of accounts. An important point of attention when migrating email to hosting is the timing of the DNS change. Many customers wonder about email migration to hosting whether they'll lose emails. With the right preparation, migrating email to hosting goes smoothly. Our support team is happy to help you with the email migration to hosting process.
Email migration to hosting: solving common problems
During the email migration to hosting process you may run into various problems. The most common problem is that emails temporarily don't arrive during DNS propagation. This happens because some mail servers still point to your old hosting while others already send to the new server. The solution is to keep your old mail server active for at least 48 hours after the migration, so no message is lost.
Another common problem is exceeding the mailbox limit on the new server. Check beforehand how much storage each mailbox needs and make sure your new hosting package offers enough space. Use the IMAP protocol for the migration, as this synchronizes your complete folder structure including sent items, drafts, and custom folders. POP3 only copies the inbox and is therefore unsuitable for a complete migration.
Authentication problems also occur regularly. After the migration, all email clients need to be reconfigured with the new server details. Make sure you create an overview of all devices that have access to each mailbox: desktops, laptops, phones, and tablets. Check our guide for setting up email on iPhone and setting up email on Android.
Step-by-step plan for a downtime-free email migration
A professional email migration doesn't have to cause downtime. With the right step-by-step plan you can make the transition run smoothly without users noticing anything. Start the preparations two weeks before the migration. Take stock of all email addresses, mailing lists, aliases, and forwards that need to be migrated.
- Week 1 - Preparation: Export all mailboxes to a local backup. Note the current DNS settings including MX, SPF, and DKIM records.
- Week 1 - Setup: Create all mailboxes on the new server with the same passwords. Configure SPF, DKIM, and DMARC on the new server.
- Week 2 - Synchronization: Use imapsync or a similar tool to copy all emails to the new server while the old server is still active.
- Week 2 - DNS switch: Lower the TTL of your MX records to 300 seconds. Change the MX records to the new server and wait for propagation.
- After migration: Monitor both servers for 48 hours. Run one last synchronization to copy messages that arrived at the old server during propagation.
With this approach you receive email on both servers during the transition period, so no messages get lost.
Email migration to hosting: optimizing after the migration
After a successful migration it's important to optimize your email environment. Start by setting up automatic backups for all mailboxes. Daily backups protect you against data loss due to hardware problems or accidentally deleted messages. Most hosting providers offer this by default, but check that it's actually active.
Also optimize your spam filtering on the new server. Check whether spam filters are configured correctly and adjust the sensitivity based on your needs. Filters that are too strict block legitimate messages, while filters that are too loose let spam through. Test the filters by sending a few test messages from external addresses.
Finally, document all new server settings in a central location. Note the incoming and outgoing mail server names, port numbers, SSL/TLS settings, and any specific configurations. This documentation is invaluable if you need to migrate again in the future or if an employee needs to set up a new device. Also store the login credentials for your hosting panel in a secure location.
Tools and software for email migration
The right tools make the difference in a successful email migration to hosting operation. ImapSync is one of the most powerful open-source tools for email migration. It synchronizes mailboxes between two IMAP servers while preserving folder structure, message status, and metadata. ImapSync also supports incremental synchronization, so you can run it multiple times to copy new messages.
For larger migrations with dozens or hundreds of mailboxes, commercial tools such as MigrationWiz and CloudMigrator are suitable. These tools offer a graphical interface, automated batch migration, and detailed reporting. They also support migration to and from cloud platforms like Microsoft 365 and Google Workspace. Costs are per mailbox and range from €5 to €15 per account.
Don't forget to have the right DNS tools on hand. MXToolbox is invaluable for checking MX records, SPF configuration, and DKIM verification. Use this tool after the migration to check that all DNS records are set correctly. An incorrect SPF or DKIM configuration causes your emails to end up in spam folders. Read our guide on migrating email to a new provider for more tips.
Summary: successful email migration in five points
A successful email migration to new hosting comes down to five core points. First: prepare the migration thoroughly by taking stock of all mailboxes, aliases, and forwards. Second: use professional migration tools and the IMAP protocol for full synchronization. Third: plan the DNS change carefully and keep both servers active during the transition period. Fourth: after the migration, test all mail clients and configurations on all devices. Fifth: optimize the new environment with good spam filters, automatic backups, and updated security settings.
Check out our web hosting offer at Theory7 for reliable and fast hosting.