How to Block Any Website Using Notepad in Any Windows PC or Laptop - Block Bad, adult or Addicted Website

    In this tutorial, we will learn how to block any website using Notepad on any Windows operating system, including Windows 7, 8, 8.1, 10, and 11. By using this method, you can block adult websites, social media sites, or any website that you want to block to protect your family or control your employees.

How to Block Any Website Using Notepad in Any Windows PC or Laptop - Block Bad Addicted Website

To begin, click on the Start menu and search for Notepad. Once you have opened Notepad,

Open Notepad in Windows

(For Example I Blocking facebook Web site you Can Block Any website or Multimpale Website jaut add it on new line )  
 
The hosts file is responsible for controlling internet access to websites. By editing this file, we can block access to any website. In the hosts file, add the following line in Notepad to block a specific website:


@echo off
cd "C:WindowsSystem32Driversetc"

echo 127.0.0.1 www.facebook.com >> "Hosts"
echo 127.0.0.1 m.facebook.com >> "Hosts"
echo 127.0.0.1 facebook.com >> "Hosts"

echo 127.0.0.1 www.forMultimpale.com >> "Hosts"
echo 127.0.0.1 www.example.com >> "Hosts"

Command for bloking any Bad adult or Addicted Website


Replace "example.com" with the website you want to block. You can add multiple websites by adding new lines in the same format.

after That click on File  -   Save As in Notepad

Save As in Notepad

Save the file with .bat extension, for example, save  with "website_blocker.bat"

Save Notepad file for bloking any Bad adult or Addicted Website with bat Extension

Run the website_blocker.bat file as an administrator to block the websites.

Run the website_blocker.bat file as an administrator to block the websites
To test if the websites are blocked, open your web browser and try to access the blocked websites.

test blocked websites

 

If the websites are still accessible, clear your browsing data and relaunch your browser.


To clear your browsing data and relaunch your browser, follow these steps:

1. Open your web browser.

2. Click on the three dots icon in the top right corner of the browser window.

Click the three-dot icon under X button at the top-right corner in browser

3. Select "More tools" and then "Clear browsing data".

Click the Clear browsing data in browser

4. In the pop-up window, Select Advanced, select "All time" as the time range and check the boxes for the types of data you want to clear (e.g. browsing history, cookies, cached images and files).

clear browsing data Advanced tab

5.  Time range Select to All Time.

clear browsing data Advanced tab Time range Select to All Time

6. Click on "Clear data" to clear the selected data.

clear browsing data

Once the data is cleared, close and relaunch your browser.
After clearing your browsing data and relaunching your browser, the blocked websites should no longer be accessible.

We Have Made a Video on the Same Topic


Google, coding, Programming Knowledge, Web development, windows Technical
Share on Twitter
programming knowledge Programming Knowledge
Youtube Educational Histry
https://discoverabhi.com

About Us

It is about Bahujan Samaj Books & news.

Thank you for your support!

Contact us

Abhijit Mohan Deshmane, mobile no 9011376209