How to block a website in all browsers

Author: Sara Rhodes
Date Of Creation: 9 February 2021
Update Date: 1 July 2024
Anonim
How to Block a Website in all Web Browsers
Video: How to Block a Website in all Web Browsers

Content

In this article, we'll show you how to block access to a specific website in browsers on a Windows or Mac OS X computer; this can be done by editing the "hosts" file. On iPhone / iPad, access to the site is closed through the "Restrictions" menu in the "Settings" application. Android users can block access to the site using the free BlockSite app.

Steps

Method 1 of 4: Windows

  1. 1 Open the start menu . Click on the Windows logo in the lower left corner of the screen; you can also press the key ⊞ Win.
    • In Windows 8, place your mouse pointer in the upper right corner of the screen, and then click on the magnifying glass icon.
  2. 2 Enter Notebook in the start menu. Notepad appears at the top of the Start menu.
  3. 3 Right click on Notebook and from the menu select Run as administrator. Notepad will start with administrator rights - this is necessary to make changes to the "hosts" file.
    • If your computer has a trackpad (not a mouse), tap it with two fingers to simulate a right-click on the mouse.
  4. 4 Click on Yeswhen prompted. Do this to confirm your actions. A Notepad window will open.
  5. 5 Click on File > Open.
  6. 6 Open the folder with the "hosts" file. After you click "Open":
    • go to the "This PC" tab on the left side of the window;
    • double-click on your computer's hard drive (most likely, it is designated as C :);
    • open the "Windows" folder;
    • scroll down and open the "System32" folder;
    • scroll down and open the drivers folder;
    • open the "etc" folder.
  7. 7 Display all files. Open the Text Documents menu at the bottom of the screen and click All Files. A series of files will appear in the window.
  8. 8 Allow to edit the "hosts" file. Right click on the "hosts" file, then:
    • click "Properties";
    • click on "Security";
    • click "Change";
    • check the box next to "Full access";
    • click OK> Yes when prompted;
    • click "OK" to close the "Properties" window.
  9. 9 Double click on the "hosts" file. The hosts file will open in Notepad - you can now view and edit it.
  10. 10 Scroll through the hosts file to the very end. At the bottom of this file, there are two lines "localhost".
  11. 11 Click on the blank space below the last line of the "hosts" file. This line contains ":: 1 localhost" or "127.0.0.1 localhost". Place the cursor below the specified line.
    • Do not delete anything in the hosts file.
  12. 12 Enter 127.0.0.1 and press Tab ↹. This is the IP address intended for feedback from your computer. Now, if you try to go to a blocked site, an error message will appear.
  13. 13 Enter the address of the website you want to block. If, for example, you want to block the Yandex website, enter www.yandex.ru.
    • To block sites in Google Chrome, enter two site addresses - without the "www" prefix and with this prefix. For example, to block Facebook, enter 127.0.0.1 facebook.com www.facebook.com.
  14. 14 Click on ↵ Enter. The cursor is displayed on a new line. The entered code will redirect requests from the site that you blocked to the feedback address from your computer.
    • If necessary, enter any number of website addresses, each new address must be entered on a new line, and the line must begin with the IP address 127.0.0.1.
    • To be sure to block a site, enter different spellings of the site address. For example, to block Yandex, enter yandex.ru and https://www.yandex.ru/.
  15. 15 Save the hosts file. If you just click File> Save, your changes won't be saved, so:
    • click "File";
    • select "Save As" from the menu;
    • click "Text Document"> "All Files";
    • click on the "hosts" file;
    • click "Save";
    • click "Yes" when prompted.

