#Hosts file editor for mac how to#
More detailed instructions on how to locate and edit the hosts file on different operating systems are available below: Windows 8 and 10 Once you do that you may need to clear your web browser’s cache, afterward, if you try to reach your domain in a browser it should take you to the site hosted on the server with IP 1.2.3.4. This will “tell” your computer to resolve to 1.2.3.4. In this case, you would need to open up the hosts file with a text editor and append the following line: 1.2.3.4 (Note: Make sure that you don’t have any # signs in front of the IP address as they will deactivate this entry) Let’s say that you wish to resolve to the IP address 1.2.3.4.
Using a hosts file, you can change the IP address that you resolve a given domain name to.
The hosts file is used to map hostnames (in other words domains) to IP addresses.