PhoneSearch

How To Block Any Website on Your Computer

Are you seeking to prevent your children (or yourself) from accessing specific websites on your computer? While installing a browser extension on Chrome, Edge, or Safari may seem like an effective solution, it will only block sites for that particular browser.

4 Ways To Block Any Website on Your Computer

If it is imperative to ensure that no one can access a certain website from any web browser, we have the solution for you. This article will provide detailed instructions on how to completely block access to a website using your Chromebook, Mac, or Windows 10 or 11 computer.

Method 1: Using Windows

Using Windows

  1. Open Start:
    • Click the Windows logo in the bottom-left corner of the screen.
    • This method works on both Windows 10 and Windows 11.
  2. Type in “notepad”:
    • This will search your computer for the Notepad app.
  3. Open Notepad in administrator mode:
    • Right-click Notepad at the top of the Start window.
    • Click “Run as administrator” in the drop-down menu.
    • Click “Yes” when prompted. The Notepad window will open.
    • If your mouse doesn’t have a right-click button, click the right side of the mouse or use two fingers to click.
    • If your computer uses a trackpad instead of a mouse, use two fingers to tap the trackpad or press the bottom-right side.
  4. Click “File”:
    • Located in the top-left corner of the window. A drop-down menu will appear.
  5. Click “Open…”:
    • This option is near the top of the File drop-down menu. A File Explorer window will open.
  6. Navigate to the “etc” folder:
    • Click “This PC” on the left side of the File Explorer window.
    • Scroll down and double-click your hard drive’s name (usually “OS (C:)”) in the middle of the window.
    • Double-click the “Windows” folder.
    • Scroll down and double-click the “System32” folder.
    • Scroll down and double-click the “drivers” folder.
    • Double-click the “etc” folder.
  7. Click the “Text Documents (.txt)” box*:
    • It’s in the lower-right side of the window. A drop-down menu will appear.
  8. Click “All Files”:
    • This option is in the drop-down menu. You should see several files appear in the main window.
  9. Remove security from the “hosts” file:
    • Find the “hosts” file in the main Notepad window.
    • Right-click the “hosts” file.
    • Click “Properties” in the drop-down menu.
    • Click the “Security” tab.
    • Click “Edit”.
    • Check the “Full Control” box.
    • Click “OK”, then click “Yes” when prompted.
    • Click “OK”.
  10. Select the “hosts” file:
    • Click the “hosts” file to do so.
  11. Click “Open”:
    • It’s in the lower-right side of the window. The “hosts” file will open in Notepad.
  12. Create a new line at the bottom of the document:
    • Click the very end of the last line on the page, then press “Enter”.
  13. Add websites to the block list:
    • To block a website in your computer’s browsers, type “127.0.0.1” and press “Tab”.
    • Type in a website’s address without the “www” section (e.g., “facebook.com”, “twitter.com”).
    • Press “Enter” to start a new line, then repeat the above two steps with other addresses you want to block.
  14. Block Google Chrome sites using this method:
    • While the above steps work for most browsers, Google Chrome is slightly different.
    • If you’re blocking sites on Google Chrome, you’ll need to place a space and then the “www.[site].com” version of the website’s address after the “[site].com” version.
    • For example, to block Facebook, type “127.0.0.1 facebook.com www.facebook.com”.
    • Adding the “http://” or “https://” part of the address (e.g., “127.0.0.1 facebook.com https://www.facebook.com”) can improve the chances of the site being blocked.
  15. Try blocking alternative versions of the website’s address:
    • IP address: Find a website’s IP address and then block it in the “hosts” file to prevent access via its IP address.
    • Mobile site: By placing “m.” in front of a website’s address (e.g., “m.facebook.com” instead of “facebook.com”), you can block the mobile version of the website as well.
  16. Replace the existing “hosts” file with the edited one:
    • Click “File” in the top-left corner of Notepad.
    • Click “Save As…” in the drop-down menu.
    • Click the “Save as type” drop-down box, then click “All Files” in the drop-down menu.
    • Click the “hosts” file in the main window to select it.
    • Click “Save”, then click “Yes” when prompted.
  17. Flush your computer’s DNS cache:
    • Use Command Prompt to perform this action.
    • Flushing the DNS cache will prevent saved browser information from clashing with your blocked sites.
    • Press the Windows key and type “cmd”.
    • Right-click “Command Prompt”.
    • Click “Run as administrator”.
    • Click “Yes” to confirm.
    • In the Command Prompt, type “ipconfig /flushdns”.
    • Press “Enter”.
  18. Restart all browsers:
    • Close any open browser windows and then re-open them.
    • Any websites you added to the “hosts” file should now be blocked in your browsers.
    • If the websites still aren’t blocked after restarting your browsers, try restarting your computer.

