Editing Your Hosts File

Posted by & filed under .

Here’s a reference page on how to add items to your hosts file. Adding items to your hosts file allows you to set up a sort of “local DNS” to access sites even when your DNS server doesn’t know how to get to them, this is often used in development. Note that you need administrator access to edit this file, so if you aren’t an admin on your system, you’ll need someone else to do these steps.

1. Find Notepad in your start menu and right-click it

2. Select “Run as Administrator”

3. In the “File Name” field, paste the following:

4. Click “Open”

5. Add items to your hosts file in the “ipAddress hostname” format, for example “216.58.216.142 google.com” or “127.0.0.1 myfakelocalsite.com”

6. Save the file, you should now be able to connect to the IP addresses you added using the host names you set