In an ideal world, we would never have to worry about switching Web hosts – our site would remain happily housed at the current hosting provider’s facility with great load times, low costs, and 100 percent uptime.
Unfortunately, the world is not ideal and this perfect scenario rarely – if ever – exists.
How Web Host Switching Works?
Moving your website to a new host is a bit like moving to a new home in the physical world.
Switching Web Host vs Moving to A New House
Think about it – when you move, you first find a new location, then sign the paperwork, pack up all of your belongings, and physically move them to the new location. If you are moving a business, after doing all of this, you finish the move off by hanging a new sign over your door to advertise your new digs.
Moving your site is something similar – only a virtual version. You shop for a new location, sign the paperwork to rent hosting space (in the account type of your choice – shared server, dedicated server, VPS, etc.), package up your site to ensure that all of your assets come with you, transfer everything to your new Web host, and then point your domain to your new host by changing the DNS record; this final step is in essence hanging the sign over your new shop door.
Though it can be a process, it is completely attainable.
A Step-by-Step Walk Through of the Switch
Switching your host requires completing a series of actions in a specific order to ensure that everything transfers over properly. To move your website to a new host, complete the following steps:
1. Purchase a new web host
There are a variety of hosting providers out there, each with its own configuration. You will need to evaluate which is right for you based on a number of factors, such as cost, required space, and server configuration, to name a few. When purchasing, consider registering your domain to a third party provider so that in case you do ever need to switch hosts again, your domain can come with you more easily and without any potential complications.
2. Back up all static files to the new web host
Static files comprise any type of file that does not frequently change, automatically or via a content editor – such as in-place graphics or copy. To back up a static website, simply copy the old file structures over to the new Web host.
For a blog or CMS website that runs on MySQL, install the Web apps to the new Web host as they are currently held in the existing site; then move the database file to the new Web host. In case your Web application provides easy transfer functionality (as is the case in WordPress’ import/ export function), transfer all of your data files directly to the new Web host. If your application does not offer any such functionality, you will need to tweak your MySQL and PHP configuration files accordingly.
3. Final Check Before Making the Move
Double check that everything is working properly on your website once you have loaded your files onto the new hosting configuration. Of note, you can preview your newly hosted website using a temporary URL in IP numbers. Some hosting companies will even provide a development staging platform so that you can easily and fluidly preview your site before taking it live in the new environment, allowing you to remedy any problems behind the scenes.
4. Switch Website DNS Records
Switch your website’s DNS record to the new web host’s servers at your registrar.
Your DNS record is more or less a list of instructions that specifies where to send the user; moving your DNS record to the new servers ensures that visitors will find your site as intended, rather than receiving an error or misdirect. This is a critical step – make sure you get the right DNS info from your new web host.
Dig Deeper: Guide on how to change domain name server at Godaddy, Name Cheap, and Domain.com.
5. Wait for the DNS change to propagate through the net
Once you have requested to move your DNS record, the switch can take anywhere between a few hours to a full day to take live. Once the switch go live, alert your former hosting company as to the cancellation.
Important Things to Watch For
Unfortunately, anytime that you change a configuration that affects your website, there are a series of problems that may occur. Keep your eyes out for the following as you prepare for and execute the switch, as well as for a period of time after switching hosts.
1. Downtime
In the Web world, any time that your site is not live is time that you are losing potential readers and potential business – after all, time is money. The goal in general – never mind when you are switching Web hosts – is to have zero downtime. To ensure that you do not experience downtime while making the switch, take the time upfront to ensure that everything is in place and working correctly at your new host before fully converting the files and making your site active in its new home.
Secondly, inform your loyal visitors and/or clients that you are switching hosts beforehand along with information about the hours that you are making the switch. Hopefully this will reduce the number of site visitors during the switch time period, eliminating strain on the system and also prevent any customer service headaches in case downtime does occur.
Finally, work closely with your new host throughout the transfer process. If you have any doubts or any questions, do not hesitate to ask your new host for assistance; not only does this speak to the importance of quality customer service, but some web hosts will help to transfer the FOC.
2. Change of site structures and missing links
As you transfer your site’s assets from the previous hosting environment, it is possible for assets, such as graphics to be misplaced or for certain files to be left behind. If this happens, your visitors are likely to experience 404 errors. Keep an eye on the 404 log during and after the switch – this log will alert you of any non-working links or assets that you need to remedy to restore your site to being fully functional.
Tip: You can make use of .htaccess redirectMatch and redirect to point old file locations to new ones.
Transferring a page to a new location
Redirect 301 /previous-page.html http://www.example.com/new-page.html
Transferring entire directory to a new location
redirectMatch 301 ^/category/?$ http://www.example.net/new-category/
3. Emails
Perhaps one of the most difficult parts of switching your web host is transferring your email. There are three common hosting scenarios that apply to email:
- Scenario #1: Email is currently hosted on a domain registrar (such as GoDaddy)
This is the easiest scenario from which to move; all you need to do is to switch the A (or @) record and point it to the new host’s IP address. - Scenario #2: Email accounts are hosted with a third party (such as Microsoft 365)
Ensure that your MX records, along with any other records that your email service provider needs, are updated in your DNS. - Scenario #3: Email accounts are hosted with the respective web host
When you make the switch to the new host, simply recreate the existing email account on the new Web host and configure the new email agent.
Dig Deeper: To learn more, read What to do when your web host does not provide email hosting service.
Bottom Line: Get Rid of Your Lousy Host, Today!
Making the switch to a new web host can be a stressful time, but it’s the best thing to do when you are stuck with a bad web host. If you’re already running a website, you shouldn’t have any trouble with the switch – after all, it’s just the usual backup/download/upload stuffs that you are already doing daily.
If you have any additional tips for making the switch that I have not already mentioned above – or if you have any questions – please let me know!