20 Change Localhost To Domain Name Windows 10 In This Year

Change the hosts file.
Change localhost to domain name windows 10. Run the server and test our work. Add the below line and save the file. Open hosts file as an administrator.
1 open the file c windows system32 drivers etc and edit as administrator hosts file. Once generated it is already loaded into the system. For this part you need to dig deep into the windows directory and modify the hosts file.
Below is the step by step guide to change localhost to domain name for xampp in a windows computing environment. 3 add lines containing the domain name s and ip address to redirect to. This is how you can set custom domain name for the localhost website and also debug it.
In simpler terms the hosts file provides a mechanism to map domain names such as. This steps is to change localhost to custom domain name in xamp server windows 7 windows 10. 2 edit httpd vhosts conf file in my system e xampp apache conf extra and edit httpd vhosts.
In the last line you need add the following. See the section in the red box in the image above. Similarly you can add your own custom domain name in.
Let s break the tutorial into 3 different parts. You could change localhost to be any domain name that you d like ie. The hosts file for unix linux and mac os x is located in etc hosts.