


You can now check that the URL you have entered in the hosts file will now redirect to the corresponding IP. You can now make the desired changes to the file, as in the example below, and then use the shortcut keys Ctrl + S to save it.If the window does not display any items, select All files from the file type drop-down menu. Navigate to the hosts file location shared above.Now click on File in the top-left corner of Notepad, and then click Open.Search for Notepad in the Windows Search Box and then use the shortcut keys Ctrl + Shift + Enter to launch it as an Administrator.The following method is true for user accounts having Administrative privileges, as well as for the standard users. Let us show you how you can modify the hosts file successfully, without any errors, that is located at the following location: C:\Windows\System32\drivers\etc\hosts

A standard user or user account with privileges any lower than an administrator would not be able to edit the file and will be given the following error when trying to save any changes made to it.Įrror prompt upon saving modified hosts file 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 on a remote computer.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.
