sudo vi /etc/hosts
Then enter your password.
Step 2 Add records:
Enter the following commands in the hosts file, below the line
# 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.
Save your changes by typing :wq and click Enter
Open your sites in a new browser (mozilla firefox, Google chrome, Internet explorer) and proceed with the necessary checks on your part.
Step 3: Restore hosts file to its original format:
Open a terminal and execute the following command:
sudo vi /etc/hosts
Then state your password and delete the commands you had entered initially. Save your changes by typing :wq and click Enter.