Customer Support

  1. Support
  2. How can I see my site (sitepreview) before I update the nameservers? Mac Host file

How can I see my site (sitepreview) before I update the nameservers? Mac Host file

In case of transfer of your site from another company to Top.Host, but also in case of internal transfer of your site, from one server of Top.Host to another before proceeding to the declaration of the servers through your registrar, you can modify the hosts file of your computer and according to this modification your computer will see the new server and not the one from which the site is online.

This process consists of the following simple steps.

1. Open Applications>>Utilities>>Terminal.

2. Open the hosts file by running the following command in the terminal:

sudo nano /private/etc/hosts

In step 3, after writing the command, you will be asked for the user's password. Where user is mac user.

Note: When typing the password, the password does not appear nor does the cursor move.

After entering the password press the Enter key

4. Inside the file and below the line

127.0.0.1 localhost add Top.Host IP

It is in the hosting activation email and is that of the primary nameserver) and your domain.

So the file should now have the following format:

127.0.0.1 localhost
209.85.112.207 top.host
209.85.112.207 www.top.host

where 209.85.112.207 is a random IP (you will declare the IP of your server) and where top.host you will declare your own domain. 5. Save your changes by pressing CTRL + O (for confirmation press the Enter key) and finally CTRL + X to close the hosts file and open your site in a new browser (Mozilla Firefox, Google Chrome, Internet Explorer) and like as a result, you will be able to see your site from your server at Top.Host. Finally, after making sure that everything works as you wish, you can delete from the hosts file the entries you added in step 4 and save, thus returning it to its original format by pressing CTRL + O (to confirm, press the Enter key) and finally CTRL + X to close the hosts file.


You haven't found what you are looking for?

Contact our experts, they will be happy to help!

Contact us