How To Block Facebook Using Hosts File

Facebook is the most visited social networking site in the world with more than 400 Millions of users. Based on some research, people log on to Facebook 4 times a day and spend at least 7 hours checking with friends news updates including checking pages with large number of Facebook likes, etc. Some fears Facebook will reduce human productivity and may lead to addictive behavior. If you are searching for the most simple ways to block Facebook, this post will absolutely helps you.

In this post, I will show you simple and quickest ways to block Facebook by using Hosts file. Enjoy!

Simple Steps to Block Facebook

1. Go to Start > Run or press Windows + R

How To Block Facebook Using Hosts File - Step 1

2. Copy these string into Run fields.

How To Block Facebook Using Hosts File - Step 2

Please copy the string based on your Operating System. You can refer below:

Windows XP, Vista and Windows 7
C:\WINDOWS\system32\drivers\etc\hosts

Windows 2000
C:\WINNT\system32\drivers\etc\hosts

Windows 98/ME
C:\WINDOWS\hosts

3. Click Enter and then open the hosts file using your preferred text editor. I used Notepad.

How To Block Facebook Using Hosts File - Step 3

4. Copy and Paste the following into the Hosts file after 127.0.0.1 localhost

# Block Facebook
127.0.0.1 www.facebook.com
127.0.0.1 facebook.com
127.0.0.1 static.ak.fbcdn.net
127.0.0.1 www.static.ak.fbcdn.net
127.0.0.1 login.facebook.com
127.0.0.1 www.login.facebook.com
127.0.0.1 fbcdn.net
127.0.0.1 www.fbcdn.net
127.0.0.1 fbcdn.com
127.0.0.1 www.fbcdn.com
127.0.0.1 static.ak.connect.facebook.com
127.0.0.1 www.static.ak.connect.facebook.com

How To Block Facebook Using Hosts File - Step 4

5. Save your Hosts file and your are done! You can try to open Facebook and if there is still no effect, restart your workstation and retry again.

Attention!
Please make a backup of your hosts file in case of anything happened

About Author
Juan Harris is a Web Designer, Photographer and Blogger at Cariblogger.com. He love to daydreaming while drinking fruit juice.

