Editing Windows host file
In Windows, the hosts file is located at C:\Windows\System32\drivers\etc\hosts.
You will need to edit the file with administrative privileges.
Click the Windows button and type ‘Notepad’ in the search box.
Right-click on ‘Notepad’ and then ‘Run as Administrator’.
Choose ‘Yes’ on the User Account Control pop-up.
In Notepad, choose ‘File’ then ‘Open’.
Click the address bar at the top and paste C:\Windows\System32\drivers\etc\hosts – then choose ‘Enter’.
Choose Notepad from the list and then OK.
Add/Edit the appropriate IP and hostname, select Save, and close the file.
Next, you will want to flush your DNS cache so you don’t have to log out and back in for the changes to take effect.
Lastly, open an elevated command prompt as above, and enter the following command:
admin@host:# ipconfig /flushdns