Editing the hosts file

If you were changing your hosting environment from shared servers to dedicated servers, and your hosts asked you to edit the hosts file on your pc, is that normal?

Temporarily changing the hosts file on your computer provides you with a way to access both the old server and the new server while performing the move. You can remove the entries again after the move is complete.

For example if your site is being moved from 200.12.15.25 to 200.12.15.60 you could enter the following two lines in the hosts file.

www.example.com 200.12.15.25
example.com 200.12.15.60

then when you enter the address with the www you access the old server and without the www you access the new server - while everyone else accesses whichever of the two servers the nameserver they access points to.

Many thanks Stephen, understood now.

This is helpful in the Migration of the Websites where you can access the Old Website via the Hosts file provided you have changed the NS of the Domain Name to the New Server.