editing hosts file

droidus

New member
Member
Local time
3:30 PM
Messages
29
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 Computer

OS
64 bit
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 Computer

OS
N/A
And please make sure that there is no "#" (pound sign) in front of the "127.0.0.1 localhost) line.
 

My Computer

OS
N/A
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 Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Build
OS
Windows 7 Home Premium 64 bit
CPU
Intel Core i7-4790
Motherboard
GA-Z87X-D3H
Memory
G.SKILL 8GB (2 x 4GB) DDR3 F3-10666CL9D-8GBNT
Graphics Card(s)
AMD Radeon R7 250
Sound Card
Realtek ALC892
Monitor(s) Displays
Samsung UN32EH5000, Dell 1703FPT
Screen Resolution
1920 x 1080, 1280 x 1024
Hard Drives
WD5003AZEX
WD10EZEX
Samsung HD103SJ
Samsung 128 GB 840 PRO
PSU
SeaSonic M12II SS-500GM
Case
Fractal Design Define R4
Cooling
Zalman CNPS9900ALED
Keyboard
Logitech K800
Mouse
Logitech M705
Internet Speed
16 Mbps
Antivirus
Avast
Browser
Firefox
Other Info
Bose Companion 2 Multimedia Speakers

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Bruce ... somewhere in his 40's
OS
Windows 7 Ultimate 32bit SP1
CPU
Intel(R) Core(TM)2 Quad CPU @ 2.40GHz, 2400 MHz
Motherboard
INTEL/D975XBX2
Memory
4 GB
Graphics Card(s)
ATI Radeon HD 2600 Pro
Monitor(s) Displays
Samsung SyncMaster 914v
Screen Resolution
1280 x 1024
Hard Drives
2/500GB each ... ST3500630AS ATA Device.
One is not connected
PSU
Rocketfish 700 W
Case
G.Skill Gigabyte Chassis
Keyboard
Standard PS/2 Keyboard
Mouse
Microsoft PS/2 Mouse
Internet Speed
DSL
Antivirus
Avira Internet Security
Browser
IE 11
Other Info
ATI HDMI Audio
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 Computer

OS
64 bit
If you use Foxfire, yes.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Bruce ... somewhere in his 40's
OS
Windows 7 Ultimate 32bit SP1
CPU
Intel(R) Core(TM)2 Quad CPU @ 2.40GHz, 2400 MHz
Motherboard
INTEL/D975XBX2
Memory
4 GB
Graphics Card(s)
ATI Radeon HD 2600 Pro
Monitor(s) Displays
Samsung SyncMaster 914v
Screen Resolution
1280 x 1024
Hard Drives
2/500GB each ... ST3500630AS ATA Device.
One is not connected
PSU
Rocketfish 700 W
Case
G.Skill Gigabyte Chassis
Keyboard
Standard PS/2 Keyboard
Mouse
Microsoft PS/2 Mouse
Internet Speed
DSL
Antivirus
Avira Internet Security
Browser
IE 11
Other Info
ATI HDMI Audio
IP Address:
93.92.211.11

You can block that IP in Internet Properties --> Security Tab ---> Restricted Sites
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Bruce ... somewhere in his 40's
OS
Windows 7 Ultimate 32bit SP1
CPU
Intel(R) Core(TM)2 Quad CPU @ 2.40GHz, 2400 MHz
Motherboard
INTEL/D975XBX2
Memory
4 GB
Graphics Card(s)
ATI Radeon HD 2600 Pro
Monitor(s) Displays
Samsung SyncMaster 914v
Screen Resolution
1280 x 1024
Hard Drives
2/500GB each ... ST3500630AS ATA Device.
One is not connected
PSU
Rocketfish 700 W
Case
G.Skill Gigabyte Chassis
Keyboard
Standard PS/2 Keyboard
Mouse
Microsoft PS/2 Mouse
Internet Speed
DSL
Antivirus
Avira Internet Security
Browser
IE 11
Other Info
ATI HDMI Audio
If you use Foxfire, yes.

what if i have mbam installed?

also, i can still access asite.com with the code:

