|
![]() |
Overclock.net - Overclocking.net > Overclock.net Forum > FAQs | |
How to: Use the HOSTS file to block websites in Windows?
|
||
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) | |||||||||||||
|
Bifford
![]() |
Windows uses a HOSTS (located in %systemdrive%/windows/system32/drivers/etc) file to maintain a personal list of web addresses. Any time a request is made for a URL, the HOSTS file will be checked first. If a corresponding address is found you will be directed to that IP without first consulting a DNS Server. The original intent of this file was to define where sites exist; we will use it in this context to define where they don’t exist. Lets first look at a HOSTS file entry
__________________127.0.0.1 localhost This is the loopback address for your machine for those cases where an application needs to reference the local machine by IP address- the loopback address will always be valid. This entry should never be changed. Now lets add an entry to block 127.0.0.1 www.yahoo.com We are telling our local machine that Yahoo actually exists on the local machine. Any request for www.yahoo.com will be directed to the local machine and therefore effectively blocked. You could also use the IP of another website if you wanted to be creative. Let’s take a closer look at a URL http://www.yahoo.com
127.0.0.1 yahoo.com 127.0.0.1 www.yahoo.com
Last edited by BFRD : 03-07-09 at 07:41 AM Reason: inapropriate use of quotation marks. |
|||||||||||||
|
|
|
#2 (permalink) | ||||||||
|
First Time Build
![]() |
Sounds cool, but where do I go to change/make a HOST file?
__________________
|
||||||||
|
|
|
|
#3 (permalink) | |||||||||||||
|
Bifford
![]() |
How did I forget to put that in? :doh:
__________________The host file is located in %systemdrive%/windows/system32/drivers/etc
|
|||||||||||||
|
|
|
#5 (permalink) |
|
New to Overclock.net
|
is there a way to block a SUB website of a main one?
for example, instead of blocking all of www.xanga.com, I want to block only www.xanga.com/block |
|
|
|
|
#6 (permalink) | ||||||||||||||
|
Bifford
![]() |
Quote:
|
||||||||||||||
|
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|