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.
The wikiHow Tech Team also followed the article's instructions and verified that they work.
This article has been viewed 151,407 times.
Learn more...
This wikiHow teaches you how to prevent someone from accessing Facebook on a computer, smartphone, or tablet.
Steps
Windows
-
1Open 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.
-
2Place 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 -
3Enter the redirect address. Type in 127.0.0.1 at the very bottom of the "hosts" file, then press the Tab ↹ key.
-
4Enter 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.
-
5Add 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.
-
6Save 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
macOS
-
1Open your Mac's "hosts" file. You must have administrator privileges on your account to do this:
- Open Spotlight .
- Type in terminal, then double-click Terminal.
- Type in sudo nano /etc/hosts and press ⏎ Return.
- Enter your Mac's password when prompted.
-
2Place 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.
-
3Enter the redirect address. Type in 127.0.0.1 at the very bottom of the "hosts" file, then press the Tab ↹ key.
-
4Enter 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.
-
5Add 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.
-
6Save 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
iPhone/iPad
-
1
-
2
-
3Scroll down and tap Restrictions. It's near the middle of the General page.
-
4Enter 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
-
6Scroll down and tap Websites. It's at the bottom of the "ALLOWED CONTENT" section of options.
-
7Tap Limit Adult Content. This option is near the top of the screen.
-
8Tap Add a Website… under the "NEVER ALLOW" heading. You'll find this near the bottom of the screen. A text box will appear.
-
9Enter Facebook's address. Type in www.facebook.com and tap Done in the lower-right side of the keyboard.
-
10Minimize the Settings app. Press the Home button to do so. Your Restrictions settings will be saved.
-
11Delete 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.
-
12Delete 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.
Android
-
1
-
2Open BlockSite. Tap OPEN in the Google Play Store, or tap the shield-shaped BlockSite app icon.
-
3Tap GET STARTED. It's a green button near the bottom of the screen.
-
4Tap 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.
-
5Tap GOT IT. It's at the bottom of the screen. The appropriate Settings page will open.
-
6Scroll 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
-
8Tap +. 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
-
10Add 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.
-
11Consider 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.
Community Q&A
-
QuestionHow do I block Facebook on an Android device?Community AnswerDownload AppLock. You set up a PIN for access.
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⧽
References
About This Article
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.