Changing of Hosts file to test website before real migration

Take note, you need to have administrative rights before you can edit the hosts file

Usually when you do website migration, you want to test the website in the new server before you point your live traffic over. There is a few methods is doing so but changing your host file will be the best option as it will allows you to do REAL testing

1) You need to run Notepad as a administrative rights

2) After which, go to “File” -> “Open” and key in “%systemroot%\system32\drivers\etc\hosts” (without quotes) under the “File Name”

3) You will need to add an entry like this at the end of the file.

You need to replace “x.x.x.x” with your new server IP address and “mydomain.com” with your real domain name that you are testing on

4) You will then need to close your browser, and flush the dns cache on your computer.

5) Now, try to ping your “mydomain.com” and you should see the new IP address

Hope this helps!