How to block a website

Updated: 05/16/2020 by Computer Hope
Blocked website

Several options are available for blocking a website. Consider one of the options below, depending on your needs.

Tip

The list below was created in the order of what we recommend the most.

Blocking a website on a router

Access point

Most home networks today have a network router for sharing an Internet connection between multiple devices and can even block websites. We recommend blocking a website through a router because it can be password protected, prevents blocks from being bypassed, and because it blocks all devices. Blocking on the router can prevent your children from accessing a page (e.g., Facebook) on the computer, and any cell phone or tablet connected to your home network.

To block a website on a router, connect to the home network router. For most routers, this is done by opening a browser and visiting the default router address: http://192.168.1.1

If this address does not work or you're having trouble accessing your router setup, visit the link below.

After connecting to the router, block a website through one of the below features. Unfortunately, each router setup is different, so you'll need to find one of the below settings for your manufacturer of the router. Generally, one of these options will be available under a "Security," "Parental control," or "Firewall" tab or button.

  • URL Filter - Some routers may have a URL (uniform resource locator) filter section, which lets you enter the URL for each website you want to block.
  • Parental controls - New and more advanced routers have a section dedicated to parental controls, which gives you not only the option to block websites, but also specify the times the Internet can be accessed.
  • Firewall - Finally, if neither of the above options is available, the router should offer some type of filtering through the Firewall router settings.
Note

Although blocking a website on the router is one of the best ways to prevent access to websites, a child could still access the website through other means. They could connect to a neighbor's network if it's unprotected or use their cell phone's data service (e.g., 4G) to access the website. If you see any open networks in your neighborhood, try to educate your neighbors about the security vulnerabilities of leaving a network open.

Block a website using Family Safety

Note

Blocking a site using these steps only blocks the website on one computer. Any other computer, phone, or tablet connected to your home network can access the site you're blocking.

The new versions of Windows include a Family Safety feature that enable parents to set up usage rules, allowing them to control which websites their children view. If you're running Windows 7 or 8, open Family Safety from either the Windows Start menu or Start Screen. Type family and click the Family Safety or parental controls program in the search results.

Note

In Windows 10, parental controls are managed online through the Microsoft accounts website. User accounts that are a part of "Your Family" can be managed through your online Microsoft account.

When open, you see a screen similar to the example below which gives you access to web filtering, time limits, logs, and the type of games that can be played.

Windows Family Safety

Blocking a website in Windows

Note

Blocking a site using these steps only blocks the website on one computer. Any other computer, phone, or tablet connected to your home network can still access the site you're blocking.

A website can be blocked on any Windows computer by editing the hosts file (also see the lmhost file).

Locate the hosts file in Windows Explorer.

  • Windows XP and later versions: C:\WINDOWS\system32\drivers\etc\
  • Windows 2000 & NT: C:\WINNT\system32\drivers\etc\
  • Windows 98 & ME: C:\WINDOWS\

Navigate to the proper directory using Windows Explorer. Double-click the hosts file. Choose Notepad from the list of programs to open and edit the file in Notepad.

Find the line below:

127.0.0.1 localhost

Right underneath it, add the following lines (replacing badsite.com with the site you want to block):

127.0.0.1 badsite.com
127.0.0.1 www.badsite.com

Click File in the menu bar and select Save. Close the file. The site should be blocked in all web browsers and now instead of trying to access that site, the computer will redirect you to the localhost.

Blocking a website using software

Note

Blocking a site using these steps only blocks the website on one computer. Any other computer, phone, or tablet connected to your home network can still access the site you're blocking.

You can also block websites using a software firewall or a filter (such as a parent control Internet filter). Also, many antivirus programs come with a firewall or have an option to obtain one from them. Filtering software may also be available through the same companies or could be obtained separately. To configure these pieces of software to block websites, you must follow the instructions provided by the software vendor.

Blocking a website in a browser (Chrome, Firefox, IE)

Note

