How to block a website in windows:

Hi friends today I will tell you how to block any website on your computer.

I f you want to block certain websites on your computer you can block those websites by making little changes in windows “Hosts” file.

What is Hosts File?

Host file is a system file used by the operating system to map host names to IP addresses.

How it works?

Web browsers will check the DNS entry in the Host file on your computer before opening any website. Iif DNS entry is not found for specific website, then it will go to Internet service provider to get IP address of website. Enter any website entry that you want to block in your host file with wrong IP address, then while loading that website web browsers try to load with a wrong IP address.

Follow the below steps to block any website in your computer.

Step 1: Open your hosts file with notepad (Go to run and type notepad C:\Windows\System32\drivers\etc\hosts and hit enter.

BlockfbStep 2: Add the following code below # localhost

>>>Click Here to Know How to Edit Hosts File.

Ex : if you want to block youtube on your computer add

In your hosts file.

Blockfb3Step 3: Save your host file.

Open any web browser and then try to open youtube, it won’t open.

That’s it.

Enjoy 🙂

Thank you for visiting  If you find any mistakes help us by leaving a comment.

Don’t Miss : How to create a Shortcut to Quickly edit your Hosts file.