Method 2: Using Mac

Using Mac

  1. Open Spotlight:
    • Click the magnifying glass icon in the upper-right side of your Mac’s screen. A text box will appear.
  2. Type “terminal” into Spotlight:
    • This will search your computer for the Terminal app.
  3. Double-click “Terminal”:
    • It should be the top option in the Spotlight search results. This will open the Terminal app.
  4. Open the “hosts” file:
    • Type “sudo nano /etc/hosts” and then press “Return”.
  5. Enter your Mac’s password:
    • Type the password that you use to log into your Mac, then press “Return”. The “hosts” file will open.
    • Note that Terminal won’t show your password’s letters as you type.
  6. Move the blinking cursor down to the bottom of the page:
    • Press the “↓” key until the cursor is at the end of the last line of text on the page, then press “Return”.
  7. Add websites to the block list:
    • To block a website in your computer’s browsers, type “127.0.0.1” and press “Tab”.
    • Type in a website’s address without the “www” section (e.g., “facebook.com”).
    • Press “Return” to start a new line, then repeat the above two steps with other addresses you want to block.
  8. Block Google Chrome sites using this method:
    • While the above steps work for most browsers, Google Chrome is slightly different.
    • If you’re blocking sites on Google Chrome, place a space and then the “www.[site].com” version of the website’s address after the “[site].com” version.
    • For example, to block Facebook, type “127.0.0.1 www.facebook.com”.
    • Adding the “http://” or “https://” part of the address (e.g., “127.0.0.1 https://www.facebook.com”) can improve the chances of the site being blocked.
  9. Try blocking alternative versions of the website’s address:
    • IP address: Find a website’s IP address and then block it in the “hosts” file to prevent access via its IP address.
    • Mobile site: By placing “m.” in front of a website’s address (e.g., “m.facebook.com” instead of “facebook.com”), you can block the mobile version of the website as well.
  10. Save and exit the editor:
    • Once you have entered all the sites that you want to block, save and exit by pressing “Control+O” and then pressing “Return”.
    • To exit the hosts file, press “Control+X”.
  11. Flush your computer’s DNS cache:
    • Type “sudo killall -HUP mDNSResponder” and press “Return”.
    • This command will flush your Mac’s DNS cache, ensuring that all previous website data (e.g., saved passwords) is erased.
    • Your listed site should now be blocked in all browsers on your computer.
    • If your computer’s browsers don’t block the site, restart your computer to finalize the changes.

Method 3: Using Chromebook & Google Chrome

