For any reason sometimes you need to block any website. Maybe you need to protect your children to access porn website or gambling website even from social network website if you don’t want they have relation with stranger. There are many commercial softwares which offer ability to block website, but before trying it, you can try this tips to block website without software.
If you are Windows user, you can access host file from folder c:windowssystem32etc and open it with your text editor. The purpose of this file is as DNS so if you want to block a specific website, you need to redirect domain to any IP address. For example you want to block facebook.com just add this command to host file
It will show error page if someone access facebook.com. But for better idea you can change 127.0.0.2 to Google IP address so anyone who doesn’t notice it was blocked. To find Google IP address, just run command prompt and type: nslookup google.com and copy one IP address that was provided for example 126.96.36.199. Next edit host file again, change 127.0.0.2 to 188.8.131.52 so your host file will contain
It will open Google.com page if someone access facebook.com.
The website and IP address above just as an example, so you can modify it base on your requirement. If you want to unblock it just remove the command from host file. I hope you will comfortable with your computer and internet.