To modify the host files you will need locate it on your PC whether it's Windows, Linux, or Mac. You need to add two entries to the file with the domain and ip address you want the website to resolve to. For example you will add this to the file:
The following section provide instructions on locating and editing the hosts file on the following operating systems.
- Mac OS
Windows NT, 2000, XP, 7, Vista, 8, and 10
- Navigate to notepad, right click and run it as administrator
- Open and go to C:\Windows\System32\drivers\etc\hosts
- Open the hosts file and make the changes and save
- Open a terminal window
- Open the hosts file in a text editor by typing the following line:
sudo nano /etc/hosts
- Enter your domain user password
- Make the changes to the file and press Control-x
- When asked if you want to save your changes, answer y.
- Open Applications > Utilities > Terminal
- Open the hosts file by typing the following line in the window
sudo nano /private/etc/hosts
- Type your domain user password
- Edit the hosts file
- Save the hosts file by pressing control+x and answerying y.
When you are done flush your DNS by opening your command prompt and typing: ipconfig /flushdns