Blocking a site in a browser only blocks the site in one browser. Other browsers on the computer, and any computer, phone, or tablet connected to your home network, can still access the site you're blocking.

Blocking a website in Chrome

Although not available with the default install of Chrome, there are plenty of extensions that allow you to block sites in Chrome. Below are the steps to install BlockSite, a great extension for blocking websites.

Computer

  1. Visit the BlockSite extension page on the Chrome web store.
  2. Click the Add to Chrome button at the top-right of the page.
  3. Click the Add extension button on the pop-up window to confirm install of the extension. Once the extension is installed, a thank you page opens as a confirmation.
  4. Click Agree on the BlockSite page to allow BlockSite to detect and block adult content web pages.
  5. The BlockSite add-on Blocksite add-on icon icon is displayed at the top-right of the Chrome window.

After installing the extension and granting it permission to detect adult content web pages, you can add websites to the block list one of two ways.

  1. If you are on a website you want to block, click the BlockSite extension icon.
  2. Click the Block this site button.

or

  1. Click the BlockSite extension icon, then click the gear icon at the top-right of the BlockSite pop-up window.
  2. On the Block Sites configuration page, enter the web address for the website you want to block in the Enter a web address text field.
  3. Click the green plus symbol at the far-right of the web address text field to add the website to the block list.

There are other website blocking extensions available for Chrome. Visit the Chrome web store and search for "blocksite" to pull up a listing of available extensions that block websites.

Android mobile

To block sites on your Android tablet or smartphone, follow the steps below.

  1. Open the Google Play Store.
  2. Search for and install the BlockSite app.
  3. Open the BlockSite app.
  4. Move through the prompts and enable permissions for BlockSite in your device's settings.
  5. Tap the "+" symbol in the lower-right corner of the screen.
  6. Type in the web address of the site you'd like to block, and then tap the checkmark icon.

Blocking a website in Firefox

Although not available with the default install of Firefox, there are plenty of add-ons that allow you to block sites in Firefox. Below are the steps on installing BlockSite, a great add-on to block websites.

  1. Click the Tools menu and select Add-ons. If you don't see Tools, press the Alt key.
  2. At the top-middle of the Add-ons Manager page, there is a search bar. Perform a search for BlockSite. In the search results, click the BlockSite entry.
  3. On the BlockSite add-on page, click the Add to Firefox button.
  4. Click Add in the pop-up window.
  5. Click Okay, got it in the second pop-up window.
  6. The BlockSite add-on Blocksite add-on icon icon is displayed at the top-right of the Firefox window. Click the icon, then click Agree to allow BlockSite to detect and block adult content web pages.

After installing the add-on and granting it permission to detect adult content web pages, you can add websites to the block list one of two ways.

  1. If you are on a website you want to block, click the BlockSite add-on icon.
  2. Click the Block this site button.

or

  1. Click the BlockSite add-on icon, then click the gear icon at the top-right of the BlockSite pop-up window.
  2. On the Block Sites configuration page, enter the web address for the website you want to block in the Enter a web address text field.
  3. Click the green plus symbol at the far-right of the web address text field to add the website to the block list.

Blocking a website in Internet Explorer

Note

If you are running Windows 7 or Windows 8, website blocking settings are managed through Family Safety and not through Internet Explorer. For Windows 10, website blocking settings is handled through your online Microsoft account, by managing accounts that are part of "Your Family".

  1. Click Tools in the file menu and select Internet Options. If Tools is not visible, press the Alt key.
  2. In the Internet Options window, click the Content tab.
  3. Under the Content Advisor heading, click Enable if it has not yet been enabled, or click Settings, enter your supervisor password and click the OK button.
  4. In the Content Advisor window, click the Approved Sites tab to show a screen similar to the example below.

Internet Explorer website block

Enter the web address to block and click the Never button. Click the OK button to exit the Content Advisor window, then click OK again to exit the Internet Options window and continue browsing.