Code:
127.0.0.1       localhost
#	::1             localhost

127.0.0.1 asite.com
 
Last edited:

My Computer

OS
64 bit
Your last example has cnn.com (not asite.com)

Add www. to the beginning of asite.com

Close all browsers after updating the HOSTS file.
You may also need to clear Browser temp files - cache, history, etc.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
home built
OS
Multi-Boot W7_Pro_x64 W8.1_Pro_x64 W10_Pro_x64 +Linux_VMs +Chromium_VM
CPU
AMD Athlon II x4 620
Motherboard
Gigabyte GA-MA785G-UD3H
Memory
6GB GSkill DDR2 800
Graphics Card(s)
AMD 4670 GPU + AMD 4200 IGP
Sound Card
on board Realtek ALC889A
Monitor(s) Displays
RCA 40" LCD TV, Insignia 32" LCD TV, HP 15" LCD monitor
Screen Resolution
1680 x 1050
Hard Drives
OCZ Vertex 3 120GB,
Samsung F3 1TB (3),
Several others - WD, Seagate, Hitachi, ...
PSU
Corsair 500 W
Case
Rosewill mid tower
Cooling
CM 90mm rifle
Keyboard
Gyration wireless, Logitech wireless, Dell USB wired
Mouse
Gyration wireless, Logitech wireless, V7 USB wired
Internet Speed
Spectrum - 100Mbps D / 10Mbps U
Antivirus
Avast, MBAM3, EMET, WinPatrol
Browser
Pale Moon, Firefox, IE
Other Info
2 multi-boot PC's
Mainly HTPC/Office/Gen purpose (no gaming).
Trendnet USB KVM.
LG DVD burner/Blue Ray Player.
Tray system for removable SATA backup drives.

Not currently OCd, under-volted.
I use Hybrid sleep, rarely re-boot or shutdown.

Hauppauge HD-PVR, Avermedia PCIe TV Tuner, Hauppauge PCI TV Tuner.
Also run ipconfig /flushdns to remove any local dns cache.
 

My Computer

OS
Windows 7 Ultimate x64
are there any good host text files out there that block bad sites, advertising stuff, etc.?
 

My Computer

OS
64 bit
Did adding www. to the site name and clearing the cache's get the block working with your HOSTS file?
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
home built
OS
Multi-Boot W7_Pro_x64 W8.1_Pro_x64 W10_Pro_x64 +Linux_VMs +Chromium_VM
CPU
AMD Athlon II x4 620
Motherboard
Gigabyte GA-MA785G-UD3H
Memory
6GB GSkill DDR2 800
Graphics Card(s)
AMD 4670 GPU + AMD 4200 IGP
Sound Card
on board Realtek ALC889A
Monitor(s) Displays
RCA 40" LCD TV, Insignia 32" LCD TV, HP 15" LCD monitor
Screen Resolution
1680 x 1050
Hard Drives
OCZ Vertex 3 120GB,
Samsung F3 1TB (3),
Several others - WD, Seagate, Hitachi, ...
PSU
Corsair 500 W
Case
Rosewill mid tower
Cooling
CM 90mm rifle
Keyboard
Gyration wireless, Logitech wireless, Dell USB wired
Mouse
Gyration wireless, Logitech wireless, V7 USB wired
Internet Speed
Spectrum - 100Mbps D / 10Mbps U
Antivirus
Avast, MBAM3, EMET, WinPatrol
Browser
Pale Moon, Firefox, IE
Other Info
2 multi-boot PC's
Mainly HTPC/Office/Gen purpose (no gaming).
Trendnet USB KVM.
LG DVD burner/Blue Ray Player.
Tray system for removable SATA backup drives.

Not currently OCd, under-volted.
I use Hybrid sleep, rarely re-boot or shutdown.

Hauppauge HD-PVR, Avermedia PCIe TV Tuner, Hauppauge PCI TV Tuner.
you might need to clear your registry using 3rd party like ccleaner and can be use to clear all the cookies, temp file, browser history, windows temp file. Let us know if you still access the site.
 

My Computer

OS
Windows 7 x64
Back
Top