Setting up Virtual Hosts in Windows using Hosts File Editor

In this guide, we will learn with screenshots on how to set up virtual hosts in Windows using Hosts File Editor.

Requirements:

  1. Hosts File Editor
  2. IP and domain name of the website.

Procedure to set up virtual hosts:

  1. You will need to download the software, click on this link to download https://hostsfileeditor.com/ and click on the area marked in the screenshot.
host file editor 01

Complete the installation and then open it

host file editor 02

Add the Hostname and IP address of the virtual host you want to add.

host file editor 03

  1. After adding the IP Address and Hostname tick all the hosts and press the save button.
  2. To test if Virtual Hosts are correctly set or not you can run the following ping command in the command prompt or terminal which should print the IP entered in the above steps.
    ping mydomain1.com

If your system is Linux or macOS then you can follow the guide below to set the Virtual Hosts.

Setting up Virtual Hosts on Windows, Linux, and macOS

Leave a Reply