Method 2 of 4: Mac OS X

  1. 1 Open Spotlight . Click on the magnifying glass icon in the upper right corner of the screen.
  2. 2 Enter terminal. A terminal icon appears at the top of the search results list.
  3. 3 Double click on the terminal icon .
  4. 4 Open the "hosts" file. To do this, enter this code in the terminal, and then press ⏎ Return:

    sudo nano / etc / hosts


  5. 5 Enter your operating system password. Enter the password you use to log in, then click ⏎ Return.
    • You will not see the characters for the password when you enter it in the terminal.
  6. 6 Place the blinking cursor at the end of the hosts file. Press and hold the key until the cursor is displayed below the last line of the "hosts" file.
  7. 7 Enter the local host address. Enter 127.0.0.1 a new line. This is the IP address intended for feedback from your computer.
  8. 8 Press the key Tab ↹. The cursor will move to the right.
    • Don't press the key ⏎ Return.
  9. 9 Enter the address of the website you want to block. If, for example, you want to block the Yandex website, enter www.yandex.ru.
    • The new line should be like this: 127.0.0.1 www.yandex.ru.
    • To be sure to block a site, enter different spellings of the site address. For example, to block Yandex, enter yandex.ru and https://www.yandex.ru/.
    • To block sites in Google Chrome, enter two site addresses - without the "www" prefix and with this prefix. For example, to block Facebook, enter 127.0.0.1 facebook.com www.facebook.com.
  10. 10 Press the key ⏎ Return. The entered code will redirect requests from the site that you blocked to the feedback address from your computer.
    • If necessary, enter any number of website addresses, each new address must be entered on a new line, and the line must begin with the IP address 127.0.0.1.
  11. 11 Press the keys Control+X. Now confirm that you want to save your changes.
  12. 12 Click on Yto save the edited hosts file. The system will ask under what name to save the file. The original "hosts" file needs to be overwritten, so do not touch the file name.
  13. 13 Press the key ⏎ Return. Your changes will be saved and the original hosts file will be overwritten. The text editor will close and you will be returned to the terminal. From now on, access to the specified site (s) will be blocked in any browser on your computer.

Method 3 of 4: iPhone / iPad

  1. 1 Launch the Settings app . Click on the gray gear-shaped icon on the home screen.
  2. 2 Scroll and tap The main. This option is located at the bottom of the screen (on iPhone) or in the upper left corner of the screen (on iPad).
  3. 3 Scroll and tap Restrictions. You will find this option in the center of the screen.
  4. 4 Enter password. With this password, you have set restrictions on your iPhone or iPad.
    • If no restrictions are set, tap Enable Restrictions and enter your password twice.
  5. 5 Scroll and tap Websites. It's the bottom-most option in the Allowed Content section.
  6. 6 Tap Restrict access to adult sites. A blue checkmark will appear next to this option.
  7. 7 Tap Add site For more information, see the Never open section. This option is located at the bottom of the screen.
  8. 8 Enter the URL of the site you want to block. Start with the prefix "www" and end with the domain tag (for example, ".ru" or ".com"); thus, ignore the "https: //" prefix.
    • For example, to block the Facebook site on iPhone / iPad, enter www.facebook.com.
  9. 9 Tap Ready. You will find this blue button in the lower right corner of your keyboard. This will block the selected site in Safari.
    • Repeat these steps with other popular mobile browsers, such as Firefox and Chrome, if you wish.

Method 4 of 4: Android device

  1. 1 Install the BlockSite app. It blocks access to websites and apps on your Android device. Open play Market , and then:
    • click on the search bar;
    • enter blocksite and click "Find";
    • Tap Install next to BlockSite - Block Distracting Apps and Sites;
    • click "Accept" when prompted.
  2. 2 Run the installed application. Click "Open" in the Play Store or click on the shield-shaped icon in the Application Bar.
  3. 3 Tap Enable (Turn on). It's a green button at the bottom of the screen.
  4. 4 Click “Got it” when prompted. The "Access" menu of the "Settings" application will open; otherwise, do the following:
    • launch the "Settings" application;
    • scroll and tap Accessibility.
  5. 5 Activate BlockSite. In the Access menu, do the following:
    • click "BlockSite";
    • tap the gray toggle next to "BlockSite" .
  6. 6 Run Block Site again. Do this if you closed or minimized this application.
  7. 7 Click on +. It's a green button in the lower right corner of the screen. A page will open where you can block websites.
  8. 8 Enter the website address. Click the text box at the top of the screen and then enter the website address (for example, facebook.com).
  9. 9 Tap . This icon is in the upper right corner of the screen. The site will be added to the list of blocked sites, that is, this site will not open in Google Chrome.
    • To remove a site from the blacklist, click the trash can icon to the right of the site address.
  10. 10 Close all applications. To temporarily block an app, tap the "+" in the lower right corner of the screen, tap "Apps" and select an app.
    • To unblock an app, click the trash can icon to the right of the app.
  11. 11 Block adult content (if necessary). To find out how to block access to websites for adults or with prohibited content, read this article.

Tips

  • After editing the hosts file, clear the computer's DNS cache to prevent conflicts between the hosts file and the browser.
  • To unblock the site you added to the hosts file, open that file and remove the added lines. Be sure to save your changes; otherwise, sites will continue to be blocked.
  • IPhone restrictions apply to Safari and any other browsers.

Warnings

  • The hosts file does not always block websites. In this case, try blocking sites in different browsers.