How to block a website without using any programs?   There are many freeware and shareware programs are available to block unwanted websites. Most of the anti-virus applications usually provide ways to block websites. But there are some easy ways to block websites by changing one of your system file. Blocking certain websites helps you to control kid’s activity on unwanted sites. You can use the hosts File, which is a computer file used in an operating system to map host names to IP addresses, to block any websites.
Related Posts:

• How to Edit Hosts File to Block Unwanted Sites, Ads, Banners and More
• How to Block URL or Websites in Internet explorer?
• How to Block Website in Firefox? Blocking URL in Mozilla Firefox

As we discussed in the above articles, you can block any website by adding an entry in the hosts file. All you need to do is to locate the hosts file depending on your operating system and add the entries and the save the file. You should have administrative privileges to do the same. But do remember that anyone who knows this trick can easily edit this file and remove the block. There are other means to access blocked sites also.

In other programs website blocking programs may allow you to set the password to change the settings. Here any one with administrative privileges can edit and change the file. Even though it is not critical it is always better to take a backup of the file before doing any changes.

## How to block website on Mac using hosts file?

The location of the hosts file in Mac OS is “/etc/hosts”.
You can either use the command “sudo /etc/hosts” from terminal or from the Go menu –> “Go to folder” type “/etc/” and from the folder window, open the “hosts” file in a text editor. Type the following in a new line.

1 127.0.0.1 sitetoblock.com

Replace “sitetoblock.com” with the site you want to block.

## How to block website on Windows using hosts file?

The steps required to edit the hosts file in windows in explained in the below post.
How to Edit Hosts File to Block Unwanted Sites, Ads, Banners and More
As explained for windows also you just need to add new entries in the hosts file.

You can block as many websites as you like with the above procedure. You just need to add new entries into the file. If you want to remove the ban later, open the same hosts file and delete the necessary lines.