For example, my router is at 192.168.1.3 on my home network, but I could add the following line to my hosts file and simply type in into my address bar. Lastly, you can use the hosts file to create simple shortcuts to your own devices on the network. There is no way to specify the HTTPS version of a website in the HOSTS file, but it should redirect the HTTPS and non-HTTPS versions of the website if you use just the host name (i.e. If the website uses HTTPS like or something, it should still redirect if you use the host name. For example, it makes a difference if you use as opposed to without the You should always try without the www first to see if that works. The hosts file uses the format: IP Address Block Websites using HOSTS Fileīlocking a website in Windows is as simple as typing the following into the bottom of the hosts file: 127.0.0.1 So, if I wanted to block a website like I could just add the following line: 127.0.0.1 Now when I visit I get redirect to ! Nice! Note that if this doesn’t work for the websites you are entering, it could be because of the URL you are using. Now, you can select the hosts file and click Open.Īdding files to the hosts file is very simple. After it opened, look at the bottom portion of the file. After that just choose hosts and double click for you to open it. ![]() If you find it click it then choose all files. Change Text Documents (*.txt) to All Files using the drop down menu. Look at the lower right corner of the window and you will see Text Documents (.txt) it is just right above the button Open and Cancel. ![]() You will get a blank screen that displays the prompt No items match your search. ![]() Navigate to C:\Windows\System32\drivers\etc. Rather, right-click the Notepad listing to bring up the context menu. In order to edit the file, you have to open Notepad first, running as an Administrator.Ĭlick on Start and type in Notepad, but don’t click on Notepad to open it. This way of opening the hosts file was demonstrated to show where the hosts file is actually located within Windows, but you won’t be able to edit it because it’s a system file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |