4 ways to block a website on your computer

4 ways to block a website on your computer
4 ways to block a website on your computer
Anonim

For professional reasons or to protect your children, you can block a website on all the browsers on your computer as well as on Google Chrome and Firefox. Internet Explorer, Microsoft Edge, or Safari settings do not provide this option, but other blocking methods can be used.

Steps

Method 1 of 4: Block a website on a Windows computer

Block a Website on Your Computer Step 1

Step 1. Open the start menu

Windowsstart

At the bottom left of your screen, click on the Windows logo.

Block a Website on Your Computer Step 2

Step 2. Type notepad in the search field

Windows will search for the notebook application on your computer.

Block a Website on Your Computer Step 3

Step 3. Open Notepad in administrator mode

On the Notepad application that appears at the top of the start window, right click and select Execute as administrator. Click on Yes when prompted to open Notepad.

  • If your mouse does not have a right click button, click on its right side or click on it with 2 fingers.
  • If you're using a trackpad instead of a mouse, tap it with 2 fingers or tap the lower right side of the trackpad.
Block a Website on Your Computer Step 4

Step 4. Click File

This option is at the top left of the window and opens a drop-down menu.

Block a Website on Your Computer Step 5

Step 5. Select Open

In the drop-down menu File, click on To open… to open a file explorer.

Block a Website on Your Computer Step 6

Step 6. Go to the etc folder

To open the file etc:

  • select This PC in the left pane of the file explorer
  • scroll down the window and double click on the name of your hard drive in the middle of the window (this is usually Local disk (C:))
  • double click on the folder Windows
  • scroll down the window and double click on the folder System32
  • look for the file drivers and double click on it
  • double click on the folder etc
Block a Website on Your Computer Step 7

Step 7. Click on the Text File (*.txt) field

At the bottom right of the file explorer window, click on the field Text file (*.txt) to open a drop-down menu.

Block a Website on Your Computer Step 8

Step 8. Select All Files

You will find this option in the drop-down menu. Click on it to display multiple files in the main window.

Block a Website on Your Computer Step 9

Step 9. Disable security from the hosts file

In the File Explorer window, locate the hosts file, then do the following:

  • right click on the hosts file
  • select Properties in the drop-down menu that opens
  • go to the tab Security
  • click on To modify
  • Check the box Total control
  • click on OK then on Yes when you are prompted
  • finish by clicking on OK
Block a Website on Your Computer Step 10

Step 10. Select the hosts file

Click on the hosts file to select it.

Block a Website on Your Computer Step 11

Step 11. Click Open

This option is located at the bottom right of the window and opens the hosts file in Notepad.

Block a Website on Your Computer Step 12

Step 12. Create a new line at the bottom of the document

Place your mouse cursor on the far right of the last line of the page and press Enter.

Block a Website on Your Computer Step 13

Step 13. Add the websites you want to block

To add websites to the block list, follow these steps:

  • type 127.0.0.1 then press Tab ↹,
  • enter the address of the website you want to block without the "www" section (for example if you want to block Facebook, type facebook.com),
  • press Enter to add another line and do the same for the other addresses you want to block.
Block a Website on Your Computer Step 14

Step 14. Block websites on Google Chrome

