
- Javascript Basics Tutorial
- Javascript - Home
- Javascript - Overview
- Javascript - Syntax
- Javascript - Enabling
- Javascript - Placement
- Javascript - Variables
- Javascript - Operators
- Javascript - If...Else
- Javascript - Switch Case
- Javascript - While Loop
- Javascript - For Loop
- Javascript - For...in
- Javascript - Loop Control
- Javascript - Functions
- Javascript - Events
- Javascript - Cookies
- Javascript - Page Redirect
- Javascript - Dialog Boxes
- Javascript - Void Keyword
- Javascript - Page Printing
- JavaScript Objects
- Javascript - Objects
- Javascript - Number
- Javascript - Boolean
- Javascript - Strings
- Javascript - Arrays
- Javascript - Date
- Javascript - Math
- Javascript - RegExp
- Javascript - HTML DOM
- JavaScript Advanced
- Javascript - Error Handling
- Javascript - Validations
- Javascript - Animation
- Javascript - Multimedia
- Javascript - Debugging
- Javascript - Image Map
- Javascript - Browsers
- JavaScript Useful Resources
- Javascript - Questions And Answers
- Javascript - Quick Guide
- Javascript - Functions
- Javascript - Resources
How to block a website in your web browsers (Chrome and Internet Explorer)
To block a website on any of the web browsers like Google Chrome, Firefox, and Internet Explorer in a Windows system is quite easy. Follow the below-given steps to block a website −
Open Notepad as an administrator i.e. Run as Administrator.
Now, after opening Notepad, click on File, then click Open and move to the following path −
C:\Windows\System32\drivers\etc
The following files will be visible. Click hosts and open it in Notepad −
The notepad file will consist of some text. Reach the last line and press enter. Here, add the following to block any website and click Save to save the Notepad. We’re blocking www.facebook.com here −
After typing 127.0.0.1, press TAB and then type the name of a website you want to block −
127.0.0.1 www.facebook.com
127.0.0.1 is the loopback address to your own system. This line will return an error page in the web browser when someone tries to open the blocked website i.e. www.facebook.com in our case.
To unblock the website, just delete the line and Save the Notepad.
- Related Articles
- How to fix Array indexOf() in JavaScript for Internet Explorer browsers?
- How to enable JavaScript in Internet Explorer (IE)?
- How to disable JavaScript in Internet Explorer (IE)?
- Using HP UFT GetCellData function on SAP Web Dynpro crash Internet Explorer
- How to Block Ads in Android Chrome?
- How can we debug JavaScript in Internet Explorer?
- How to run Selenium tests on Internet Explorer browser?
- How to Block Pop-Ups on Google Chrome?
- How to enable / Disable Enhanced Protection Mode in Internet Explorer using PowerShell?
- Internet and Web Programming
- Coolnovo a web browser similar to google chrome
- Which is the best browser to use: Chrome, Explorer, or Firefox?
- Reduce download conflicts between web browsers
- Difference Between Web page and Website
- How to open a website in Android’s web browser from any application?
