Windows hosts file
- #Windows hosts file how to#
- #Windows hosts file drivers#
- #Windows hosts file Pc#
- #Windows hosts file free#
Blocking unwanted internet resourcesĮntries in the hosts file may be used to block online advertising, or the domains of known malicious resources and servers that contain spyware, adware, and other malware. Some web service and intranet developers and administrators define locally defined domains in a LAN for various purposes, such as accessing the company’s internal resources or to test local websites in development. In its function of resolving host names, the hosts file may be used to define any hostname or domain name for use in the local system. Microsoft Windows 95 or Windows 98: \%WinDir%\Hosts.sam Įach line in the hosts file contains the IP address of a TCP/IP host followed by the FQDN of the host, followed by an optional comment prefixed with a pound sign (#).
#Windows hosts file free#
Should you need assistance blocking websites through your hosts file, please feel free to call us on 0.You can locate the hosts file using the following paths: This has been tested it using IE, Microsoft Edge, Chrome and Firefox and it worked on all of these browsers. Please note that not all web browsers use the hosts file, so if this is not working, that could be the issue. It doesn’t matter if .za is an actual website because the hosts file is read first and you are redirected to the IP address specified in the file. You can also use the hosts file to create shortcuts to your own devices on the network.įor example, if you had a router with IP address 192.168.1.1 on your home network, you could add the following line to the hosts file and simply type in .za into your address bar. If you don’t have a local website setup on your computer, you’ll just get an error page in your web browser. The hosts file uses the format:īlocking a website in Windows is as simple as typing the following into the bottom of the hosts file:ġ27.0.0.1 So, if you wanted to block a website like you could just add the following line and click save:ġ27.0.0.1 What we are telling Windows is that the website should redirect to the IP address 127.0.0.1, which is just the loopback address on our local system. Step 3:Īdding files to the hosts file is very simple. Now, you can select the hosts file and click Open. Step 2:Ĭhange Text Documents (*.txt) to All Files using the drop down menu. You will get a blank screen that displays the prompt No items match your search. Navigate to C:\Windows\System32\drivers\etc. Step 1:Ĭlick on Start and type in Notepad, 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. 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. From there, Notepad will launch with the hosts file information. Click to select Notepad and click the OK button.
Because there is no default program set to open a file type like this, double clicking the hosts file will give you a Windows prompt, asking you which program you would like to use to open the file.įrom this prompt, you can choose to edit the hosts file with Notepad. Notice that the file type for the hosts file is listed as File. You’ll now see several files, one of which is hosts.
#Windows hosts file drivers#
Inside of the System32 folder, open drivers and then open etc. Double-click on C:\, then the Windows folder and scroll down the page until you reach the System32 folder.
#Windows hosts file Pc#
Open Windows Explorer and click on This PC or My Computer.
By editing the Hosts file, Windows can be customized to block or redirect specific websites and even protocols that are used by programs and applications. The Windows Hosts file is a file that Windows uses to control and map IP addresses.
#Windows hosts file how to#
How to edit the Windows hosts file to block or redirect websites Back To Online Support