Home » Blog » Blog Posts on Website Design » How to Edit hosts file for Web Design Purposes | Windows / Mac

Website Transfer Problem

A common problem faced by designers or website owners when transfering a website from one server to another is, how to ensure that the transfered website is correctly setup before making changes to the DNS.

Most webhosts come with web transfer services where you just have to provide them with a Control Panel backup of your existing setup and they will restore it on the new server.

All this is good if no changes are needed. If changes are needed or the new webhost do not provide such a service, the only other way would be is to edit the hosts file in your computer.

Why edit the Hosts File?

When you type in the domain name of a website, that request is sent to a DNS server which checks the IP address and directs the request to the correct hosting company.

When you change web hosting companies, you also have to make changes to the DNS server to direct all requests to the new web hosting comany. You can only do this once the website is transfered and properly setup in the new web hosting company.

In order to do this, you would need to edit the Hosts File on your computer to point to the new web hosting company. What will happen now is when you type the domain name on the computer with the edited hosts file, you will be taken to the new web host, while the rest of the world will still be directed to the old web host.