Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Overclock.net Forum > FAQs

 
 
LinkBack Thread Tools
Old 09-07-05   #1 (permalink)
Bifford
 
BFRD's Avatar
 
intel nvidia

Join Date: Dec 2004
Location: Carrollton, TX
Posts: 5,095

FAQs Submitted: 8
Folding Team Rank: 116
Hardware Reviews: 2
Trader Rating: 12
Default How to: Use the HOSTS file to block websites in Windows?

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
  • http:// defines the transfer protocol in this case Hyper Text Transport Protocol; this is the standard for viewing websites. Another common protocol is ftp:// for file transfer.
  • www is the host
  • yahoo.com is the domain
  • .com is further classified as the TLD (Top Level Domain)
A HOSTS file entry will disregard the transfer protocol so it isn’t needed. However, the host does play an important role. A webmaster may choose to define a host for his/her website. “WWW” has become the universal standard for the default host. It is just as common to define a site with no host as well. This means that as far as DNS goes www.yahoo.com & yahoo.com are two totally different sites, even though they resolve to the same place. Because of this to effectively block the site, you must also block all hosts. This would usually mean:

127.0.0.1 yahoo.com

127.0.0.1 www.yahoo.com
__________________
System: Main Rig
CPU
E6700 Conroe
Motherboard
Abit QuadGT
Memory
2GB G.Skill PC2 8000 (HZ)
Graphics Card
EVGA 8800GTX
Hard Drive
150 GB Raptor X / 300GB Storage
Sound Card
Audigy 2 ZS
Power Supply
PCP&C Silencer 750
Case
Rocketfish
CPU cooling
Stock (for now)
GPU cooling
Stock
OS
Vista Ultimate
Monitor
Dual Samsung 204b
Overclock.net - 2009 Chimp Challenge Champions 2 Million+ Folding at Home points

Last edited by BFRD : 03-07-09 at 07:41 AM Reason: inapropriate use of quotation marks.
BFRD is offline I fold for Overclock.net Overclocked Account BFRD's Gallery  
Old 10-25-05   #2 (permalink)
First Time Build
 
mistformshadow's Avatar
 
intel ati

Join Date: Sep 2005
Location: UTAH..SNOWBOARDING!!!!!!!
Posts: 551

Rep: 34 mistformshadow is acknowledged by some
Unique Rep: 27
FAQs Submitted: 4
Trader Rating: 0
Default allo

Sounds cool, but where do I go to change/make a HOST file?
__________________
System: My System
CPU
P4 2.4 Prescott
Motherboard
Asus P4P800-E Deluxe
Sound Card
onboard (5.1)
Power Supply
Stock 380W
Case
RAIDMAX ATX 268WBP blk/s
OS
XP Home +SP2
Monitor
AVIDAV 17in LCD Flat!!!!!
mistformshadow is offline  
Old 10-25-05   #3 (permalink)
Bifford
 
BFRD's Avatar
 
intel nvidia

Join Date: Dec 2004
Location: Carrollton, TX
Posts: 5,095

FAQs Submitted: 8
Folding Team Rank: 116
Hardware Reviews: 2
Trader Rating: 12
Default allo

How did I forget to put that in? :doh:

The host file is located in %systemdrive%/windows/system32/drivers/etc
__________________
System: Main Rig
CPU
E6700 Conroe
Motherboard
Abit QuadGT
Memory
2GB G.Skill PC2 8000 (HZ)
Graphics Card
EVGA 8800GTX
Hard Drive
150 GB Raptor X / 300GB Storage
Sound Card
Audigy 2 ZS
Power Supply
PCP&C Silencer 750
Case
Rocketfish
CPU cooling
Stock (for now)
GPU cooling
Stock
OS
Vista Ultimate
Monitor
Dual Samsung 204b
Overclock.net - 2009 Chimp Challenge Champions 2 Million+ Folding at Home points
BFRD is offline I fold for Overclock.net Overclocked Account BFRD's Gallery  
Old 10-25-05   #4 (permalink)
First Time Build
 
mistformshadow's Avatar
 
intel ati

Join Date: Sep 2005
Location: UTAH..SNOWBOARDING!!!!!!!
Posts: 551

Rep: 34 mistformshadow is acknowledged by some
Unique Rep: 27
FAQs Submitted: 4
Trader Rating: 0
Default allo

Ok, thanx man :D .
__________________
System: My System
CPU
P4 2.4 Prescott
Motherboard
Asus P4P800-E Deluxe
Sound Card
onboard (5.1)
Power Supply
Stock 380W
Case
RAIDMAX ATX 268WBP blk/s
OS
XP Home +SP2
Monitor
AVIDAV 17in LCD Flat!!!!!
mistformshadow is offline  
Old 02-23-06   #5 (permalink)
New to Overclock.net
 
Join Date: Feb 2006
Posts: 1

Rep: 0 Outlier Unknown
Unique Rep: 0
Trader Rating: 0
Default

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
Outlier is offline  
Old 02-23-06   #6 (permalink)
Bifford
 
BFRD's Avatar
 
intel nvidia

Join Date: Dec 2004
Location: Carrollton, TX
Posts: 5,095

FAQs Submitted: 8
Folding Team Rank: 116
Hardware Reviews: 2
Trader Rating: 12
Default

Quote:
Originally Posted by Outlier
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
Not with a host file.
__________________
System: Main Rig
CPU
E6700 Conroe
Motherboard
Abit QuadGT
Memory
2GB G.Skill PC2 8000 (HZ)
Graphics Card
EVGA 8800GTX
Hard Drive
150 GB Raptor X / 300GB Storage
Sound Card
Audigy 2 ZS
Power Supply
PCP&C Silencer 750
Case
Rocketfish
CPU cooling
Stock (for now)
GPU cooling
Stock
OS
Vista Ultimate
Monitor
Dual Samsung 204b
Overclock.net - 2009 Chimp Challenge Champions 2 Million+ Folding at Home points
BFRD is offline I fold for Overclock.net Overclocked Account BFRD's Gallery  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools



All times are GMT -5. The time now is 05:45 PM.


Overclock.net is a Carbon Neutral Site Creative Commons License

Terms of Service / Forum Rules | Privacy Policy | DMCA Info | Advertising | Become an Official Vendor
Copyright © 2009 Shogun Interactive Development. Most rights reserved.
Page generated in 0.14200 seconds with 8 queries