laurentio
18th September 2008, 09:39 AM
Do you have problems opening a particular website that works fine on other computers on the same network?
or
Are you irritated by a particular pop-up?
Solution:
Preventing access to the websites listed in your HOSTS file.
The first step in editing your HOSTS file is to find it.
My Computer > C: (or whatever drive Windows is on) > WINDOWS > system32 > drivers > etc > hosts
Right-click on the HOSTS file, and click Open. A window will appear asking what to open it with; find Notepad, select it, and click OK.
If you've never edited your HOSTS file before, this is what it should look like:
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
You'll notice all entries begin with “127.0.0.1”; all entries MUST begin with this. If a website is preceded by “127.0.0.1”, this means the website cannot load and is blocked. The first entry in the HOSTS file is “127.0.0.1 localhost”. Your HOSTS file MUST begin with that entry.
To add websites to your HOSTS file (to block them), use this as a guideline:
Code:
127.0.0.1 www.blockthiswebsite.com
After you've edited your HOSTS file, save the changes made (File > Save).
You’re done!
Optional but recommended:
If you would like to use a pre-made HOSTS file, I recommend you use the MVPS HOSTS file. This HOSTS file blocks websites with ads/banners, parasites, hijackers, and unwanted search engines.
If you would like to use the MVPS HOSTS file, open your HOSTS file and delete everything in it. Copy everything in the MVPS HOSTS file (a quick way to select everything is Ctrl+A, then right-click > Copy). Once everything is copied, paste it into your HOSTS file (right-click > Paste). Then, you can save.
Optional but recommended:
I would also suggest you make your HOSTS file read-only. This is not necessary, but by doing so, it makes it harder for malicious software to modify your HOSTS file. To make your HOSTS file read-only:
1) Right-click on the HOSTS file
2) Click Properties
3) You will see a window open. Look at the bottom of the window. To the right of Attributes, check the box that says Read-only.
4) Click Apply/OK.
Note: When your HOSTS file is read-only, you cannot make any changes to it (setting it to read-only helps in preventing modifications to the file), so if you want to add a new entry to your HOSTS file later on, you'll have to uncheck the Read-only box before you edit; you can then set it back to read-only when you're finished.
or
Are you irritated by a particular pop-up?
Solution:
Preventing access to the websites listed in your HOSTS file.
The first step in editing your HOSTS file is to find it.
My Computer > C: (or whatever drive Windows is on) > WINDOWS > system32 > drivers > etc > hosts
Right-click on the HOSTS file, and click Open. A window will appear asking what to open it with; find Notepad, select it, and click OK.
If you've never edited your HOSTS file before, this is what it should look like:
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
You'll notice all entries begin with “127.0.0.1”; all entries MUST begin with this. If a website is preceded by “127.0.0.1”, this means the website cannot load and is blocked. The first entry in the HOSTS file is “127.0.0.1 localhost”. Your HOSTS file MUST begin with that entry.
To add websites to your HOSTS file (to block them), use this as a guideline:
Code:
127.0.0.1 www.blockthiswebsite.com
After you've edited your HOSTS file, save the changes made (File > Save).
You’re done!
Optional but recommended:
If you would like to use a pre-made HOSTS file, I recommend you use the MVPS HOSTS file. This HOSTS file blocks websites with ads/banners, parasites, hijackers, and unwanted search engines.
If you would like to use the MVPS HOSTS file, open your HOSTS file and delete everything in it. Copy everything in the MVPS HOSTS file (a quick way to select everything is Ctrl+A, then right-click > Copy). Once everything is copied, paste it into your HOSTS file (right-click > Paste). Then, you can save.
Optional but recommended:
I would also suggest you make your HOSTS file read-only. This is not necessary, but by doing so, it makes it harder for malicious software to modify your HOSTS file. To make your HOSTS file read-only:
1) Right-click on the HOSTS file
2) Click Properties
3) You will see a window open. Look at the bottom of the window. To the right of Attributes, check the box that says Read-only.
4) Click Apply/OK.
Note: When your HOSTS file is read-only, you cannot make any changes to it (setting it to read-only helps in preventing modifications to the file), so if you want to add a new entry to your HOSTS file later on, you'll have to uncheck the Read-only box before you edit; you can then set it back to read-only when you're finished.