What's new

Welcome to WebForum | Zimbabwe Web Hosting Forum.

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?

Ask question

Ask questions and get answers from our community


Answer questions and become an expert on all topics.

Contact us

Get in touch with the site administrator directly.

Forum Group

Join the Forum Whatsapp group for daily updates.
  • Thanks for participating in our community, Discuss and Learn. All Forum members are allowed to create threads and posts. Resources posted here should be CLEAN and SAFE. Do not post “offensive” posts, links, or images. Remain respectful of other members at all times.

How to test your website before changing DNS?


Staff member
May 19, 2021
Reaction score
In some cases, when you might be transferring your websites over to Ecowebzim from another provider you may want to test the website functionality without making any changes to the domain’s DNS records, i.e without pointing the site to the new server for everyone else on the internet. You can achieve this by editing the hosts file on your computer.

You need to know the new IP address of your web hosting account or server with Ecowebzim. You can usually find this from the order confirmation email/details.

What is the hosts file?​

The hosts file is used to map hostnames domain names to an IP Address. With the hosts file you can change the IP address that you resolve a given domain name to. This change only affects your own computer without affecting how the domain is resolved worldwide.

The location of the hosts file, depending on the operating system that you are using, is:

  • WindowsSystemRoot > system32 > drivers > etc > hosts
    By default the system root is C:\Windows, so if you are using Windows, your hosts file is most probably: C:\Windows\System32\drivers\etc\hosts)
  • Linux/etc/hosts
  • Mac OS X – /private/etc/hosts

Editing your hosts file​


  1. From the Start Menu, search for “Notepad” (Win 8, 10) or navigate to: “All Programs -> Accessories -> Notepad” (Win XP, Vista, 7).
  2. Right-click on Notepad and select “Run As Administrator”.
  3. In Notepad, click “Open” and select the file C:\Windows\System32\Drivers\etc\hosts
  4. At the bottom of the file, add your new IP address followed by the domain name: example.com www.example.com
  5. Save this file overwriting the previous version.


  1. Most of the Linux distributions use the hosts file at /etc/hosts. You will need root/sudo access to edit this file. Use your favorite editor to open the file.
  2. To add your domain for testing purposes, in the hosts file, you need to specify what domain points to which IP address. In this example, we will use the IP address and the domain example.com. You will need to add the line: example.com www.example.com
  3. Save the file. All requests for the domain www.example.com and example.com will direct to the specified IP (

Mac OSX​

You should be logged in with a user with administrator privileges on your MAC.

  • Open Applications -> Utilities -> Terminal.
  • Edit the hosts file with a command line text editor such as nano by typing the following line in the terminal (the command will require your Mac user’s password): sudo nano /private/etc/hosts
  • Add your changes at the bottom of the file as shown previously.
  • Save the changes with the Control and X key combination.

Testing your Changes​

Pinging the domain name is the easiest way to test if the newly configured IP is working.

To test that the domain is pointed to the correct IP in your hosts file, type the following:

PING www.example.com ( 56(84) bytes of data.
64 bytes from www.example.com ( icmp_req=1 ttl=58 time=1.40 ms
64 bytes from www.example.com ( icmp_req=2 ttl=58 time=1.31 ms
64 bytes from www.example.com ( icmp_req=3 ttl=58 time=1.36 ms
64 bytes from www.example.com ( icmp_req=4 ttl=58 time=1.36 ms
The response should come from the newly configured IP:

In Linux or Mac OS X, you can use ping from the Shell or Terminal respectively. In Windows, you will need to open the command line: Press CTRL + Windows button on the keyboard. In the pop-up window, type cmd and hit enter.

Forum statistics

Latest member