How to Block a Website on Your Computer and How to Unblock it

In this digital age, it’s important to have control over the websites you or others can access on your computer. Whether you want to increase productivity, protect your children from inappropriate content, or simply block distracting websites, learning how to block and unblock websites is a valuable skill. Here you are gong to know the process of blocking and unblocking websites on your computer, using a simple method involving your computer’s host file.

Blocking a Website:

Open Notepad as Administrator:

  • To start, open your Windows search box and type “Notepad.”

  • Ensure you right-click on Notepad and choose the ‘Run as administrator’ option, as this step is essential when making system-level modifications.

Access the Host File:

  • In Notepad, click on “File” and then “Open.”

  • Go to the “Local Disk C” and access the “Windows” folder.

  • Scroll through and locate the “System32” folder, then proceed to open it.

Edit the Host File:

  • Inside the “System32” folder, locate and open the “drivers” folder.

  • Now, open the “etc” folder.

  • You’ll find a file named “hosts.” Select it and click “Open.”

Block the Website:

  • Scroll to the bottom of the “hosts” file, and you’ll see an example of how to block websites.

  • Copy the example text and paste it below.

  • To block a specific website, type “” followed by a space and then the URL of the website you want to block (e.g.,

  • Save the changes.

Verify the Block:

  • To confirm the website is blocked, open your web browser and try to access the blocked site. You can expect to encounter either an error message or a notification confirming that the website cannot be accessed.

Also Read: Common Website Issues and How to Avoid Them

Unblocking a Website:

Reopen the Host File: Follow steps 1 to 3 above to access the host file.

Remove the Block: In the host file, locate the line that corresponds to the website you want to unblock (e.g., “”). Delete this line.

Save Changes: Save the changes you made to the host file.

Test the Unblock: Open your web browser and try to access the previously blocked website. It should now be accessible.


Blocking and unblocking websites on your computer can be a useful way to manage your internet usage and protect your digital environment. By following the steps outlined in this article, you can easily block and unblock websites as needed. Remember to use this power responsibly and consider the reasons for blocking or unblocking specific websites to ensure a safe and productive online experience.

Leave a Reply

Your email address will not be published. Required fields are marked *