


Graphical tutorial on modifying the hosts file to block websites in WIN7
When you have problems accessing certain websites or want to block specific websites, modifying the hosts file can provide an effective solution. PHP editor Baicao will use this article to explain in detail the steps to modify the hosts file to block websites in Windows 7.
Find the hosts file. In the 32-bit system of Windows 7, the location of the hosts file is under the [C: WindowsSystem32driversetc] folder.
Right-click the hosts file, select the Open option, and Select [Notepad] in Open with.
After entering the editing mode using Notepad, enter the URL you want to block and an IP that is not the website on the network, as shown in the picture. The editor uses 127.0.0.1, which is the address of this machine.
After adding it, click [File] → [Save As] and select a save location. The location chosen by the editor is the desktop. Note that the name of the file should be written as [hosts] at this time.
At this time, a [hosts.txt] file will appear on the desktop. Rename it and remove its suffix.
Copy the obtained file to the directory where the hosts file is stored, which is [C: WindowsSystem32driversetc], and overwrite the original file.
At this time, enter the URL in the address bar of the browser, and you will find that we can no longer enter the homepage and have successfully blocked it.
Note:
To unblock, you only need to delete the corresponding entry or add]#[ in front of the corresponding entry.
The reason why it cannot be saved directly is that Windows does not allow direct modification of the hosts file, and ordinary users do not have permission to save the file in the directory where hosts are stored, so it can only be modified by overwriting.
The above is the detailed content of Graphical tutorial on modifying the hosts file to block websites in WIN7. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Article discusses sources for a permanent Windows 11 key valid until 2025, legal issues, and risks of using unofficial keys. Advises caution and legality.

Article discusses reliable sources for permanent Windows 11 activation keys in 2024, legal implications of third-party keys, and risks of using unofficial keys.

The Acer PD163Q Dual Portable Monitor: A Connectivity Nightmare I had high hopes for the Acer PD163Q. The concept of dual portable displays, conveniently connecting via a single cable, was incredibly appealing. Unfortunately, this alluring idea quic

Upgrade to Windows 11: Enhance Your PC Gaming Experience Windows 11 offers exciting new gaming features that significantly improve your PC gaming experience. This upgrade is worth considering for any PC gamer moving from Windows 10. Auto HDR: Eleva

Alienware AW3225QF: The best curved 4K display, is it worth buying? The Alienware AW3225QF is known as the best curved 4K display, and its powerful performance is unquestionable. The fast response time, stunning HDR effects and unlimited contrast, coupled with excellent color performance, are the advantages of this monitor. Although it is mainly aimed at gamers, if you can accept the shortcomings of OLED, it is also suitable for office workers who pursue high efficiency. Widescreen monitors are not only loved by gamers, but also favored by users who value productivity improvement. They are great for work and enhance anyone’s desktop experience. This Alienware monitor is usually expensive, but is currently enjoying it

A table of contents is a total game-changer when working with large files – it keeps everything organized and easy to navigate. Unfortunately, unlike Word, Microsoft Excel doesn’t have a simple “Table of Contents” button that adds t

ReactOS 0.4.15 includes new storage drivers, which should help with overall stability and UDB drive compatibility, as well as new drivers for networking. There are also many updates to fonts support, the desktop shell, Windows APIs, themes, and file

Buying a new monitor isn't a frequent occurrence. It's a long-term investment that often moves between computers. However, upgrading is inevitable, and the latest screen technology is tempting. But making the wrong choices can leave you with regret
