How to block Facebook and Youtube in my laptop?
Sponsored Links

Social networking and videos websites, sometimes is a time killer, it might deviate us from our important works that we do with our desktop or laptop. If you are unable to prevent yourself from keep on looking these websites, there is no other way than blocking it. In most of the companies, these kind of websites are blocked using firewalls, which will be effected on all computers in the network. But here we are discussing about blocking these kind of websites in your personal laptop or individual computer.
Facebook and YouTube are arguably the most distracting websites. If you feel you cannot move forward without blocking these websites, here is an easy method. Which does not require any additional software installation or special cost.
If you are using Windows XP/Vista/7 just go to the run and open below folder:
C:\WINDOWS\system32\drivers\etc
you can find a file called 'Hosts'. just copy this file and paste in desktop or somewhere else. Now rename the file (from desktop) to 'hosts.txt' and open the file in notepad. Your file will be looking like this:

Now copy the list given below just after the last line in the hosts file:
01 # Block Websites
02 127.0.0.1 www.facebook.com
03 127.0.0.1 facebook.com
04 127.0.0.1 static.ak.fbcdn.net
05 127.0.0.1 www.static.ak.fbcdn.net
06 127.0.0.1 login.facebook.com
07 127.0.0.1 www.login.facebook.com
08 127.0.0.1 fbcdn.net
09 127.0.0.1 www.fbcdn.net
10 127.0.0.1 fbcdn.com
11 127.0.0.1 www.fbcdn.com
12 127.0.0.1 static.ak.connect.facebook.com
13 127.0.0.1 www.static.ak.connect.facebook.com
14 127.0.0.1 www.youtube.com
15 127.0.0.1 youtube.com
02 127.0.0.1 www.facebook.com
03 127.0.0.1 facebook.com
04 127.0.0.1 static.ak.fbcdn.net
05 127.0.0.1 www.static.ak.fbcdn.net
06 127.0.0.1 login.facebook.com
07 127.0.0.1 www.login.facebook.com
08 127.0.0.1 fbcdn.net
09 127.0.0.1 www.fbcdn.net
10 127.0.0.1 fbcdn.com
11 127.0.0.1 www.fbcdn.com
12 127.0.0.1 static.ak.connect.facebook.com
13 127.0.0.1 www.static.ak.connect.facebook.com
14 127.0.0.1 www.youtube.com
15 127.0.0.1 youtube.com
Now save the hosts file and remove the .txt extension, and copy the hosts file you have modified to the earlier locaiton: C:\WINDOWS\system32\drivers\etc
Once you get the dialogue box, opt to replace the existing file with the new file.
Now run the below commands in CMD:
ipconfig /flushdns
ipconfig /registerdns
Now open the browser and check if the websites are apprearing. If it still appearing just reboot your computer and check again. It worked?
Remember, if you dont want to block Youtube, you can remove last two entries in the hosts file, and if you want to block only Youtube not Facebook, you can simply remove the entries from 2 to 13!!
Like this post? please share and promote! by clicking below icons: