Change hosting without losing your website or email.
You've already decided to leave your hosting provider. What worries you is losing your email or your website disappearing from Google. Doing things in the right order avoids both.
The short answer
Changing hosting doesn't have to cost you a single email or a single visitor. What breaks things is the order. If the DNS is changed before everything is ready at the new host, email arrives in a mailbox you no longer check and the website shows an error while the change spreads across the internet. It's done the other way round. First everything is copied and tested on the new hosting, then the website's DNS is changed and email goes last. The old hosting isn't cancelled until you've checked that nothing reaches it any more.
What gets lost if it's done wrong
- Email during the DNS change. While the change reaches every server, some deliver email to the old hosting and others to the new one. If the old one has already been cancelled, those emails are lost and nobody is told.
- The old mailboxes. Emails stored on your hosting provider's server don't move by themselves. If you cancel the hosting without copying them, years of emails with customers and suppliers disappear.
- The forms. Many forms send their notifications from the server itself. On the new hosting they can stop arriving or start landing in spam without anyone noticing.
- The SSL certificate. The padlock doesn't travel with the website. If the new hosting doesn't have it in place when visitors arrive, the browser warns that the website isn't secure and lots of people leave.
- Your Google rankings. If the page addresses change when you move, for example from Wix to WordPress, every old address returns an error. The pages that showed up on Google lose their place unless someone redirects them.
- The domain. If the domain is with the same hosting provider and you cancel everything together, you can lose it. And your email goes with it.
The right order
- A full backup. Files, database, mailboxes and a list of the current DNS records, including the MX, SPF and DKIM records for email. Before touching anything.
- Lower the DNS TTL. To a few hours, at least a week before. That way, when the change is made, it reaches everyone sooner.
- Set up the website on the new hosting and test it. Without changing the DNS yet. The pages, the forms and the certificate are all tested.
- Create the mailboxes at the new provider and copy the email with IMAP. The two servers are connected and the folders of each mailbox are copied across. The old mailboxes keep working in the meantime.
- If the addresses change, the redirect map. A list of every old address and its new page, with a 301 redirect from one to the other. Never all of them to the home page.
- Change the website's DNS. The record that points to the server is moved to the new hosting.
- Change the MX last. Once the new mailboxes have the old email. Then whatever reached the old one in the meantime is copied again and SPF and DKIM are checked for the new server.
- Check afterwards. Send and receive email from outside, fill in the form, look at the padlock and open a few old addresses to see that they redirect. The old hosting isn't cancelled until it stops receiving traffic.
What Google and Microsoft say
Google has a guide for each case. If you're only changing hosting and the addresses stay the same, Changing your hosting recommends lowering the DNS TTL to a few hours at least a week before and not shutting down the old hosting until it stops receiving traffic. If the addresses change, How to move a site asks you to map the old URLs to the new ones, use permanent server-side redirects and keep them for as long as possible, generally at least a year. It also asks you not to send lots of old URLs to a single irrelevant destination, such as the home page. For email, Microsoft sets out the same order in What you need to know about migrating your IMAP mailboxes to Microsoft 365 or Office 365: first the mailboxes and the IMAP copy, then the change to the MX record. And it warns that IMAP doesn't migrate contacts, calendars or tasks.
What you can do yourself
- Find out where the domain is registered and where its DNS is managed. It isn't always your hosting provider.
- Write down everything that uses the domain: the website, each mailbox, the form, invoices and newsletters.
- Download a backup of the website from your hosting control panel and save the emails you can't afford to lose on your computer.
- If your email is already on Google Workspace or Microsoft 365, the mailboxes don't move. What you need to carry over exactly as they are is their DNS records, if the DNS is moving too.
- If your website is simple and the addresses don't change, many hosting providers will move it for you. Ask before you sign up.
- After the move, send yourself an email from an outside account, fill in your form and open the website on your phone using mobile data.
What not to do
- Don't cancel the old hosting on the same day. Part of your email is still arriving there while the change reaches everyone.
- Don't change the MX before copying the mailboxes. New email arrives in empty mailboxes and the old email stays where you no longer look.
- Don't redirect every old address to the home page. Google asks you to avoid it and may treat them as pages that no longer exist. Each address goes to the page that replaces it.
- Don't rebuild the website at the same time without a map. If you change platform as well as moving, the addresses change. Without the list of redirects, that's when rankings are lost.
- Don't forget the email your website sends. SPF has to include the new server or the form notifications end up in spam.
When it pays to have someone do it
If the website is simple, your email is already on Google Workspace or Microsoft 365 and the addresses don't change, you can probably do it yourself with help from the new hosting provider. It pays to have someone do it if your email is with the same hosting provider you're leaving, if there are several mailboxes with years of email, if the website has a shop or forms that can't fail or if you're rebuilding the website as part of the move. One wrong MX record leaves the whole business without email and forgotten redirects show up on Google weeks later.
How Vaseia does it
- Before touching anything, a full backup and a list of everything that uses the domain.
- The website set up and tested at the new host before the DNS is changed.
- The mailboxes copied with IMAP and the MX changed last, with a second copy of whatever reaches the old one during the switch.
- SPF, DKIM and DMARC checked for the new server and the certificate tested.
- If the addresses change, a map of 301 redirects, one address at a time. That's what was done for the website of a training academy in Madrid: 26 redirects without losing rankings.
- A check after the move. The old hosting is only cancelled once nothing reaches it any more.
If your emails were already landing in spam before the move, it's a good time to fix that: see why your emails are going to spam. And if you're leaving because your website is slow, measure what's slowing it down first: see what to do if your website is slow. Changing hosting won't fix huge images.
If you'd rather not wrestle with this
I'll do it for you, with a fixed price before I start. Tell me where your website, domain and email are now and where you want to move them. I'll tell you what needs moving and in what order. I work remotely, in English, with businesses outside Spain. I don't compete on price. I compete on quality and speed.
Questions
Can I change web hosting without losing my email?
Yes, if the email is moved in the right order. First the mailboxes are created at the new provider and the old emails are copied over with IMAP. The MX record, which says where email for your domain is delivered, is changed last. While that change reaches every server, email can arrive at either the old provider or the new one. That's why the old one is left running and, at the end, whatever arrived there is copied over again.
Can I move my website to a new host and keep the same domain?
Yes. The domain and the hosting are separate things, even if they're sometimes bought together. The domain stays the same. What changes are its DNS records, which are pointed at the new server. If the domain is registered with the same hosting provider you're leaving, find out where it is before you cancel. If you cancel it along with everything else, you can lose the domain and your email with it.
How do I migrate WordPress to a new host?
The files and the database are copied, uploaded to the new host and tested there before the DNS is changed. Some plugins package it all up, but afterwards you still need to check the forms, the links and the certificate. If the page addresses don't change, to Google it's a hosting change and you don't need the Change of Address tool in Search Console.
Will I lose my Google rankings if I change hosting?
If the page addresses stay the same, Google explains that it's normal for it to crawl less right after the move and then pick up again over the following days. If the addresses change, for example when moving from Wix to WordPress, every old address has to redirect with a 301 to its new page. Without those redirects, the pages that showed up on Google return errors and lose their place.
What is TTL and why should I lower it?
It's how long other servers keep your DNS records before asking for them again. If it's set to a day, a change can take a day to reach everyone. Google recommends lowering it to a few hours at least a week before the move, so the switch to the new server reaches everyone sooner.
Do contacts and calendars move too?
IMAP only copies emails and their folders. Microsoft says so in its guide: IMAP migration doesn't migrate contacts, calendar items or tasks. If you keep them on your hosting provider's server, they're exported separately and imported at the new provider.