Windows 10 and 8
- Press the Windows key.
- Type “notepad” in the search field.
- In the search results, right-click Notepad and select “Run as administrator”.
- In Notepad, open the following file: “c:\Windows\System32\Drivers\etc\hosts”
- Append your entry such as:
127.0.0.1[tab]www.mysite.com - Save changes
Linux
- Open the “/etc/hosts” file in a text editor such as vi or nano
- Make the necessary changes to the file.
- Save changes
Mac OS X 10.6 through 10.12
- Open Applications > Utilities > Terminal.
- Open the hosts file by typing the following line in the terminal window:
“sudo nano /private/etc/hosts” - Type your domain user password when prompted.
- Edit the hosts file.
- Save the hosts file by pressing Control+x and answering y.
- Make your changes take effect by flushing the DNS cache with the following command:
“dscacheutil -flushcache”