Using the hosts file will block websites on most browsers, but the blocking method differs slightly on Google Chrome. To block a website on Google Chrome, you will need to insert a space followed by "www. [Site].com" after the "[site].com" version of the site address in question.

  • For example, if you want to block Facebook, you would have to type 127.0.0.1 facebook.com www.facebook.com.
  • To increase the chances of blocking, you can add the "http://" or "https://" section of the address (for example 127.0.0.1 facebook.com
Block a Website on Your Computer Step 15

Step 15. Block other versions of the website address

  • Block an IP address: To block access to a website through its IP address, find the IP address of the site in question and add it to the block list in the hosts file.
  • Block a mobile site: To block access to the mobile version of a website, add "m" before the address of the site in question (for example m.facebook.com instead of facebook.com).
Block a Website on Your Computer Step 16

Step 16. Replace the previous hosts file

To replace the previous hosts file with the one you just edited:

  • click on File at the top left of the notepad
  • select Save as… in the drop-down menu that appears
  • click on the drop-down menu Type then select All the files
  • in the main window, select the hosts file by clicking on it
  • click on Save then on Yes when you are prompted
Block a Website on Your Computer Step 17

Step 17. Clear your computer's DNS cache

To clear your computer's DNS cache, you will need to go through the command prompt. This method prevents information saved by your browser from interfering with sites that you have blocked.

Block a Website on Your Computer Step 18

Step 18. Restart all of your browsers

Close and restart all browsers in use. From now on, the websites that you added to the hosts file will no longer be accessible on your computer.

Restart your computer if the websites are still accessible after restarting your browsers

Method 2 of 4: Block a website on a Mac

Block a Website on Your Computer Step 19

Step 1. Open Spotlight

Macspotlight

In the upper right corner of your Mac screen, click the magnifying glass icon to open a text field.

Block a Website on Your Computer Step 20

Step 2. Type terminal in Spotlight

Your computer will search for the Terminal application.

Block a Website on Your Computer Step 21

Step 3. Double click Terminal

Macterminal

The app should appear at the top of Spotlight search results. Double-click on it to open it.

Block a Website on Your Computer Step 22

Step 4. Open the hosts file

In Terminal, type sudo nano / etc / hosts then press ⏎ Return.

Block a Website on Your Computer Step 23

Step 5. Enter your password

To open the hosts file, type the password you use to log into your Mac, then press Return.

Terminal will not display the letters of the password you type

Block a Website on Your Computer Step 24

Step 6. Move the cursor to the bottom of the page

In the hosts file, press the ↓ key until the cursor is positioned on the last line of text, then press ⏎ Return.

Block a Website on Your Computer Step 25

Step 7. Add websites to the block list

To block a website on your Mac's browsers:

  • type 127.0.0.1 then press Tab ↹.
  • enter the address of a website without the "www" section (for example if you want to block Facebook, type facebook.com)
  • start a new line by pressing ⏎ Return then do the same for all the addresses you want to block
Block a Website on Your Computer Step 26

Step 8. Block sites on Google Chrome

The above steps will block sites in most browsers, but blocking in Google Chrome is slightly different. You will need to place a space followed by the "www. [Site].com" version of the address after the "[site].com" version.

  • For example if you want to block Facebook, you will have to type

    127.0.0.1 facebook.com www.facebook.com.

  • Add the "http://" or "https://" section of the address to increase the chances of successful blocking (for example, if you want to block Facebook, enter 127.0.0.1 facebook.com https:// www.facebook.com).
Block a Website on Your Computer Step 27

Step 9. Block other versions of the website address

  • Block an IP address: To prevent access to a site using its IP address, you can find the IP address in question and block it in the hosts file.
  • Block a mobile site: You can block the mobile version of a website by adding "m. In front of their address (for example, to block the mobile version of Facebook, type m.facebook.com instead of facebook.com).
Block a Website on Your Computer Step 28

Step 10. Save your changes

After entering all the sites you want to block, save your changes and close the editor by pressing Control + O and then ⏎ Return.

Press Control + X to close the hosts file

Block a Website on Your Computer Step 29

Step 11. Clear your computer's DNS cache

Type sudo killall -HUP mDNSResponder then press ⏎ Return to flush your Mac's DNS cache. All previously saved website data will be erased (e.g. saved passwords) and websites listed in the hosts file will now be blocked on all browsers on your computer.

If the site is still accessible on your computer, try restarting your machine to finalize your changes

Method 3 of 4: Block a website on Google Chrome

Block a Website on Your Computer Step 30

Step 1. Open this page on your browser

It is from this page that you can install Block Site.

Block Site allows you to block specific pages or entire websites. It also allows you to set a password so that other users of your machine cannot modify the block list

Block a Website on Your Computer Step 31

Step 2. Click ADD TO CHROME

You will find this blue button at the top right of the page.

Block a Website on Your Computer Step 32

Step 3. Select Add Extension when prompted

You will see this option appear at the top of the page. Click on it to install Block Site.

Block a Website on Your Computer Step 33

Step 4. Click on the Block Site icon

It's the shield icon at the top right of the Chrome page. Click on it to open a drop-down menu.

Block a Website on Your Computer Step 34

Step 5. Select Edit block sites list

This option is in the drop-down menu and opens the Block Site page.

To open the Block Site page, you can also click on the cogwheel icon at the top right of the drop-down menu

Block a Website on Your Computer Step 35

Step 6. Enter a website address

At the top of the page, click on the text field Enter a web address then type the address of the website you want to block.

To block a specific page on a website, open the page in question and copy its address by clicking on the URL bar at the top of the window then press Ctrl + C (if you are using a Windows computer) or ⌘ Command + C (if you are using a Mac)

Block a Website on Your Computer Step 36

Step 7. Click +

This button is located to the right of the text field. Click on it to immediately add the address to the list of websites blocked by Block Site.

If you want to remove the address from the block list, you can click on the red circle to the right of the address in the list of blocked sites at any time

Block a Website on Your Computer Step 37

Step 8. Open the Password protection tab

You'll find it on the left of the Block Site page.

Block a Website on Your Computer Step 38

Step 9. Select the Require a password to access Block Site menu check box

A password text field will appear at the bottom of the page.

  • If you want your password to allow you to open blocked sites, you can also check the box Enable password access to blocked pages.
Block a Website on Your Computer Step 39

Step 10. Enter a password

Click on the text field at the bottom of the page and enter the password you want to use (the password must be at least 5 characters long).

Block a Website on Your Computer Step 40

Step 11. Click Set Password

This option is located to the right of the text field and allows you to create a password that will apply to Block Site.

  • The next time you use Block Site, you will need to enter this password before you can add or remove sites.
  • If you forgot your password, right click on the Block Site icon and select Remove from Chrome.
Block a Website on Your Computer Step 41

Step 12. Activate Block Site in incognito mode

Other users of your computer can bypass Block Site's restrictions by using incognito mode. Fortunately, you can solve this problem by enabling the extension in incognito mode.

  • Click on .
  • Select More tools.
  • Open the tab Extensions.
  • Under the heading Block Site, click on DETAILS.
  • Slide the gray switch Allow in private browsing mode

    Android7switchoff

Method 4 of 4: Block a website on Firefox

Block a Website on Your Computer Step 42

Step 1. Open Firefox

The Firefox application icon looks like an orange fox around a blue globe.

Block a Website on Your Computer Step 43

Step 2. Open the Block Site page

It is from this page that you will be able to download Block Site.

Block a Website on Your Computer Step 44

Step 3. Select + Add to Firefox

This blue button is in the middle of the window, but you may have to scroll down the page to see it.

Block a Website on Your Computer Step 45

Step 4. Click Add when prompted

This new button is at the top of the window and allows you to install Block Site on Firefox.

Block a Website on Your Computer Step 46

Step 5. Select the Block Site application icon

It's the orange shield icon at the top right of the window. Click on it to open a drop-down menu.

  • Before continuing, you may need to click Understood from the drop-down menu.
Block a Website on Your Computer Step 47

Step 6. Click Edit block sites list

This option is in the drop-down menu and opens the Block Site page.

To open the Block Site page, you can also click on the cogwheel icon at the top right of the drop-down menu

Block a Website on Your Computer Step 48

Step 7. Enter a website address

At the top of the page, click on the text field Enter a web address then enter the address of the website you want to block.

If instead of a site, you want to block a specific page, open the page in question and copy its address by clicking on the URL bar at the top of the window and pressing Ctrl + C (on Windows) or ⌘ Command + C (on Mac)

Block a Website on Your Computer Step 49

Step 8. Click +

This button is located to the right of the text field and allows the website to be added to the Block Site block list.

At any time, you can remove the site from the block list by clicking on the red circle to the right of the address in the block list

Block a Website on Your Computer Step 50

Step 9. Open the Password protection tab

This tab is on the left of the Block Site page.

Block a Website on Your Computer Step 51

Step 10. Select the Require a password to access Block Site menu check box

You will see a text field appear at the bottom of the page.

  • You can also check the box Enable password access to blocked pages to set a password to access blocked sites.
Block a Website on Your Computer Step 52

Step 11. Scroll down the page and enter a password

In the text field at the bottom of the page, type a password of at least 5 characters.

Block a Website on Your Computer Step 53

Step 12. Click Set Password

This option is to the right of the text field. Click on it to create a password and apply it to Block Site.

  • The next time you use Block Site, you will need to enter a password before you can add or remove sites.
  • If you forget your password, you can delete Block Site by clicking on , Modules then on To delete on the right of Block Site on the extensions page.

Popular by topic