Often when previewing a website before it goes live you may be required to trick your computer into thinking that a website is on a different server to where the live site is. To do this you will need to edit the host file.
See below for an example of a hosts file.
You can add an entry by providing the the following
[your hosting account's IP address] [your domain name]
For example: 184.108.40.206 sampledomain.com
Note: Once you are done testing the website. Remove it again on the hosts file or include a hash symbol (#) before the ip address to comment the line.
Never change the below lines: