How To Block Facebook From Your Computer?

how to block facebook from your computer How To Block Facebook From Your Computer?

Facebook is a really great social networking site. It even ranked as the top ten famous website visited by people from around the world everyday according to Alexa. But Facebook sometimes can reduce your productivity as you can easily addicted to it. So, the easiest way to cope with this problems is by blocking your computer from accessing Facebook.

This is a really easy tutorial for you to follow. First, go to your computer Start button > All programs > Accessories > Command Prompt.

command prompt How To Block Facebook From Your Computer?

Then, write this command line on your command prompt interface to block Facebook from your computer.

notepad C:\WINDOWS\system32\drivers\etc\hosts

command line How To Block Facebook From Your Computer?

Then, a notepad will appeared. All you have to do now is to copy and paste the following codes into notepad to block Facebook from your computer. Just paste this code that will block Facebook from your computer: m

Then close the notepad and click save. Now try to refresh your web browsers, and Facebook will be appeared as unavailable since we have already block the computer from accessing the web address. You also can use this trick to block your computer from accessing other website.

In case you wanted to login back to Facebook, all you have to do is delete back all the codes above and your computer will be able to access Facebook web address again.


  1. kura2cute

    macam ni la gamaknye dorg block fesbuk kt kolej sy.. kalau nk enable balik fb ni kena buang yg host tu ke?
    .-= kura2cute´s last blog ..International Education of Exceptional Value =-.

  2. Syuxx

    Yup, you have to remove it first for it to work again.

  3. wzy

    hey, how come i cannot save the notepad file after editing it?

  4. Syuxx

    Just press CTRL+S on your keyboard. It also will save the data :)

  5. wzy

    but it wouldn't let me

  6. Syuxx

    Can you paste it here the whole things that you have in that notepad?

  7. wzy

    # Copyright (c) 1993-2006 Microsoft Corp.
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    # For example:
    # # source server
    # # x client host localhost
    ::1 localhost

  8. wzy

    I haven't added anything, but still, i can't save it

  9. Syuxx

    Hmm, thats kinda weird because I still can save it in my computer and other computers in my house.
    Maybe it is your computer OS problems.
    Sorry that I can't help for that.

  10. wzy


  11. cameron

    can someone help me i blocked facebook but i can't unblock it? because i can't find where i saved it to lol can someone help me asap?

  12. Syuxx


    Hmm, lets try this method if you wanna find the file where you need to paste that code.
    I assume that you are using Windows XP.

    First, go to My Computer and click on C:/ drive. Then, open the Windows folder. After that, search for system32 folder. Open that folder and search for drivers folder. Inside that folder, open the etc folder. Then click on the hosts file. Click open with notepad.

    Then, paste the code given above. Press X at the notepad and save it.

  13. cameron

    well i can't find it and i really wanna no how to delete it do you reckon you can teamview it or possibly? give me a more detailed description?. please

  14. cameron

    omg thank you so much i got it your a pro how did you get so good with computer's?

  15. cameron

    omg man i got get it man i found it but it's not working i found what i needed to find but its not working it say's teamview is currently on running this site can you please give me a tip again?

  16. Syuxx

    Are using the teamview software? Try uninstall it.

  17. cameron

    it worked good boy nice job how u soo good?

  18. Syuxx

    Your welcome :)
    I just read a lot and dare to try them all.
    Try and error. It is an awesome process lol ^^

  19. Elmo334

    wow it really works :D it feels so good to be free of fb -OMG facts

  20. Hella

    so how do i… unblock facebook now?

  21. Syuxx

    just delete back those website in the host file

  22. Syuxx

    Just delete back the site from your lists.

  23. zee

    how block facebbook

  24. yesmine

    hey now can i get it back now.. i deleted all those sites but its still not working :(

  25. yesmine

    is there anyway to get it back plzzz someone help… omg what the hell did i do :'( i feel like crying now

  26. Syuxx

    All you have to do is to revert back the process above.
    Then try to press CTRL+F5 on your keyboards.
    If still didnt work, clear your browsers cache (firefox) at Tools > Advanced > Network > Clear Now

  27. kate

    some one please tell me how to do it -it wont work

  28. Simpleguy1981

    Mine looks like this now, I saved it but when I refresh facebook, it's still there. Anything wrong with what I did?

    # Copyright (c) 1993-1999 Microsoft Corp.
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    # For example:
    # # source server
    # # x client host m

  29. YODUDE

    Yeah, nice work man :)

  30. torrentaddict

    this is only for windows xp.. trust me :)

  31. Syuxx

    Yeah, it doesn't work on other OS.

  32. Krysteldawn_10

    it's true???

  33. Peonz

    please help me i delete the code then nothing happen the facebook site is still unavailable can you help me how?

  34. Peon

    please help me i delete the code then nothing happen the facebook site is still unavailable can you help me how?

  35. Qaylives

    open the notepad as administrator

  36. GEEX

    please help me unblock fb :(( i followed your instructions but nothing happened. :O

  37. GeeX

    what code would i paste?

  38. Zoul

    so its gonna work with another social networking too??
    like myspace,friendster,tagged??
    same method also?please help me..i want block all those sosial networking..

  39. Syuxx


    Yeah, it work with other social networking site too.
    All you have to do is add another like

    at the bottom of the lists.

  40. kinga

    I have a problem, and my wish is to help me somehow. My name is Kinga , i have account on Facebook wich i suspended right now, because there is a Facebook user, who haz several accounts, and he use some phishing programs to still other people accounts and passwords. This i know for sure, because he broke my account to.

    I really want u to do something about that, i wanna ask u to block this user for not getting acces to Facebook.
    This user name is Razvan Timbus, it is from Romania, and he also have this accounts with this names: Razvan Razvi; Cinthya Maria; Soos Maria; Ala Bala Unu; Spartacus Mures; Din Mures; Cerchez Marius; Ferma Mea; Julin Cu.

    Please help me somehow and im waiting an answer.

  41. Snappyurls

    I wrote a script which will block automatically in the host file and also in restricted sites for IE.

    Just copy the code into a notepad and save it as *.vbs (* = whatever name you wish) then run it from an account with admin access.

    Block Facebook

    hope everyone finds this useful

  42. shonibantot

    what can i write on the notepad when other sites

  43. 222223


  44. Siba

    I can’t save the settings on my computer, it won’t allow me. says i have to contact my administrator. please help.

  45. Kiril

    Siba, I am experiencing same problems like you. Luckily my friend recommended me FB Limiter which perfectly solved my needs.

  46. benny m

    Thanks bro.

    Ya saved me from the net Kraaken.

  47. zackismul

    hai.. my office use window 98.. n i use opera for the internet.. n now facebook is block.. so how i want to unblock facebook..?

  48. zackismul

    hmm.. no one answer.. look like everyone don know what to do.. hahaha…

  49. ariffudin eri

    aku setan

  50. Jo

    Thankyou thankyou thankyou thankyou! My partner has become obsessed with ***ing facebook but now it’s gone and I have blamed a virus! Kudos to you guys and massive kisses from me. Thanks! xxxxxx

  51. Sonu

    How to unblock facebook using this method. If i remove from the local host list , will my facebook start working

  52. Christelle Pryde

    …. hahaha… wawawawawa…

  53. Christelle Pryde


  54. trish kamau

    hey does this work on windows 2002 service pack 2 coz i tried and it ain’t workin on my machine.

  55. eli

    Since leaving Facebook is so hard, we figured – why bother? Instead, a day-off might do us some good. Tuesday seems like a good day for that. Who’s with us?

  56. Jessy

    I found that working with mentioned settings is little too hard for me, it simply won’t work. Also I just wanted to block facebook during Mon-Fri since my kid goes to school then, but to leave him one hour and weekends free to use Fb. Since I don’t see myself modifying something all the time I would recommend this software to block facebook. It is not free but very cheap and saves time and trouble.

  57. Jessy

    Sorry missed a link to software… FB Limiter.

  58. mandar jagtap

    it really helped me getting rid of facebook


  59. hackerz

    dload n run..
    block fb entirely

  60. Odie Simpson

    I tried to block facebook using this method, however, somehow it removes itself from the hosts file? Any ideas?

  61. Magento Themes

    That seems to be a big task to me as I am not fond of command prompt. But its also looks to be a good tool for me to block facebook, which I do not like.

  62. krisnasingh

    facebook block

  63. bunngoun

    how to run facebook on year computer?

  64. bunngoun

    how to run facebook on my computer ?

  65. Block Facebook

    You can block facebook with tool fbblocker

  66. Block Facebook

    You can block facebook with tool fblock You can block facebook with tool fbblocker

  67. Jenny Hudson

    I try to block facebook with FB Blocker.
    maybe you should try this one. ;)

  68. fuck facebook

    Nobody is gonna pay $19.95 for your facebook blocker, cunt.
    Suck my ass Block Facebook and Jenny Hudson.

    Please add twitter DNS too.

  69. mira

    plzzzz help me…. macm mana sy nak log in fb balik…sy x pndai pasal program computer ni… plssss help me….

  70. biz

    thanks a lot. It really works n im happy to do something to block FB in my office. My staff seems to be addicted to FB rather than doing their job. All the best to you. May GOD bless your kindness!

  71. Tommy Gonzalez

    Can you tell me how to block twitter too?

  72. Roshan


  73. Kevin H

    i got it to work on internet explorer
    how do i get it to work on google chrome?

  74. Saravana

    If the notepad does not let you save, the short answer is you need to open notepad or the command prompt, by running as administrator, and it will let you save.

    Long answer:

    1. Start->All programs->Accessories
    2. Right click on notepad->Run as Administrator
    3. Select Yes for the dialog with *ding* sound
    4. Then Select File -> Open -> My Computer -> C: -> Windows -> System32 -> drivers -> etc
    5. Now you won’t see anything in there. So, see at the bottom where it says Text Documents and change that to All Files
    6. Now you will see hosts
    7. Double click and open that
    8. put all those lines above.
    9. Now Save and it will let you save.

    Hope this helps!

  75. andrew

    i did all still its working buddy

  76. Bob

    Oh and strangely enough you have this site connecting to SpyBook?
    This method does NOT block facebook, if you come to a site like this that links to facebook.
    You will see in your firewall an IP like this,, and facebook is connecting to your pc.
    The only way to stop it is to make up firewall rules for ALL of facebook domains and IP ranges which are so many that this would take you a long time.
    They have made it virtually impossible to stop SpyBook spying on you.

  77. Christelle Pryde


  78. hema

    hey i applied it and facebook is blocked but now i want to unblock facebook but its not working. i tried to findout that notepad but not getting it. please help.

  79. Tin

    w0w it works!

  80. Tin

    but yeah how to unblock? where can we find that notepad we saved?

  81. shashi802

    hey brother…i m sorry but im unable to save the text file without extension…and if i do it saves in my documents…i don know what to do…plz help..i m using win 7 ultimate..

  82. Fadli

    if u just want to block facebook for other ppl using it other then u, there is an easy way for u to open it without redo the whole things… all u have to do is go to its like a backdoor for web blocker

  83. Fadli

    for window 7 user…

    Here is the guide..

    1. Close user account control (restart needed)
    2. open the properties for the host file
    3. open the security page
    4. Click advanced
    5. Open the ownder page then edit it. then pick
    your pc name that’s on the
    list.Then close the properties
    6. Repeat step 1-3
    7. Click edit and set User(Yourpcname). give full
    control for the user. then its done.

    P/s: I use this method on my laptop and its 100% working but it isnt on my friend… if it doesnt work try to give permission for the whole folder.

  84. Fadli

    btw, the host file is at C:\Windows\System32\drivers\etc

  85. joban

    block facebook

  86. Fadli


  87. lolz pro

    help me my friend’s facebook cannot acces because someone had hacked her facebook..what should i do????

  88. PC Wizard

    Block Facebook
    Download n run

  89. noname


  90. hehe

    nothing happens

  91. ulo moh!!!!

    ga pinataka lang kamo yah, wala man may gagana sa ginapanghambal nyu…

    ilonggo ni… jus understand it!!!

  92. Vonyle

    can you please paste the command prompt of notepad c:\WINDOWS\system32\drivers\etc\hosts i kind deleted it. please thanks

  93. Block facebook

    Check out this video on how to block facebook:

  94. secret


  95. ahem

    to unblock facebook in your computer. just delete what you are written in the hosts file, click file then save..try to open facebook with any browser..if it doesn’t work…restart your computer….

  96. maeangel39

    pls help i blocked fb b4 but now i cant unblocked it i want to delete the codes but i cant find it im using window 7

  97. maeangel39

    saravana i follow ur instuction how to block fb and it works for me…now my problem is i cant unblock it pls help

  98. eunice


  99. eunice

    sbi ko mhal mo si kent chuy combater

  100. Soundproof Drywall

    I do know this really is off subject, but I to find out that which you all consider it. The gangs in Mexico are acquiring crazy. Did you see the information about the police who found a woman’s decapitated body in a Mexican border town on Saturday, alongside a handwritten indicator saying she was killed in retaliation for her postings on the social networking site. So insane! What do you all take into consideration it?

  101. abc works…Thanks..Really..:)

  102. My brother suggested I would possibly like this website. He was once entirely right. This publish truly made my day. You can not imagine just how a lot time I had spent for this info! Thank you!

  103. vinu

    thxxx working

  104. s m basha

    respeted sir

    in my home facebook is more popular becuase of that my children are not consentriting in studys

    becuase of that i want block facebook my desktop

    please give some sugesstion and prosudcer

    tanking you sir

  105. fhk;cfh

    GUYS, dont use this ! it wont let you unblock it back so IM WARNING YOU !

  106. hot girl

    hoe to delete all the site

  107. hot girl

    how to delete all the sit
    pls help me
    pls tell me

  108. Pv4

    Hey very cool web site!! Man .. Excellent .. Superb .. I’ll bookmark your blog and take the feeds also?I’m happy to find so many useful info here within the put up, we’d like work out extra strategies in this regard, thanks for sharing. . . . . .

  109. Usually I do not learn article on blogs, however I wish to say that this write-up very compelled me to try and do it! Your writing taste has been amazed me. Thank you, very great article.

  110. prince

    nice it work with my computer thanks for posting this

  111. [...] computer. Then upload it to Facebook just how you would any other picture.Powered by Yahoo! AnswersCarol asks…How can i find stored passwords from IE or FireFox on my computer?I got a really big pr…-content">How can i find stored passwords from IE or FireFox on my computer?I got a really big [...]

  112. Himal

    it doesn’t work for

  113. Katie


    Ive tried doing this through command promt although it appears with the message ‘Cannot find file path’
    Although I can open up the file path manually by going through the C drive, WINDOWS … etc.
    Am I missing a really obviouse step somewhere or does my unlucky luck with electronics strike again? haha
    Thank you for your time

  114. Sarah


    I have a huge problem and I was hoping that you might be able to help me block a site/game using this method. This site/game has a regular site but is also accessed via a telnet client to game play. Even though this is a game it is a very adult rp game which is refereed to as mudding this site/game even tho it is claimed it is family oriented it had not only major violence it also has online sex (since everything it typed via telnet the sex can get pretty realistic), even though my son is 12 and makes it known other gamers as they refer to themselves don’t seem to care and pursue my son in game and off sexually. I have tried everything I can to try to block this site/game to no avail and was wondering if you can help me. This site/game is destroying my family due to my sons addiction to it, and the various violence and sexual content. As I said the game has it’s own website, how ever the actual game play is accessed via telnet client via the site and it’s ports etc:

    the log in looks like this on the client:

    host: (which is the site)@ —
    Port: (one of two port numbers can be inserted here to access the mud)

    what do I type in telnet to block this site and the ports so that my child won’t be able to access this very adult game?

    I hope that you can please help me figure out how to block this horrible site, as the next step will be disconecting the internet if i cant figure out how to block it.

    Thank you

  115. Basheer

    It is not working in Google chrome

  116. Luki

    Finally, I can block it!!
    blocking using;

    only… doesn’t work… seriously it’s the final n i’m still playing with it, this had got to be blocked in any way…lol

  117. raja


  118. raja

    plz block

  119. raja

    block my computer site facebook plz

  120. Raag soni

    great job….

  121. Raag soni

    hosts file-open it in notepad. localhost
    ur fb blockk….Raja

  122. zora

    do we have to backup the host???

  123. I’ll right away clutch your rss as I can’t find your e-mail subscription link or e-newsletter service. Do you have any? Kindly permit me recognise so that I could subscribe. Thanks.

  124. rasel

    hi me

  125. raselahmed

    My Computer

  126. thinagaran

    i want open new facebook

  127. strapless wedding dresses cheap

    The next time Someone said your blog post, Hopefully the product is not going to sadden me and my friends up to this amazing tool. I am talking about, I know it was the actual decision to examine, nevertheless i literally decided you will include whatever compelling to express. All the When i read is definitely a several crying with regard to something that you may possibly restoration once you were not really crowded interested in notice.

  128. sam perez nonato

    wg na

  129. sam perez nonato

    ang panget ng facebook

  130. Kamal

    How to block this side from the internet computer?
    please guide me ok

  131. Kari Dungee

    |I don’t ordinarily interrupt amazing conversations like this with my own personal issues, but I really need the help of whoever willing to lend me a hand. I’m conducting some research employing and I was wondering if anyone here has employed them in the past. I am seeking both the positive and negative facets of their business. Please make contact with me as quickly as possible for this is vital.Thank you.

  132. Adam

    Hi, the best piece of software that I have used to block social network websites is the software from; I have young children and this software allows me (as the parent) to specify a password that must be used to gain access back to the websites, works a treat!

    Windows only though unfortunately :(

  133. khatri sanju

    i dont want to use facebook

  134. khatri sanju

    dont want t use facebook

  135. kentoinkz

    1st try was successful , but the next time i open it , its no longer blocked ..may i know why ?

  136. Rehan

    I guess u are using vista or win 7 if so , u need to iopen notepad with administrator privillage, just goto start menu right click on notepad and open with administrative privillage, now open a file path from notepad : C:\Windows\system32\drivers\etc and select all files from file type menu. now open hosts file . Hope this will save now after changes.

  137. Lona

    I do trust all the concepts you’ve presented to your post. They’re very
    convincing and will certainly work. Still, the posts are very short for newbies.
    Could you please prolong them a bit from subsequent time?
    Thanks for the post.

Leave a Reply