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

Method 1
Method 1 of 4:

Windows

  1. 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. 2
    Place the cursor at the bottom of the "hosts" file. 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. 3
    Enter the redirect address. Type in 127.0.0.1 at the very bottom of the "hosts" file, then press the Tab key.
  4. 4
    Enter Facebook's address. 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. 5
    Add Facebook's mobile address. 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. 6
    Save your "hosts" file. 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. 7
  8. Advertisement
Method 2
Method 2 of 4:

macOS

  1. 1
  2. 2
    Place the cursor at the bottom of the "hosts" file. Press the "Down" arrow key until your cursor is at the bottom of the "hosts" file on its own line.
  3. 3
    Enter the redirect address. Type in 127.0.0.1 at the very bottom of the "hosts" file, then press the Tab key.
  4. 4
    Enter Facebook's address. 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. 5
    Add Facebook's mobile address. 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. 6
    Save your "hosts" file. 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. 7
  8. Advertisement
Method 3
Method 3 of 4:

iPhone/iPad

  1. 1
  2. 2
  3. 3
    Scroll down and tap Restrictions. It's near the middle of the General page.
  4. 4
    Enter your Restrictions passcode. 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. 5
  6. 6
    Scroll down and tap Websites. It's at the bottom of the "ALLOWED CONTENT" section of options.
  7. 7
    Tap Limit Adult Content. This option is near the top of the screen.
  8. 8
    Tap Add a Website… under the "NEVER ALLOW" heading. You'll find this near the bottom of the screen. A text box will appear.
  9. 9
    Enter Facebook's address. Type in www.facebook.com and tap Done in the lower-right side of the keyboard.
  10. 10
    Minimize the Settings app. Press the Home button to do so. Your Restrictions settings will be saved.
  11. 11
    Delete the Facebook app. 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. 12
    Delete any third-party browsers that don't use your Restrictions. 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

  1. 1
  2. 2
    Open BlockSite. Tap OPEN in the Google Play Store, or tap the shield-shaped BlockSite app icon.
  3. 3
    Tap GET STARTED. It's a green button near the bottom of the screen.
  4. 4
    Tap GO TO SETTINGS. 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. 5
    Tap GOT IT. It's at the bottom of the screen. The appropriate Settings page will open.
  6. 6
    Scroll down and tap BlockSite. Its location on the page will vary depending on your Android, but you'll find it somewhere on the page that opens.
  7. 7
  8. 8
    Tap . 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. 9
  10. 10
    Add the Facebook app to the block list. 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. 11
    Consider locking your BlockSite settings. 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

  • Question
    How do I block Facebook on an Android device?
    Community Answer
    Community Answer
    Download AppLock. You set up a PIN for access.
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.
    ⧼thumbs_response⧽
Advertisement

About This Article

Jack Lloyd
Written by:
wikiHow Technology Writer
This article was co-authored by wikiHow staff writer, Jack Lloyd. Jack Lloyd is a Technology Writer and Editor for wikiHow. He has over two years of experience writing and editing technology-related articles. He is technology enthusiast and an English teacher. This article has been viewed 151,407 times.
How helpful is this?
Co-authors: 11
Updated: July 28, 2022
Views: 151,407
Categories: Blocking on Facebook
Article SummaryX

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?
Advertisement