PDF download Download Article PDF download Download Article

This wikiHow teaches you how to prevent someone from accessing Facebook on a computer, smartphone, or tablet.

Method 1
Method 1 of 4:

Windows

PDF download Download Article
  1. Open your computer's "hosts" file . You'll need to be on an administrator account to do this:
    • Open Notepad in Administrator mode.
    • Click File , then click Open... .
    • Navigate to the "hosts" file by clicking This PC , double-clicking your hard drive, opening the "Windows" folder, opening the "System32" folder, opening the "drivers" folder, and opening the "etc" folder.
    • Click the "Text Documents" drop-down box, then click All Files .
    • Allow editing for the "hosts" file by right-clicking it, clicking Properties , clicking Security , clicking Edit , checking the "Full Control" box, clicking OK , clicking Yes , and clicking OK .
    • Double-click the "hosts" file to open it in Notepad.
  2. Scroll down to the bottom of the "hosts" file, then click below the very last entry at the bottom.
    • You may have to click at the end of the last line in the "hosts" file and then press Enter .
    Advertisement
  3. Type in 127.0.0.1 at the very bottom of the "hosts" file, then press the Tab key.
  4. Type in facebook.com and then press Enter . You should now have a line that resembles the following:
    • 127.0.0.1 facebook.com
    • If you use Google Chrome, press the spacebar after typing in facebook.com , then type in www.facebook.com as well.
  5. To do this, type in 127.0.0.1 m.facebook.com and press Enter .
    • Again, if you use Google Chrome, make sure you place a space after "m.facebook.com" and type in www.m.facebook.com before pressing Enter .
  6. In order to save your "hosts" file to override the original file, do the following:
    • Click File , then click Save As... .
    • Click Text Documents in the bottom-right corner, then click All Files in the drop-down menu.
    • Click the "hosts" file to select it.
    • Click Save , then click Yes when prompted.
  7. Click Start
    Windows Start
    , click Power
    Windows Power
    , and click Restart . Once your computer finishes restarting, Facebook should be blocked in all web browsers.
  8. Advertisement
Method 2
Method 2 of 4:

macOS

PDF download Download Article
  1. Open your Mac's "hosts" file . You must have administrator privileges on your account to do this:
    • Open Spotlight
      Mac Spotlight
      .
    • Type in terminal , then double-click Terminal .
    • Type in sudo nano /etc/hosts and press Return .
    • Enter your Mac's password when prompted.
  2. Press the "Down" arrow key until your cursor is at the bottom of the "hosts" file on its own line.
  3. Type in 127.0.0.1 at the very bottom of the "hosts" file, then press the Tab key.
  4. Type in facebook.com and then press Return . You should now have a line that resembles the following:
    • 127.0.0.1 facebook.com
    • If you use Google Chrome, press the spacebar after typing in facebook.com , then type in www.facebook.com as well.
  5. To do this, type in 127.0.0.1 m.facebook.com and press Return .
    • Again, if you use Google Chrome, make sure you place a space after "m.facebook.com" and type in www.m.facebook.com before pressing Return .
  6. Once you've finished editing the "hosts" file, do the following to save your changes:
    • Press Control and X at the same time.
    • Press Y when prompted.
    • Press Return .
  7. Click the Apple menu
    Mac Apple
    , click Restart... , and click Restart when prompted. Once your computer finishes restarting, Facebook should be blocked in all web browsers.
  8. Advertisement
Method 3
Method 3 of 4:

iPhone/iPad

