

However, to edit it, one needs administrative privileges. The hosts file is a basic system file that can be edited with the built-in Notepad in Windows and is present in plain text.
#CANNOT MODIFY HOSTS FILE IN WINDOWS 10 HOW TO#
How to edit hosts file on a local computer Other devices on the same network could then use the local IP address corresponding to the domain name to test their website without going over the internet.

However, it is not the most optimized way to do so, as the users can change or remove the entry in the hosts file to revert their networking settings.Īnother reason one might need to consider manipulating the hosts file is to run their own website deployed on the computer and then test it out. This technique is often used by individuals to block certain websites on computers. However, since the computer’s networking system’s primary point of contact is the local hosts file, settings a different IP address for the domain name can trick the computer to transfer to a different IP. When a user opens up a web browser and searches for something or enters a website URL, the computer needs to contact the corresponding IP address to be able to communicate with the website. Why you might need to modify the hosts file Let us show you how you can modify the hosts file on your computer and any other computer on your network remotely. Users can use this file to block specific websites, or developers could modify the hosts file to test-run their websites locally on their machine. This file can be edited for each computer for multiple benefits. If the entry is not found there, it then goes to the Domain Name Server (DNS) associated with your computer. When you type in “” on your web browser, your computer goes to find the corresponding IP address in the hosts file. It is a file found on your computer that contains the name of a website and its corresponding IP address. The hosts file is essentially the first place your computer looks for an IP address when you are browsing through the internet. The hosts file serves as a local DNS server for the computer and is used to map IP addresses to domain names.

How to edit hosts file using the Command-line.How to edit hosts file on a local computer.Why you might need to modify the hosts file.The second part is the resolved domain address of the destination, and finally third part is the comment section, which always started with the hash (#). The above statement has three parts, the first part is the IP Address of the host system, by default it is 127.0.0.1, i.e., localhost. We aren’t going too deep in this, we know that you are already familiar with the stuff and you just want to know the procedure to modify the host file in Windows 11.Īlso, Read: Windows 11 FAQs Answered, Every Doubts Regarding the New Updateīefore getting to the editing part, let’s discuss a little bit about the data structure in the host file, the file structure looks like the below statement, 127.0.0.1 #test-comment There could be a number of reasons behind this, like you want to block some website from that particular PC, or unlock a particular port to access some work-related stuff.
