Block Access to certain Websites in Windows Using Command Prompt
If you want to block certain websites on all browsers in Windows PC, but you are not sure how to do it. This tutorial is for you, here you will learn how to block Access to certain websites on all browsers in windows pc using command prompt.
To block access to certain websites on your Windows PC, you have to make some additions into the Windows hosts file. We make these additions into windows hosts file using command prompt.
Follow these steps to Block Certain Website in Windows PC using Command Prompt.
- Open Command Prompt as Administrator by Pressing Win Key + R, run window will open, type cmd into the text box and press CTRL+SHIFT+Enter

- In Command Prompt, First insert line break , type or past the following command and press enter key
echo. ^ >> %WINDIR%\System32\Drivers\Etc\Hosts

- Type/past the following command and press enter key, and replace “websitename.com” with the address of a website that you want to block in your Windows PC.
echo 127.0.0.1 websitename.com>> %WINDIR%\System32\Drivers\Etc\Hosts
suppose we want to block www.bing.com on my Windows PC

- To check whether Bing.com is blocked or not on your Windows PC, open your browser and visit www.bing.com.

Here you can see that bing.com is not opening in the browser.
Read Also:
I hope this tutorial will helps to block access to certain websites in Windows using Command Prompt. If you have any query, suggestion or feedback feel free to contact us using the information provided on our contact us page.