PDF download Download Article
  1. Tap the Settings app icon, which resembles a set of gears on a grey background.
  2. You'll find this option near the top of the Settings page.
  3. It's near the middle of the General page.
  4. Type in the four-digit passcode you use to unlock the Restrictions menu.
    • If you haven't yet enabled Restrictions on this iPhone, tap Enable Restrictions at the top of the screen, then type in twice a unique passcode that you'll remember.
  5. This switch is in the second group of options. Tapping it causes the switch to turn grey
    iPhone Switch Off Icon
    , thus disabling the App Store.
  6. It's at the bottom of the "ALLOWED CONTENT" section of options.
  7. This option is near the top of the screen.
  8. You'll find this near the bottom of the screen. A text box will appear.
  9. Type in www.facebook.com and tap Done in the lower-right side of the keyboard.
  10. Press the Home button to do so. Your Restrictions settings will be saved.
  11. If you have the Facebook app installed on your iPhone, tap and hold its icon until the icon starts shaking, then tap X in the top-left corner of the icon and tap Delete when prompted.
    • Since you've disabled app downloads from the App Store, it will be impossible to reinstall the Facebook app.
  12. Browsers such as Safari, Google Chrome, and Firefox will all honor your Restrictions settings by blocking Facebook, but other browsers may not depending on their privacy settings. Once you've finished this, your iPhone will no longer be able to access Facebook.
  13. Advertisement
Method 4
Method 4 of 4:

Android

PDF download Download Article
  1. Open the
    Android Google Play
    Google Play Store app, then do the following:
    • Tap the search bar.
    • Type in blocksite , then tap Done or Enter .
    • Tap Block Site - Block Distracting Apps & Sites .
    • Tap INSTALL , then tap ACCEPT when prompted.
  2. Tap OPEN in the Google Play Store, or tap the shield-shaped BlockSite app icon.
  3. It's a green button near the bottom of the screen.
  4. This button is near the bottom of the screen. Doing so will take you to a page that explains how to enable BlockSite in your Android's Settings.
  5. It's at the bottom of the screen. The appropriate Settings page will open.
  6. Its location on the page will vary depending on your Android, but you'll find it somewhere on the page that opens.
  7. The switch will change color
    Android 7 Switch On
    , signifying that BlockSite is now enabled. At this point, BlockSite should re-open.
    • You may have to tap OK to confirm this step.
  8. It's in the bottom-right corner of the screen. Doing so opens the WEBSITES tab.
    • If BlockSite didn't automatically open when you turn it on in Settings, tap the "Apps" button and then select BlockSite in the list of open apps.
  9. Type in www.facebook.com and then tap the checkmark icon
    Android 7 Done
    in the top-right corner of the screen.
  10. In order to block the Facebook app, do the following:
    • Tap in the bottom-right corner again.
    • Tap the APP tab at the top of the screen.
    • Scroll down and tap Facebook .
  11. While BlockSite will prevent you from accessing Facebook, it doesn't include a password or a provision to prevent a user from simply deleting the BlockSite app to begin using Facebook again. You can lock BlockSite with a password by doing the following:
    • Install the Norton Lock app from the Google Play Store.
    • Open Norton Lock, then follow the on-screen instructions to add it to your Android's app permissions.
    • Create an unlock code in Norton Lock, then tap Continue .
    • Tap BlockSite and Play Store in the list of apps to lock.
  12. Advertisement

Community Q&A

Search
Add New Question
  • Question
    How do I block Facebook on an Android device?
    Community Answer
    Download AppLock. You set up a PIN for access.
Ask a Question
      Advertisement

      Tips

      • You can also download browser-specific extensions that will allow you to block Facebook on one browser instead of the whole computer (e.g., "Block site" for Chrome). [1]
      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Name
      Please provide your name and last initial
      Thanks for submitting a tip for review!
      Advertisement

      Warnings

      • When using Terminal or editing the "hosts" file in general, do not delete any information that is present in the original file. Doing so may permanently damage your computer's operating system.
      Advertisement

      About This Article

      Article Summary X

      You can block Facebook from being accessed on your Windows or Mac computer by adding Facebook's address to the "hosts" file, though you will need to use an administrator account to do so. iPhone users can block Facebook by enabling Restrictions from the Settings app, disabling App Store downloads, adding Facebook's address to the list of blocked websites, and deleting the Facebook app. Android users can use a free app called BlockSite to block both the Facebook website and the Facebook app from being accessed.

      Did this summary help you?
      Thanks to all authors for creating a page that has been read 168,493 times.

      Reader Success Stories

      • Joshua Bokol

        Jan 29, 2018

        "I really liked the process. It's very smart."
      Share your story

      Is this article up to date?

      Advertisement