0
The Windows 7 Hosts file is a file that Windows uses to control and map IP addresses. By editing the Hosts file, Windows can be customized to block specific websites, and even protocols that are used by programs and applications. To get started editing the Windows 7 Hosts file, you first need to locate it. Open up the Start Menu and click the Computer listing. Double click your hard drive, which is usually labeled Local Disk (C:). Next, open up the Windows folder and scroll down the page until you reach the folder System32. Double click System32 and open up the drivers folder located within. Finally, navigate through the etc folder to find the hosts file.
Windows 7 Hosts File
Now, notice that the file type for the hosts file is listed as File. Because there is no default program set to open a file type like this, double clicking the hosts file will simply give you a Windows prompt, asking you which program you would like to use to open the file.
Choose a program prompt - Windows 7
From this prompt, you can choose to edit the hosts file with Notepad. So, simply click to select Notepad and click the OK button. From there, Notepad will launch with the hosts file information. This way of opening the hosts file was demonstrated to show where the hosts file is actually located within Windows, but there is a better and easier way to edit the file for quick reference.
Use the path Start > All Programs > Accessories > Notepad, but don’t click on Notepad to open it. Rather, right-click the Notepad listing to bring up the context menu. Select the option Run as Administrator. The hosts file must be ran as administrator.
Notepad Administrator
With Notepad open, select File > Open. Use the path Computer > C: > Windows > System32 > drivers > etc. You will have a blank screen, that displays the prompt No items match your search. Change Text Documents (*.txt) to All Files using the drop down menu. Now, you can select the hosts file and click Open.
Windows 7 Hosts File
Adding files to the hosts file is very simple. The hosts file uses the format:
IP Address    exampledomain.com
Blocking a website in Windows is as simple as:
127.0.0.1    www.blockeddomainname.com
So, we could block Online-Tech-Tips like this, not that we would ever want or need to.
127.0.0.1    www.online-tech-tips.com
With a website blocked in the hosts file, a web browser will simply return an error page when the website is accessed.
Unable to Connect - Hosts File
The hosts file can be used to block permission to specific websites, which can be useful for blocking malicious websites, but what else can be set in the hosts file? Well, some programs and applications that you use may actually call out and use external websites to operate. So, when you open an application on your computer, it may connect with a website in order to do things like verify licensing and other tasks. Blocking a website in the hosts file, in many cases, will stop a program or application from accessing a website as well.
An example of this is, Adobe programs such as Photoshop and Dreamweaver. Most Adobe products access several verification websites for registration and activation purposes. So, as some hackers have found out, blocking these websites with the Hosts file can actually modify the Adobe registration and activation cycle. By blocking the according URLs that Adobe uses for activation (with the hosts file), you could actually not have to activate Photoshop, or other Adobe programs, in order to use them.
If you want to block a specific website, and also have a different, specific website open up when the blocked website is trying to be accessed, you can use the following format:
IP Address of specific website    www.blockeddomain.com
Example: 66.102.9.147    www.online-tech-tips.com
The Example will make the website with IP Address 66.102.9.147 (Yahoo) redirect to Online Tech Tips, whenever it is accessed in a web browser. So if you were to type www.yahoo.com into your web browser, with the hosts file setup like this, you would be brought to www.online-tech-tips.com. You can find a websites IP Address using this website.
The hosts file is an easy way to restrict websites from accessing Windows. Do you know any other cool hosts file tips?

Post a Comment

 
Top