How To Move Website To Another Server Without Any Downtime (Editing Hosts file in Windows)
Here’s another useful advice that can help you while you are moving your websites from one server to another.
You have been probably heard about the Hosts file in Windows that is created to control your DNS. If you are moving your website from one server to another and you are changing IP address of your website, than you would normally have to wait for a DNS refresh which could eventually last for a while and you’d have to bring your website offline for at least one day while you are doing the transfer job.
But, Hosts file allows you to move your website without any downtime of your website. In other words, you can upload and set up your website and to test it on a new server’s IP address (of course using a copy of your website from actual server), while your website is still working normally on old server and all visitors can see it. When you are done with transferring website you can go to your domain manager and setup DNS data to point a domain to a new server.
So, to change your domain’s IP address while you are transferring your site (so you can be the only one to see it), you need to go to: C:\windows\system32\drivers\etc\ and open Hosts file with Notepad and edit it something like this:
01.001.22.1.234 yourwebsite.com
01.001.22.1.234 www.yourwebsite.com
01.001.22.1.234 ftp.yourwebsite.com
That number (01.001.22.1.234) should be replaced with your new server’s IP address.
For Windows 7 users: Editing Hosts file is not same in Windows XP and in Windows 7. In Windows 7 you have to have an Administrator permission to edit Hosts file. So you can do that like this: Click to Start button, find a Notepad in a programs list, right-click on it and select option Run as Administrator, then open your Hosts file from C:\windows\system32\drivers\etc\ and edit it as you need. Be sure to choose “All files” option so you can browse Hosts file which is actually not a .txt file.
Tagged as DNS, hosts, moving, transfer, windows + Categorized as Blogging