The Tags: , , , , ,
Incoming Search: block facebook hosts, how to block facebook, block facebook hosts file, how to block facebook using host file, block facebook host file, block facebook using host file, facebook hosts, block facebook host, host facebook, facebook hosts file, hosts facebook, block facebook with hosts file, hosts file block facebook, how to block facebook in host file, how to block facebook with host file, block facebook using hosts file, host file block facebook, host block facebook, block facebook in host file, hosts block facebook
  • Pingback: How To Stop Yourself From Facebook-Stalking Your Ex

  • Pingback: Just One Night Love » Blog Archive » How To Stop Yourself From Facebook-Stalking Your Ex

  • http://www.intotemptation.net Jeff Schult

    OK — so to make this complete, what you really need is a “Like” button for Facebook on the bottom of the post.

    L.o.l …

    • Cari

      LOL.. definitely Jeff..

      • Guest

        ckemi jam tahir doda djali i hakik dodes jeton perkohsisht ne tirane po te shpise i kam ne peshkopi …. jam krenar me prinderit e mi por me shum me mamin si e kam si shpirt e puth nga ktu ku jam dhe i them se e dua fort ,………………. te dua mami ……..

  • rajbir

    How To unBlock Facebook Using Hosts File. if using Trend Micro Worry-Free Business Security.

  • Pingback: The World Is Obsessed With Facebook - Page 2 - Stormfront

  • Hugo

    will this block the https://facebulls**t.com?

    how to block those ?

  • http://www.esoterista.com ArtGoddess

    I’m wondering if this method also blocks Facebook when requesting from this url:

    http://www.www.facebook.com

    Seems FB has configured subdomains that way in order to avoid be blocking by hosts file.

    How can this url system be blocked also?

    Thank you!

  • poo

    Cannot block!!! WHY?

  • fahd4007

    those r good url 4 blocking facebook

    2 127.0.0.1 http://www.facebook.com
    03 127.0.0.1 facebook.com
    04 127.0.0.1 static.ak.fbcdn.net
    05 127.0.0.1 http://www.static.ak.fbcdn.net
    06 127.0.0.1 login.facebook.com
    07 127.0.0.1 http://www.login.facebook.com
    08 127.0.0.1 fbcdn.net
    09 127.0.0.1 http://www.fbcdn.net
    10 127.0.0.1 fbcdn.com
    11 127.0.0.1 http://www.fbcdn.com
    12 127.0.0.1 static.ak.connect.facebook.com
    13 127.0.0.1 http://www.static.ak.connect.facebook.com

  • Pingback: How many times a day do you check your email? - Page 3 - The Wholesale Forums

  • Pingback: 7 Tips for a Healthy Break-Up | My Journey To Self- Actualization

  • http://www.inteldaily.com jorge wiggum

    Great advice, nice method. Only thing to nitpick is, get rid of the line numbers in the listing of IP mappings you tell folks to cut and paste. The line numbers, you don’t want in there. Had to manually edit them out.
    And btw, you have UNIX to thank for “the hosts file” .. which in the unix structure resides at /etc/hosts
    .. UNIX, developed by Ma Bell and DARPA (YOUR tax money).. the modern version of which is LINUX (www.distrowatch.com) … anyone paying money for a Window$ license is nuts! ESPECIALLY bloated government idiots!

  • http://www.osattack.com Paul

    On top of this you can also move the location of the hosts file. Change this registry key to the location of your choice and move all contents of the “etc” directory to that location.

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\DataBasePath

  • sweety

    i hate to block fb but if i see how to block it i can know how to unblock it now i know how to unblock it i am so happy

  • Sam

    I did all the steps but when i want to save, it says i can not save it because im not the administrator although i was able to work in the administrator account, so can you solve this for me please, thanks

    • Cari

      Maybe you should run the program as an administrator 1st

  • Hemal

    TankyouTankyouTankyouTankyouTankyouTankyou

  • http://www.beitcertified.com/ BrainDumps

    such a long process it is

  • Pingback: I wish I could draw | A (usually) visual blog to share my work and things that other artists create.

  • Arya

    Dude,You should enter the ip address also

  • LarryX

    How can this url system be blocked also?

    facebook get registered this and more http://www.www.www names…

    last name cheked:
    http://www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.www.facebook.com

    if you add one www. to this adress – it not work….

    al other combination like:
    http://www.www.facwebook.com
    http://www.www.www.facebook.com
    http://www.www.www.www.faccebook.com
    and. ….. blaq bla bla ………

    just be added manually in your host file…
    but FACEBOOK have a https:// access also
    and some other way to access….

    you cand find and add it manually…

    good luck…
    Larry

  • fyidudes

    if you use 0.0.0.0 instead of 127.0.0.1 windows will simply drop the packet instead of trying to resolve it. This will prevent any delays or timeouts, and will instead simply not render the page pretty much instantaneously. 0.0.0.0 is an invalid address so windows just drops it.

  • Pingback: Anonymous

  • Anonymous

    Can someone tell me how to block the m.facebook.com

  • http://dacsantaynguyen.vn Nam Plus

    Thanks, but not work for this way.

  • http://hajka.rs/izvori/RTV vesti srbija

    I really love your site.. Pleasant colors & theme. Did you develop this
    website yourself? Please reply back as I’m wanting to create my own website and would love to find out where you got this from or what the theme is named. Kudos!

  • aacs

    Thx so much for this!I have tried multiple softwares in an attemp to block Facebook to my children but non of them did the trick. This is all i needed. Simple

  • jewby

    @aacs : that won’t work for long, they will use proxy sites or so.

  • Rebecca

    Can I use these steps to block a person’s name from appearing on my facebook search box? I don’t want to add them to my block list but I don’t want them to pop up in a search. We are not friends. I also don’t want to completely block facebook.

  • http://fletchertoll.com/index.php?action=profile;u=16126 Vinamra Koshy

    Hello there! Do you know if they make any plugins to safeguard against hackers?

    I’m kinda paranoid about losing everything I’ve worked hard on.
    Any recommendations?

  • jayesh

    thnx a lot. . .

  • Pingback: InfoSec Institute Resources – Raising a Rogue Access Point

  • K

    How to stop other person to change host file?
    Other person chage host file and can access facebook?
    Any Password facillity to stop https://www.facebook.com

  • Bichitra

    I need to blook https://www.facebook.com

  • whatthebleep

    Fb is fascist.

  • unix

    i am getting a problem while saving the host file…it says cannot create dat path..wat shoud i do?

    • http://cariblogger.com Juan Harris

      You will need a administrator right to save a host file.

    • http://cariblogger.com Carl Harris

      You need administrator access to save host file.

  • CB

    can I set a time limit on facebook using notepad?

    • http://cariblogger.com Juan Harris

      I believe that you will need additional application to set limit on usage.

    • http://cariblogger.com Carl Harris

      You’ll need a third party application to do so.

  • eimear

    our company uses the hosts file to block facebook. unfortunately, this means that the facebook like button on our website doesnt work either and just shows a large grey box on the page. because of this, we are concerned that other companies using the same method to block facebook will also be unable to see it and will just see the distorted version of our page. is there a work around that we can use so that our facebook like button can be displayed without allowing facebook in the hosts file?

  • Pingback: Raising a Rogue Access Point