How to Block & Redirect Websites


Third-party software can block websites and redirect requests for certain websites to other sites. However, if you don't want to invest in third-party software, you can use your built-in hosts file to manage blocking and redirection instead. This file is included with the Windows operating system by default and is a key part of the computer's Internet connectivity. Examples of the types of sites you may want to block or redirect include sites with adult material and sites that contain malicious software that attacks your computer.

  • Open the "Start" menu, type "Notepad," right-click on the application that appears and click "Run as administrator."

  • Click "File," then "Open," then browse to "c:\windows\system32\drivers\etc." Click on "Hosts" and then click "Open."

  • Block a website by adding the line "" to the hosts file, by substituting "" with the URL of the website you want to block.

  • Redirect a website to another website by typing "123.456.789.012" at the end of the hosts file; "123.456.789.012" is the IP address of the website where you want to redirect the example domain "" to.

  • Save the file to update your blocking and redirecting preferences.

Tips & Warnings

  • You can find the IP address of a website by opening a Command Prompt window ("Start," "All Programs," "Accessories," "Command Prompt) and typing "ping"

Related Searches


Promoted By Zergnet


You May Also Like

Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

Is DIY in your DNA? Become part of our maker community.
Submit Your Work!