Block Facebook
This article teaches you how to prevent computer or phone users from accessing Facebook. To do so on computer or mobile alike, you must have access to an account with Administrator privileges or their equivalence.
Contents
Steps
Blocking on Windows
- Open the Start menu. You can do so either by clicking the Windows logo in the bottom-left corner of the screen, or by pressing the ⊞ Win key.
- Type Notepad into the search bar. The search bar is at the bottom of the Start menu.
- For Windows XP, you'll instead click All Programs and select Accessories to find Notepad.
- Right-click Notepad. It's a blue, notepad-shaped icon at the top of the Start menu window. Right-clicking it will invoke a drop-down menu.
- Click Run as administrator. This option will open Notepad using your Administrator privileges.
- Click Yes when prompted. Notepad will open at this point.
- Click File. It's in the top-left corner of the Notepad window.
- Click Open. You'll see this option toward the top of the "File" drop-down menu.
- Click the address bar. This is the white bar at the top of the "Open" window; it will say something like "My Computer > Desktop" here. Clicking the address bar will highlight everything in it.
- Navigate to the "hosts" file folder. To do so, you'll type C:/Windows/System32/drivers/etc in and press ↵ Enter. This address will take you to your computer's "etc" folder, from which you can change the file that dictates to which websites your computer can connect.
- Click the "Text Documents" bar. This should be in the lower-right side of the "Open" window; clicking it will invoke a drop-down menu.
- Click All Files. You should see several files appear in the window.
- Right-click the "hosts" file. Doing so will invoke a drop-down menu.
- Click Properties. It's near the bottom of the window.
- Click the Security tab. This option is in the top-right area of the window.
- Click Edit. It's in the middle of the window.
- Click the "Full Control" checkbox. This box allows you to edit and, ultimately, replace the "hosts" file, which is exactly what you'll be doing.
- Click Apply, then click Yes when prompted. Since editing system files carries a degree of risk, Windows will alert you to the potential ramifications of doing so here.
- Click OK twice. This will return you to the "Open" window.
- Click the "hosts" file, then click Open. This will open the "hosts" file in Notepad, allowing you to view (and edit) its contents.
- Scroll down to the bottom of the "hosts" file. You'll see two "localhost" lines of text here.
- Click below the last line of text. It will say "::1 localhost" or "127.0.0.1 localhost" at the bottom of the page; you'll need to place the mouse cursor directly below the last line on this page.
- Be careful not to delete anything in the "hosts" file.
- Type in 127.0.0.1 www.facebook.com and press ↵ Enter. This line of text will prevent Facebook from being accessible on this PC.
- You should also block www.m.facebook.com to prevent people from going to Facebook's mobile site. You'll do this on a line below the first Facebook address.
- Click File. It's in the top-left corner of the Notepad window.
- Click Save As. This is an option near the middle of the "File" drop-down menu.
- Click the "Text Documents" bar and select All Files. Doing so will bring up the "hosts" file again, among other files on this page.
- Click the "hosts" file. This will select it.
- Click Save, then click Yes when prompted. You should no longer be able to log into Facebook on any browser.
Blocking on Mac
- Open Spotlight. To do so, click the magnifying glass icon in the top-right side of your Mac's screen.
- Type terminal into Spotlight. This will bring up a list of programs, the top-most of which should be Terminal.
- Click the Terminal icon. It's a black screen with a white ">_" on it.
- Copy sudo nano /etc/hosts into Terminal. This code is all one line.
- Press ⏎ Return. Doing so will run your copied command.
- Enter your Mac's password and press ⏎ Return. This is the password you use to log into your Mac. As long as the password is correct, you'll be able to proceed.
- Even though Terminal won't display the characters you type, it is registering them.
- Press the ↓ arrow to navigate to the bottom of the page. You want the blinking grey cursor to be below the last line of text here.
- Type in 127.0.0.1. This command redirects the site after it back to your machine, meaning that any site entered in conjunction with this command (e.g., Facebook) will not be able to access the Internet.
- Press Tab ↹. The cursor will move to the right.
- Type in www.facebook.com. This will prevent Facebook from being accessible on your Mac.
- Press ⏎ Return. Doing so will save your command and place the cursor on a new line.
- You should also block the Facebook mobile site by entering 127.0.0.1 www.m.facebook.com on this line.
- Type sudo killall -HUP mDNSResponder in and press ⏎ Return. This command will flush your Mac's DNS cache, which will prevent any opposing prior data from clashing with your new, no-Facebook commands.
Blocking on iPhone
- Delete apps on which one can access Facebook. To do so, you'll tap and hold an app, then tap the X in its top-left corner and tap Delete when prompted. Apps you should delete include the following:
- Any web browser other than Safari (e.g., Chrome)
- Open your iPhone's Settings. It's a grey app with gears in it that you'll likely find on the Home Screen.
- Scroll down and tap General. This option is just below the bottom of the screen.
- Scroll down and tap Restrictions. It's in the middle of the page.
- Tap Enable Restrictions. It's at the top of the page. If you haven't yet enabled Restrictions, you'll be prompted to create a four-digit passcode.
- If you already have Restrictions enabled on your iPhone, simply enter your Restrictions password here.
- Type in your preferred passcode twice. Make sure this is a code that you'll remember but that isn't easy to guess (e.g., it should differ from your iPhone's passcode).
- Skip this step if you already have Restrictions enabled.
- Slide Safari left to the "Off" position. This option is at the top of the "ALLOW" group of apps and features. Disabling Safari effectively removes web browsing from the iPhone, making it impossible to access Facebook outside of the app.
- Alternatively, you can keep this option enabled, then tap Websites in the "ALLOWED CONTENT" group of options, tap Specific Websites Only, and add any websites you wish to allow while ensuring that Facebook is not included.
- Slide Installing Apps left to the "Off" position. It's near the bottom of the screen. With this feature disabled, a user on this phone won't be able to re-download Facebook.
- If your phone has a four-inch screen, you'll first need to scroll down to see this option.
- Scroll down and tap Facebook. It's in the "PRIVACY" group of options.
- Slide any apps listed here left to the "Off" position. Doing so will prevent any of these apps from using Facebook data.
- Tap Don't Allow Changes. It's toward the top of this page. This will prevent these apps from requesting Facebook data in the future. Facebook is now completely blocked on your iPhone.
Blocking on Android
- Open your Android's Settings. This grey, gear-shaped app is likely found in the App Drawer, which is a grid of two-by-three dots near the bottom of the screen.
- Scroll down and tap Users. It's an option below the "DEVICE" heading.
- On some Samsung devices, you must first tap Device to view this option.
- Tap Add user or profile. This option is near the top of the page.
- Tap Restricted profile when prompted. Creating a restricted profile will allow you to moderate the apps and services the profile can access without having to relinquish your own apps.
- If you don't currently have a passcode on your Android, first tap Set lock and follow the on-screen setup instructions for creating a passcode.
- Tap the "New profile" gear icon. It's next to the new profile listed here.
- Enter a name, then tap OK. This will create a name for your restricted account.
- Slide any apps you wish to enable right to the "On" position. Make sure you keep Facebook, Play Store, and any web browsers disabled.
- Lock your Android device. The restricted profile will be immediately accessible without a passcode, though the restricted profile will also only be able to access the apps you've allowed.
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).
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.
Related Articles
- Block Facebook Notifications
- Block Access to Your Facebook Account Temporarily
- Unfriend Someone on Facebook Without Actually Unfriending Them
- Delete Friends on Facebook