Before you put a new or updated website online, it is always a good idea to test it first. That way you can be sure that everything works well.
To test your website in advance, adjust the hosts file on your computer. That sounds complex, but with our manual it’s easier than you think.
By modifying the hosts file, you can view your website in the browser before you have linked a domain name to it. Or you can test a local version of your website before you actually put it online.
Step 1: look up the IP address of your hosting
Follow these steps in the control panel:
- Go to “My products”> “Web hosting”> Your domain name.
- You will see the IP address of your web hosting package in the overview. You need this for the next step.
Step 2: Test your website on your computer
Follow these steps to test your website on Windows:
- Go to your programs and search for “Notepad”.
- Instead of opening the program immediately, right-click on it. In the menu that appears, choose “Run as administrator”.
- Now go to “File”> “Open” and browse to C:\Windows\System32\Drivers\etc\hosts
- Now adjust the hosts file. Enter the IP address of your hosting package (see previous step), followed by your (sub) domain names (always with a space between them).
An example with ninefortwo.be:176.62.168.70 ninefortwo.be www.ninefortwo.be
- Add this line at the bottom of the file.
- Save the hosts file via “File”> “Save”.
- Close via “File”> “Close” to safely exit the file.
- After this adjustment you simply navigate to your domain name on that computer to test your website.
Follow these steps to test your website on Mac:
- Go to your programs and open “Terminal”.
- Copy the following command and paste it in Terminal. Confirm with “Enter” to execute it.
sudo nano /etc/hosts
- You may then have to enter the password for your computer.
- Now adjust the hosts file. Enter the IP address of your hosting package (see previous step), followed by your (sub) domain names (always with a space between them).
An example with ninefortwo.be:176.62.168.70 ninefortwo.be www.ninefortwo.be
- Add this line at the bottom of the file.
- Save the host file by entering “CTRL” + “O”.
- The system will ask you to choose a name for your file. Do not change the name and press “Enter”.
- Close with “CTRL” + “x”.
- Restart your Mac computer.