1. Home
  2. Knowledge Base
  3. Web hosting
  4. Test your website before putting it online

Test your website before putting it online

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:

  1. Go to “My products”> “Web hosting”> Your domain name.
  2. 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:

  1. Go to your programs and search for “Notepad”.
  2. Instead of opening the program immediately, right-click on it. In the menu that appears, choose “Run as administrator”.
  3. Now go to “File”> “Open” and browse to C:\Windows\System32\Drivers\etc\hosts
  4. 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

    Change the domain names to your own domain name with and without www. in the script

  5. Add this line at the bottom of the file.
  6. Save the hosts file via “File”> “Save”.
  7. Close via “File”> “Close” to safely exit the file.
  8. 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:

  1. Go to your programs and open “Terminal”.
  2. Copy the following command and paste it in Terminal. Confirm with “Enter” to execute it.
    sudo nano /etc/hosts
  3. You may then have to enter the password for your computer.
  4. 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

    Change the domain names to your own domain name with and without www. in the script

  5. Add this line at the bottom of the file.
  6. Save the host file by entering “CTRL” + “O”.
  7. The system will ask you to choose a name for your file. Do not change the name and press “Enter”.
  8. Close with “CTRL” + “x”.
  9. Restart your Mac computer.

 

Updated on 14 August 2020

Was this article helpful?