This wikiHow teaches you how to block websites on all computer browsers at the same time, as well as block Google Chrome and Firefox browsers. However, blocking cannot be done through Internet Explorer, Microsoft Edge, or Safari settings. This means that a cross-browser blocking method may be a better option.
Step
Method 1 of 4: On Windows Computer
Step 1. Open “Start”
Click the Windows logo displayed at the bottom left side of the screen.
Step 2. Type in notepad
The Notepad program will be searched on the computer.
Step 3. Run Notepad in administrator mode
Right click Notepad ” at the top of the “Start” window, select “ Run as administrator ” from the drop-down menu, then select “ Yes ” when prompted. The Notepad window will open.
- If your mouse doesn't have a right-click button, right-click the mouse or click the mouse button with two fingers.
- If you're using a trackpad instead of a mouse, touch the trackpad with two fingers or press its lower-right corner.
Step 4. Click File
It's in the upper-left corner of the window. A drop-down menu will open afterwards.
Step 5. Select Open…
This option is above the drop-down menu " File " A File Explorer window will open afterwards.
Step 6. Visit the "etc" folder
To access it:
- Click the option " This PC ” on the left of the File Explorer window.
- Scroll down and double-click the hard drive label (eg “ OS (C:) ”) in the middle of the File Explorer window.
- Double-click the "Windows" folder.
- Scroll down and click the "System32" folder twice.
- Scroll down and click the "drivers" folder twice.
- Double click the " etc " folder.
Step 7. Select the "Text Documents (*.txt)" field
It's in the lower-right side of the window. A drop-down menu will open afterwards.
Step 8. Click All Files
This option is displayed in the drop-down menu. The new files will be displayed in the main window.
Step 9. Remove the security from the hosts file
Locate the hosts file (" hosts ") in the main Notepad window, then follow these steps:
- Right-click the " hosts " file.
- Choose " Properties ” in the drop-down menu.
- Select tab " Security ”.
- Choose " Edit ”.
- Check the "Full Control" box.
- Choose " OK " and click " Yes ' when prompted.
- Choose " OK ”.
Step 10. Select the "hosts" file
Click the file to select it.
Step 11. Select Open
It's in the lower-right side of the window. The " hosts " file will be opened via Notepad.
Step 12. Add a new line below the document
Click the end of the last line in the document and press Enter.
Step 13. Add the site to the block list
To block a site in your browser, follow these steps:
- Enter 127.0.0.1 and press Tab.
- Enter the address of the site you want to block, without the "www" (eg "facebook.com").
- Press Enter key to insert a new line and repeat the two steps above to add other addresses that you want to block.
Step 14. Block sites on Google Chrome with this method
The steps above can indeed block the site in most browsers, but Google Chrome has a slight difference. To block a site on Google Chrome, you need to include a space and the "www.[site].com" version of the address after the "[site].com" version.
- To block Facebook, for example, type in 127.0.0.1 facebook.com www.facebook.com.
- Also add the "http:" or "https:" version of the page (eg 127.0.0.1 facebook.com https://www.facebook.com to increase the likelihood of the site being blocked.
Step 15. Block alternative versions of the respective site addresses
- IP address - You can find the site's IP address and block it in the " hosts " file so that people can't access the site via its IP address.
- Mobile site - Place "m." in front of the site address (eg "m.facebook.com", and not "facebook.com") to block the mobile version of the website in question.
Step 16. Replace the existing "hosts" file with an edited file
To replace it:
- Select menu " File ” at the top left side of the Notepad window.
- Choose " Save As… ” from the drop-down menu.
- Select the “Save as type” drop-down box and click “ All Files ”.
- Select the " hosts " file from the main file browsing window.
- Choose " Save " and click " Yes ” when prompted.
Step 17. Clear DNS cache
Use the Command Prompt program to perform this action. Clearing the cache prevents information stored in the browser from having problems with blocked sites.
Step 18. Restart all browsers
Close and reopen any browsers that are still open. Sites added to the " hosts " file will be blocked in the browser.
If the site doesn't get blocked after restarting your browser, try restarting your computer
Method 2 of 4: On Mac Computer
Step 1. Open Spotlight
Select the magnifying glass icon displayed at the top right side of the computer screen. The text field will be displayed after that.
Step 2. Type terminal into the Spotlight field
The Terminal program will be searched on the computer.
Step 3. Click options
“Terminal” twice.
This option is the top choice in Spotlight search results. The terminal will be opened after that.
Step 4. Open the hosts file ("hosts")
Enter sudo nano /etc/hosts, then press Return.
Step 5. Type in the computer password
Enter the password you use to log into your computer and press Return afterwards. The " hosts " file will open immediately.
Password letters will not appear in the Terminal window as they are typed
Step 6. Slide the flashing cursor down the page
Press until the cursor reaches the end of the last line of the page and press Return.
Step 7. Add the site to the block list
Follow these steps to block sites in your browser:
- Enter 127.0.0.1 and press Tab.
- Enter the address of the site you want to block, without the "www" section (eg "facebook.com").
- Press Return to insert a new line, then repeat the two steps above for other addresses you want to block.
Step 8. Block sites on Google Chrome with this method
The steps above can indeed block the site in most browsers, but Google Chrome has a slight difference. To block a site on Google Chrome, you need to include a space and the "www.[site].com" version of the address after the "[site].com" version.
- To block Facebook, for example, type in 127.0.0.1 facebook.com www.facebook.com.
- Also add the "http:" or "https:" version of the page (eg 127.0.0.1 facebook.com https://www.facebook.com to increase the likelihood of the site being blocked.
Step 9. Block the alternative version of the corresponding site address
- IP address - You can find the site's IP address and block it in the " hosts " file so that people can't access the site via its IP address.
- Mobile site - Place "m." in front of the site address (eg "m.facebook.com", and not "facebook.com") to block the mobile version of the website in question.
Step 10. Save changes and close the editor window
Once all the addresses you want to block are entered, save changes and close the window by pressing Control+O and this Return key afterwards.
To close the “hosts” file, press Control+X
Step 11. Clear the computer's DNS cache
Step 1. Go to the Block Site page
You can install the Block Site extension from that page.
Block Site allows you to block a specific page or entire website. You can also set a password so that other users can't change the block list
Step 2. Click ADD TO CHROME
This blue button appears at the top right of the page.
Step 3. Click Add extension when prompted
This button is at the top of the page. Once clicked, the extension will be installed in the browser.
Step 4. Select the Block Site icon
It's the shield icon in the top-right side of the Chrome page. A drop-down menu will open afterwards.
Step 5. Click Edit block sites list
This option is in the drop-down menu. The Block Site page will load.
You can also select the gear icon at the top right of the drop-down menu to open the Block Site page
Step 6. Enter the address you want to block
Click the "Enter a web address" field at the top of the page and enter the address of the site you want to block.
If you want to specifically block a page on the site, visit that page, copy the address by clicking the address bar at the top of your browser, and pressing the shortcut Ctrl+C (Windows) or Command+C (Mac)
Step 7. Click
This button is to the right of the text field. The site will be immediately added to the Block Site site block list.
You can remove a site from the block list at any time by clicking the red circle icon to the right of the site's URL in the list
Step 8. Click Password Protection
This tab is on the left side of the Block Site page.
Step 9. Check the "Require a password to access Block Site menu" box
The password field will be displayed at the bottom of the page.
You can also check the "Enable password access to blocked pages" box to be able to access blocked sites using a password
Step 10. Swipe the screen and enter the password
Type the password (minimum five characters) into the text field at the bottom of the page.
Step 11. Select Set Password
This option is to the right of the entry field. A password will be generated and applied to the Block Site extension.
- When you want to access Block Sites in the future, enter the password that was set before you can add or remove sites.
- If you forget the Block Site password, right-click the Block Site extension icon, then select “ Remove from Chrome ”.
Step 12. Leave Block Site running in secret browsing mode (incognito mode)
One way to get around the limitations of this extension is to use incognito mode. Luckily, you can enable Block Site in that mode to keep the extension restrictions from being broken:
- Choose " ⋮ ”
- Click " More tools ”
- Choose " Extensions ”
- Choose " DETAILS ” which is under the "Block Site" section.
-
Click the gray "Allow in incognito" switch
Method 4 of 4: On Firefox
Step 1. Open Firefox
The icon looks like an orange fox surrounding a blue globe.
Step 2. Visit the Block Site add-on page
The Block Site add-on can be downloaded from this page.
Step 3. Click the + Add to Firefox button
It's a blue button in the middle of the page. Swipe the screen to view it.
Step 4. Click Add when prompted
This option is at the top of your browser. The Block Site add-on will be installed in Firefox.
Step 5. Select the Block Site icon
It's an orange shield icon in the upper-right side of the window. A drop-down menu will open.
You may need to click the “ got it ” in the drop-down menu before moving on to the next step.
Step 6. Click Edit block sites list
This option is in the drop-down menu. The Block Site page will be displayed after that.
You can also access the Block Site page by clicking the gear icon at the top right of the drop-down menu
Step 7. Enter the address you want to block
Click the "Enter a web address" field at the top of the page and enter the address you want to block.
If you want to specifically block a page on the site, visit that page, copy the address by clicking the address bar at the top of your browser, and pressing the shortcut Ctrl+C (Windows) or Command+C (Mac)
Step 8. Select
This button appears to the right of the address field. The site entered will be immediately added to the Block Site block list.
You can remove a site from the block list at any time by clicking the red circle icon to the right of the site's URL in the list
Step 9. Click Password Protection
This tab is on the left side of the Block Site page.
Step 10. Check the box "Require a password to access Block Site menu"
The password field will appear at the bottom of the page.
You can also check the "Enable password access to blocked pages" box to be able to access blocked sites using a password
Step 11. Swipe the screen and enter the password
Type a password that is at least five characters long into the text field at the bottom of the page.
Step 12. Select Set Password
This option is to the right of the entry field. A password will be generated and applied to the Block Site add-on.
- When you want to access Block Sites in the future, enter the password that was set before you can add or remove sites.
- If you forget your Block Site password, you can remove the add-on from Firefox by clicking the “ ☰", choose " Add-ons, and clicked “ Remove ” to the right of the “Block Site” option on the “Extensions” page.