Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: editing hosts file


28 Nov 2012   #1

64 bit
 
 
editing hosts file

I am trying to modify the hosts file so that it will block certain websites. I tried the following code, but it does not seem to do anything when i visit the website (as in, the page loads normally):

Code:
127.0.0.1 asite.com
what am i doing wrong? i made sure i saved before viewing the website.

My System SpecsSystem Spec
.

28 Nov 2012   #2

Windows 7 Home Premium 64-bit SP1
 
 

In the hosts file, before the "127.0.0.1 asite.com" line, you need to put "127.0.0.1 localhost" to tell the machine that asite.com = 127.0.0.1 = localhost.
My System SpecsSystem Spec
28 Nov 2012   #3

Windows 7 Home Premium 64-bit SP1
 
 

And please make sure that there is no "#" (pound sign) in front of the "127.0.0.1 localhost) line.
My System SpecsSystem Spec
.


28 Nov 2012   #4

Windows 7 x64
 
 

OR add ::1 localhost.
My System SpecsSystem Spec
28 Nov 2012   #5

Windows 7 Home Premium 64-bit SP1
 
 

Yup.
My System SpecsSystem Spec
28 Nov 2012   #6

Windows 7 Home Premium 64 bit
 
 

The Host file hast a lot more competition these days when it comes to site blocking.

Routers.
Avast
Google
OpenDNS

The free version of Avast will block sites. You can also use a password to protect the Avast settings from being changed.
My System SpecsSystem Spec
29 Nov 2012   #7
Microsoft MVP

Windows 7 Ultimate 32bit SP1
 
 

You can also use SpywareBlaster to protect your Hosts file along with protecting your Homepage and not allowing a drive-by ActiveX to hijack your computer.

Read this: Using SpywareBlaster to protect your computer from Spyware, Hijackers, and Malware
My System SpecsSystem Spec
30 Nov 2012   #8

64 bit
 
 

i have:

Code:
127.0.0.1       localhost
#	::1             localhost

127.0.0.1 asite.com
I go to the site, and it still loads.
My System SpecsSystem Spec
30 Nov 2012   #9

64 bit
 
 

Quote   Quote: Originally Posted by Jacee View Post
You can also use SpywareBlaster to protect your Hosts file along with protecting your Homepage and not allowing a drive-by ActiveX to hijack your computer.

Read this: Using SpywareBlaster to protect your computer from Spyware, Hijackers, and Malware
i don't use IE that much. would I still need this?
My System SpecsSystem Spec
30 Nov 2012   #10
Microsoft MVP

Windows 7 Ultimate 32bit SP1
 
 

If you use Foxfire, yes.
My System SpecsSystem Spec
Reply

 editing hosts file




Thread Tools



Similar help and support threads for2: editing hosts file
Thread Forum
Hosts File General Discussion
Solved Hosts file editing: save problem General Discussion
HOSTS File - Create a "Edit HOSTS file" Shortcut Tutorials
Hosts File Editing Network & Sharing
BSOD after editing hosts file and running warcraft 3? BSOD Help and Support

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 09:09 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33