This is the purpose for if you work on web development. Proper editing of a hosts file will allow you to redirect someone to a different URL for the purpose of demo.
Step 1 – Open up notepad as administrator
Search “Notepad” and right click on it. Select “Run as Administrator”.
Step 2 – Search the host file
Look for the host file at – Windows – System32 – Drivers – etc. Click the “hosts” and “Open” the file.
Step 3 – Edit the host
At the end of the line. Enter the ip of your webserver host and then press spacebar or tab to give some space. Then enter the domain as per created in your site. Save and close.
To verified your configuration is working. Try ping the domain and you will get reply. if not need to double check on the ip configure and also ensure the webserver host firewall is turn off.