28 Oct, 2017

How to Create Virtual Host in XAMPP Server

28 Oct, 2017

Dear Reader in This Tutorial let us We Know that “How we can Create Virtual Host in XAMPP Server”, So in this Tutorial, We Learn Step By Step Virtual Host Creation Process.

Virtual hosting is a method for hosting multiple domain names. This allows one server to share its resources, such as memory and processor cycles, without requiring all services provided to use the same hostname.

There are two types of Virtual Hosts–

i) Name Based Virtual Server

ii) IP Based Virtual Server

At First, I am going to assume that you’re using a Windows machine and have XAMPP  Server installed

Step 1:-. You need to go your Computer drive where you installed Operating System and find the hosts file by following the bellow path


Open a file in any editor and after making changes in the file you try to save file you should get a warning message, this message you got because this is a protected file


Step 2:- Now if you want to changes in that file you need to open that file in notepad++ when you open that file in notepad++ and after changes you want to save that file you see a bellow message as open that file as an Administrator mode, you need to click Yes.


Step 3:-  When you open hosts file as an Administrator mod then type the below code


save that file


Step 4:- Now open XAMPP Server


Step 5:-  you need to click config then click Browse Apache



Step 6:- At this step click on conf


Step 7:- Now click on extra


Step 8:- Here you can see a file “httpd-vhosts.conf” open that file


Step 9:- At this step, you need to type the below code in your file as-


You can also see below snapshot


Step 10:- Start your XAMPP Server because you change in Apache Server Files


Step 10:-  Congratulations you have successfully created a Virtual host, Now you type URL in Browser like




you can see the result


Step 11:-  Finally you can also run your project using your chosen domain name like





If you have any query then please comment below, Thanks..



  • asics kayno April 25, 2018

    I actually wanted to construct a simple comment to thank you for the remarkable secrets you are giving here. My considerable internet search has at the end been recognized with high-quality ideas to talk about with my family and friends. I would believe that many of us visitors actually are undoubtedly lucky to be in a remarkable website with many perfect individuals with helpful opinions. I feel really lucky to have encountered your entire web page and look forward to many more entertaining times reading here. Thank you once more for a lot of things.


    • Webpreparations Team April 25, 2018

      Thank you so much 🙂


Leave a comment:

Your email address will not be published. Required fields are marked *