Using your Hosts file to view websites
If you ever need to view a website that doesn’t have DNS pointed to it, you can test the website functionality without making any changes to the domain’s DNS records by using the host file. You need to know the new IP address of the web hosting server.
- Navigate to the hosts file
- %SystemRoot%\system32\drivers\etc\hosts
- Open the hosts file as administrator in a text editor
- we recommend Notepad++
- Add an entry with the IP address followed by the web address (example in image)
- Save as administrator
Now when you go to example.com, it will see the website at the IP address you chose in your hosts file, instead of the standard website the DNS is pointed at.