


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!

This article explores why the author prefers OneCommander, a free third-party file explorer, over Windows File Explorer. The author highlights several key shortcomings of Windows File Explorer, including its slow adoption of modern features (like da

8BitDo Retro R8 Gaming Mouse: Great Value Offers are coming! The 8BitDo Xbox Edition R8 is an officially licensed translucent green wireless gaming mouse that uses a PAW 3395 sensor, supports three connectivity modes: Bluetooth, 2.4G and wired USB-C, and is equipped with programmable buttons and a charging dock. Amazon is selling well now! This high-performance wireless gaming mouse is currently priced at just $47.99, enjoying a 20% discount, a record low! Originally priced at $59.99, the R8 mouse is absolutely worth the money with its excellent features and officially licensed Xbox design. Its dazzling translucent green shell is similar to the first generation Xbo

Copilot PCs Get Enhanced Recall and Windows Search Features Microsoft's Copilot PCs are receiving significant updates to their Recall and Windows Search functionalities. These improvements leverage the power of the device's integrated TPU (Tensor

High CPU usage in Outlook? Microsoft's got a fix coming. Many Outlook users on Windows have reported a frustrating issue: their CPUs are spiking to 30-50% while simply composing emails. This impacts performance, battery life (especially on laptops),

Related ##### Before Dropbox and OneDrive, We Had Windows Briefcase Windows Briefcase: A Pioneer in File Synchronization. Posts 1 Choosing a navigation app? Bing Maps offers the closest experience to the discontinued Windows Maps. Google Maps and

The "breviation package" feature introduced by Windows 95 makes file synchronization possible. At that time, this function was unique in the field of file synchronization. However, with the rise of cloud services such as OneDrive, Microsoft has gradually phased out the "branded briefcase" feature since Windows 8. You might be surprised that file synchronization is not a new technology, in fact, Microsoft has provided this feature with a virtual folder called "Briefcase" as early as Windows 95. A brief history of Windows "Briefcase" As the name suggests, the "brookie" feature was released with Windows 95 released in 1995, which is still considered by many to be one of the best operating systems. It has user friends

Razer Pro Click V2 Vertical Edition Review: Comfort and Performance Razer's first vertical mouse, the Pro Click V2 vertical version, is known for its ergonomic design. The tilt angle of 71.7 degrees, like a handshake, effectively reduces wrist pressure. In terms of technical specifications, the vertical version and the standard version of Pro Click V2 have many similarities. Both are equipped with Razer's advanced Focus Pro optical sensor, with a maximum sensitivity of 30,000 DPI, a maximum speed of 550 inches per second and a maximum acceleration of 40G. All mechanical buttons can withstand 60 million clicks, ensuring durability. In terms of battery life, the vertical version is up to 6 months

Western Digital's 40TB HDDs: A Stepping Stone to 100TB Western Digital (WD) is gearing up to launch 40TB hard disk drives (HDDs), but their ambitions extend far beyond that. This move is a crucial step in WD's roadmap to achieve its ambitious goal:


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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Dreamweaver Mac version
Visual web development tools

WebStorm Mac version
Useful JavaScript development tools

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),
