Configuring the /etc/hosts File

The hosts file configures the mapping between the domain and the IP address on a specific computer. For example, if you need to check the correctness of the site after its transfer to a new hosting. It can take several hours to apply the settings.

In order to determine which IP address the request is going to, you can use the ping command.

To apply the new settings, you need to enter the IP address in the file, then a space and a domain name. Changes are made on behalf of the administrator.

Windows

By default, the file is located in the following directory: c:\windows\system32\drivers\etc\hosts.

Go to "My Computer" -> Local C drive -> Windows -> System32 -> drivers -> etc:

Open the hosts file in the etc folder with Notepad.

Enter the IP address and domain.

For example, 192.68.0.177 domain77.com:

File hosts

Select “All Files” in the File Type field when saving your changes.

Linux

To open the hosts file for editing with superuser rights, open a terminal and run:

sudo nano /etc/hosts

Enter the IP address and domain.

For example, 192.68.0.177 domain77.com:

127.0.0.1    localhost

127.0.1.1    your_computer

192.68.0.177 domain77.com

Press Ctrl + O then Ctrl + X to save the settings. In this case, the setup is described using the nano text editor. You can use any other editor you like.

If you still have questions, please create a ticket to technical support.