9

I am trying to block social media and news websites on my local machine (Windows 7).

I added the below lines into my hosts file:

127.0.0.1 www.thatstamil.com
127.0.0.1 www.facebook.com

In that way Facebook is successfully blocked. But thatstamil.com is still accessible. How do I block this site?

  • Try putting in 127.0.0.1 174.142.56.12 and 127.0.0.1 119.81.98.52 – StBlade Jul 30 '15 at 11:21
  • @StBlade added and reboot my machine, but still its accessible. :-( – Butterfly Jul 30 '15 at 11:27
  • 2
    @StBlade You can't use the HOSTS file to redirect one IP address to another IP address. You can just say if there's a request for url.com to go to the new IP address, 127.0.0.1 – Canadian Luke Jul 30 '15 at 18:00
18

Try removing the www. Just:

127.0.0.1 thatstamil.com
127.0.0.1 tamil.oneindia.com
127.0.0.1 facebook.com
| improve this answer | |
  • its working fantastic :-) – Butterfly Jul 30 '15 at 12:05
4

If you put in www.thatstamil.com, but are accessing thatstamil.com, the latter is not the same fully qualified domain name (fqdn) as www.thatstamil.com. Try using the following:

127.0.0.1 www.thatstamil.com
127.0.0.1 thatstamil.com
| improve this answer | |
  • No, I tried all the compinations 127.0.0.1 174.142.56.12 127.0.0.1 119.81.98.52 127.0.0.1 www.thatstamil.com 127.0.0.1 thatstamil.com 127.0.0.1 www.tamil.oneindia.com 127.0.0.1 tamil.oneindia.com – Butterfly Jul 30 '15 at 11:57
  • facebook successfully blocked, and other site was also blocked successfully. Only this thatstamil.com is not able to block – Butterfly Jul 30 '15 at 11:57
  • 3
    Putting in IP addresses, such as 174.142.56.12, shouldn't help, since the system won't consult the file to look up up an IP address. Perhaps there is some DNS caching factor making a difference. You can flush the cache by issuing the command ipconfig /flushdns at an administrator command prompt. If you use Chrome, you can use the instructions in How to Clear the Google Chrome DNS cache on Windows. Have you tried a different browser on the system to see if the issue is browser-specific? Also try a reboot. – moonpoint Jul 30 '15 at 12:52
2

Try to block tamil.oneindia.com instead of thatstamil.

| improve this answer | |
  • I tried it too.. – Butterfly Jul 30 '15 at 11:08
0

Some versions of Firefox have their own DNS resolver and/or caching, which can cause configuration changes to the DNS resolver built into the OS to have a only a delayed effect or even no effect at all.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.