Using Chromebook & Google Chrome

  1. Open the Block Site page:
    • This is the page where you will install Block Site.
    • Block Site enables you to block individual pages or entire websites and set a password to prevent other users from altering your block list.
  2. Click “ADD TO CHROME”:
    • This blue button is located in the upper-right side of the page.
  3. Click “Add extension” when prompted:
    • This option will appear at the top of the page. Clicking it will install Block Site.
  4. Click the Block Site icon:
    • This shield-shaped icon is in the upper-right side of the Chrome page. A drop-down menu will appear.
  5. Click “Edit block sites list”:
    • You’ll find this option in the drop-down menu. Clicking it will open the Block Site page.
    • Alternatively, you can click the gear-shaped icon in the top-right corner of the drop-down menu to open the Block Site page.
  6. Enter a website’s address:
    • Click the “Enter a web address” text box near the top of the page, then type in the address of the website you want to block.
    • To block a specific page on a website, navigate to that page, then copy the address by clicking the address bar at the top of the window and pressing “Ctrl+C” (Windows) or “⌘ Command+C” (Mac).
  7. Click the plus (+) icon:
    • It’s to the right of the website text field. Your website will immediately be added to Block Site’s list of blocked websites.
    • To remove a site from Block Site’s blacklist, click the red circle icon to the right of the website’s URL in the list of blocked sites.
  8. Click “Password Protection”:
    • This tab is on the left side of the Block Site page.
  9. Check the “Require a password to access Block Site menu” box:
    • This action will create a password text box at the bottom of the page.
    • Optionally, check the “Enable password access to blocked pages” box if you want your password to allow you to open blocked sites.
  10. Scroll down and enter a password:
    • Type your preferred password (at least 5 characters) into the text box at the bottom of the page.
  11. Click “Set Password”:
    • This button is to the right of the password text field. Clicking it will create your password and apply it to Block Site.
    • You’ll need to enter your password when accessing Block Site in the future to add or remove sites.
    • If you forget your password, you can right-click the Block Site icon and click “Remove from Chrome”.
  12. Allow Block Site in Incognito mode:
    • People can bypass Block Site’s restrictions using incognito mode, but you can enable Block Site in incognito to fix this issue:
      • Click “⋮”
      • Select “More tools”
      • Click “Extensions”
      • Click “DETAILS” below the “Block Site” heading.
      • Click the grey “Allow in incognito” switch.

Method 4: Using Firefox

Using Firefox

  1. Open Firefox:
    • Its app icon resembles an orange fox wrapped around a blue globe.
  2. Open the Block Site webpage:
    • This is the location from which you’ll download Block Site.
  3. Click “+ Add to Firefox”:
    • This blue button is in the middle side of the page. You may have to scroll down to see it.
  4. Click “Add” when prompted:
    • This option will also appear at the top of the window. Clicking it will install Block Site in your Firefox browser.
  5. Click the Block Site app icon:
    • It’s an orange, shield-shaped icon in the upper-right side of the window. A drop-down menu will appear.
    • You may need to click “Got it” in the drop-down menu before proceeding.
  6. Click “Edit block sites list”:
    • This option is in the drop-down menu. Clicking it will open the Block Site page.
    • Alternatively, click the gear-shaped icon in the top-right corner of the drop-down menu to open the Block Site page.
  7. Enter a website’s address:
    • Click the “Enter a web address” text box near the top of the page, then type in the address of the website you want to block.
    • To block a specific page on a website, navigate to that page, then copy the address by clicking the address bar at the top of the window and pressing “Ctrl+C” (Windows) or “⌘ Command+C” (Mac).
  8. Click the plus (+) icon:
    • It’s to the right of the website text field. Your website will immediately be added to Block Site’s list of blocked websites.
    • To remove a site from Block Site’s blacklist, click the red circle icon to the right of the website’s URL in the list of blocked sites.
  9. Click “Password Protection”:
    • This tab is on the left side of the Block Site page.
  10. Check the “Require a password to access Block Site menu” box:
    • This action will create a password text box at the bottom of the page.
    • Optionally, check the “Enable password access to blocked pages” box if you want your password to allow you to open blocked sites.
  11. Scroll down and enter a password:
    • Type your preferred password (at least 5 characters) into the text box at the bottom of the page.
  12. Click “Set Password”:
    • This button will set your password and apply it to Block Site.
    • You’ll need to enter your password when accessing Block Site in the future to add or remove sites.
    • If you forget your password, you can remove Block Site from Firefox by clicking “☰”, clicking “Add-ons”, and clicking “Remove” to the right of “Block Site” on the Extensions page.

Add comment