-3

I have seen a blog saying that we can block some websites using our hosts file. I have tried the same (shown below), but failed. Entry added in host file as below: 127.0.0.1 www.google.com

I tried clearing the cache and tried it with a new website (which I have never been browsed before), but I get the website, making the blog content as false. Am I doing anything wrong here? Or is that something wrong with the blog content?

1
  • but I get the website, making the blog content as false - That statement makes no sense. Also, the entry you posted in your question will only resolve www.google.com to 127.0.0.1. It won't work for any other name. Did you put the FQDN of the other web site in your hosts file?
    – joeqwerty
    Jun 23, 2014 at 12:54

1 Answer 1

8

Don't do this. Use a proper content filter, you'll be much happier in the long run than managing a mess of individual hosts files.

2
  • I have done this for testing purpose, not in real scenario. Just tested what I saw..
    – Vysakh
    Jun 23, 2014 at 11:47
  • 3
    Questions asked on Server Fault should be about practical scenarios that you face in a real world professional environment. Refer it How to Ask and help center for more info.
    – MDMarra
    Jun 23, 2014 at 11:48

Not the answer you're looking for? Browse other questions tagged .