Secure Windows 7 With This Hosts File (Block Malware, Ads & More)


Ok, let’s cut to the chase. If your PC has an internet connection you are in danger, every minute. As you might know you can use the hosts file to your advantage and rewrite all those nasty URL’s to block malware, ads and other malicious sites.

Secure Windows 7 With Hosts File

What is a hosts file?

A hosts file maps hostnames to IP addresses, e.g. google.com to 1.2.3.4.5.7 (it’s another one). You can use this for your advantage by resolving (translating) addresses of malicious websites to “localhost” (127.0.0.1) which is basically your local IP. If it resolves to localhost, the query will fail and the website will NOT load.

Secure Hosts File

How does this help? The hosts file you are about to download has hundreads of entries of malicious websites. If they don’t resolve properly they can not spread malware, viruses or cookies, because the adverts will simply not load.

Hosts File: Performance vs. Security

You have to set priorities! What do you want? Peformance or security? The larger your hosts file the slower your internet might be. If you have many entries in your hosts file this can significantly slow down your browser. Luckily, we have some work arounds to combine performance and security.

Download & Install MVPS HOSTS File

1. Head over to http://www.mvps.org/winhelp2002/hosts.htm and check out the hosts file, it’s a pretty darn long one. Also make sure to check out http://www.mvps.org for further instructions!

2. While the page is open hold down CTRL + A, then copy all entries into the clipboard via CTRL + C

2. Open an elevated command prompt

3. Enter notepad C:/windows/system32/drivers/etc/hosts

4. In the notepad program click just below the commeted area (###) and hold down CTRL + V to insert all URL’s that we copied in step (2)

5. Save the file (CTRL + S)

Large Hosts File: Performance BOOST

If you modify some registry keys you can define the time those records are kept in the DNS cache, which will greatly increase your website loading speed.

6. Download this registry key: DNS Cache Time TTL (Time to Live)

Verify the content to be:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Dnscache\Parameters]
“MaxCacheTtl”=dword:00000001
“MaxNegativeCacheTtl”=dword:00000000

7. Double-click on the registry file to apply it.

8. Reboot.

Hopefully this will make your PC a little bit more secure.

Still Slow? Performance Tip

It also helps if you regularly flush your DNS cache. Here’s how: Flush DNS Cache


Or you might like these sexy wallpaper, tweaks and themes:

Written by oliversk Saturday, October 23rd, 2010

Was it helpful? Please bookmark it and spread the word

delicious   facebook   google   twitter  

You love Windows, Gaming and everything digital? Great, we too! We have thousands of great Windows 7 themes, registry tweaks, tutorials, so please use our search box if you look for anything specific. If you have some awesome desktop themes, tips or want to write for us, then drop us a mail: win7themes at googlemail.com

One Response to Secure Windows 7 With This Hosts File (Block Malware, Ads & More)

  1. ixan said:

    Doesn’t work in Windows 7 64 bit where the hosts file is located not just in system32 but also in C:\Windows\winsxs\amd64_microsoft-windows-w..nfrastructure-other_31bf3856ad364e35_6.1.7600.16385_none_6079f415110c0210 and Chrome for some reason uses only the second one and not the system32 one. I cannot modify the one in the winsxs location

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>