![]() One far more realistic application of the hosts file is to block websites which serve up ads or spyware. In addition, some software may employ its own techniques to lookup hostnames which might ignore the hosts file. Remember that this is a far from infallible way to block a site – another user could simply reverse the hosts file edit themselves. Save the file and try and visit Google in your browser. To achieve this example, add a line such as “0.0.0.0 to the file. By adding an entry for “” to the hosts file, you can force Windows to point the address to a different location – so users won’t be able to visit the site. ![]() One example is if you wanted to block a certain website, for example Google. While it is more useful to technical users, there are also a few more general cases in which it might have value. Each time you try to visit, you’ll find yourself instead at the (non-existent) 1.2.3.4 website.Īt this point, you may be wondering why you’d ever need to edit the hosts file. Therefore, if you want to point “” to the IP 1.2.3.4, you’d write “1.2.3.4 ” on a new line. You can add comments to the file by placing a “#” character at the start of the line – this will make Windows ignore the line when reading the file. Each entry goes on a newline, with the IP address (that’s the numerical address) first, followed by a space or tab character and then the hostname (or domain). The hosts file is a simple mapping of IP addresses and hostnames. The introduction provides a useful overview of how the file is structured, but we’ll cover the basics here. If you’ve never opened the hosts file before, all you’ll see is a short section of text describing its purpose and how to make edits. If you do browse through the folders graphically, remember to change the file type filter to “All Files” so the hosts file shows up. Click File > Open and browse to the file at C:WindowsSystem32driversetchosts (you can copy and paste this into the address bar at the top of the Open window). With Notepad open in administrator mode, you’re ready to open the file. Note you may need to reauthenticate yourself or get an administrator’s password if you’re not already logged in as one. ![]() Click “Run as administrator” to launch a privileged instance of the app. Search for Notepad (press the Start button and type its name) and right-click the app to display the context menu. The quickest way to open the file is using Notepad with administrator privileges. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |