Jump to content

Hosts file rendered useless?


Recommended Posts

I've added these to the hosts file to test verify it's working and can still access those sites! 

127.0.0.1 facebook.com
0.0.0.0 youtube.com

I tried adding the hosts file to Surf Protection but it prompts this.

 

The file is the bog standard Windows one with those two entires added.

Emsi-Hosts.png

Link to comment
Share on other sites

The HOSTS file only blocks the domain or subdomain you enter. If you enter youtube.com then it will only block youtube.com, and it will not block www.youtube.com or any other subdomain at youtube.com. So, a correct HOSTS file would need to contain something like the following:

0.0.0.0			youtube.com
0.0.0.0			www.youtube.com
0.0.0.0			m.youtube.com
As for why it wouldn't import, could you ZIP the HOSTS file or save it as a Text File and attach it to a reply so that I can take a look at it? There may be something wrong with the file.
Link to comment
Share on other sites

The HOSTS file only blocks the domain or subdomain you enter. If you enter youtube.com then it will only block youtube.com, and it will not block www.youtube.com or any other subdomain at youtube.com. So, a correct HOSTS file would need to contain something like the following:

 

0.0.0.0			youtube.com
0.0.0.0			www.youtube.com
0.0.0.0			m.youtube.com
As for why it wouldn't import, could you ZIP the HOSTS file or save it as a Text File and attach it to a reply so that I can take a look at it? There may be something wrong with the file.

 

I figured out what was wrong with my hosts file! I had two domains on one line.

127.0.0.1 domain1.com domain2.com

What's the main difference between 127.0.0.1 and 0.0.0.0 anyways?

Link to comment
Share on other sites

0.0.0.0 is not a real IP address, and thus no attempt will be made to connect to that address (the connection attempt errors out instead). 127.0.0.1 is a real IP address, and since an attempt will be made to connect to that address and determine whether or not there is a server listening at that address on the port that the application that is trying to load data from it connects over, many people believe that this will reduce performance slightly for each blocked connection, and thus 0.0.0.0 is sometimes instead to avoid that.

As for whether or not there is any real performance difference, I'm sure that's debatable. I've never tested it, and the major HOSTS files (hpHosts, MVPS-HOSTS, etc) all use 127.0.0.1 if I am not mistaken, so it's possible that there is no noticeable performance difference or that or that the benefits aren't worth using it for some other reason (possibly explained in the link Aura posted, which I didn't have time to fully read).

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...