Setting the Windows (Host) to Request as DNS
The computer's file host is an operating system file that maps host names to IP addresses. It is a plain text file. Originally, a file called HOSTS.TXT was maintained manually and was made available through file sharing by the Stanford Research Institute for ARPANET membership, which contained the host names and address of the hosts as contributed to their inclusion by member organizations.
The Domain Name System, first described in 1983 and implemented in 1984, automated the publishing process and provided dynamic and instantaneous resolution of the host name on the rapidly growing network. In modern operating systems, the hosts file remains an alternative name resolution mechanism, often configurable as part of installations, such as the name service switch, either as the primary method or as an alternative method.
Surely more than once you have seen the need to make a query to a domain hosted on the same computer from which you are making the query, or you have simply been interested in making a query to your locally hosted website and not the active website. Editing the Windows hosts configuration file can solve this problem.
Windows hosts configuration file directory is in: C:\Windows\System32\drivers\etc\hosts
We open the configuration file of the Windows host. with a text editor (NotePad ++, Notepad) or any other of your choice and add in the first part the IPv4 address where it will ask for the domain or name that we add in the second part example:
We must bear in mind that if we want to call our domain with (www) it is necessary to add the full name to your host, Example:
It is important to note that the server to which we are going to make the request must have the domain configured to respond to the request of the domain.
To make any changes to the Windows hosts configuration file, you must copy the file and edit it in a different directory. Why? The Windows hosts is a file protected by the system, which will not allow editing directly.