The hosts file is used to map hostnames ( in early words domains ) to IP addresses. Using a hosts charge, you can change the IP address that you resolve a given sphere name to. This transfer lone affects your own computer without affecting how the knowledge domain is resolved worldwide. This is peculiarly useful when you want to test whether a transfer from another host is successful prior pointing your sphere to the newfangled server .
Both the IP of your web site and your SiteGround name servers are available in your Client Area > Websites > All Site Options > go to the kebab menu > Server Details. alternatively, you can besides see this data in the Dashboard of your Site Tools > Site Information section .
The localization of the hosts file, depending on the operational arrangement that you are using, is :

  • Windows – SystemRoot > system32 > drivers > etc > hosts
    By default, the system root is C:Windows, so if you are using Windows, your hosts file is most probably: C:\Windows\System32\drivers\etc\hosts
  • Linux – /etc/hosts
  • Mac OS X – /private/etc/hosts

Let ’ s say that you wish to resolve to the IP address In this case, you would need to open up the hosts file with a text editor and append the adopt line :

( note : Make certain that you don ’ t have any # signs in front man of the IP address as they will deactivate this entrance )

This will “ tell ” your calculator to resolve to once you do that you may need to clear your web browser ’ sulfur hoard, subsequently, if you try to reach your domain hypertext transfer protocol : // in a browser it should take you to the locate hosted on the waiter with IP

More detail instructions on how to locate and edit the hosts file on different operating systems are available below :

Windows 8 and 10

  • Press the Windows key (previously Start menu);
  • Use the Search option and search for Notepad;
  • Right-click Notepad and select Run as administrator;
  • From Notepad, open the hosts file at: C:\Windows\System32\drivers\etc\hosts;
  • Add the line and save your changes.

In case Notepad does not show any files in the etc booklet, switch the type of file from “ Text Documents ” to “ All Files ” .


  • Open up the Terminal;
  • Use the nano command line text editor or a different one you have available to open up the hosts file. The command with nano is as follows (the command will require your Linux user’s password):
    sudo nano /etc/hosts
  • Add the appropriate changes in the hosts file;
  • Use the Control and X key combination to save the changes.

Mac OS X 10.6 through 10.12

You should be logged in with a drug user with administrator privileges on your MAC .

  • Open Applications > Utilities > Terminal;
  • Edit the hosts file with a command line text editor such as nano by typing the following line in the terminal (the command will require your Mac user’s password):
    sudo nano /private/etc/hosts
  • Add your changes at the bottom of the file;
  • Save  the changes with the Control & X key combination, followed up by Y and then Enter.
generator :
Category : Website hosting

Leave a Reply

Your email address will not be published.