Home System Tutorial Windows Series Graphical tutorial on modifying the hosts file to block websites in WIN7

Graphical tutorial on modifying the hosts file to block websites in WIN7

Apr 26, 2024 am 10:52 AM

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.

Graphical tutorial on modifying the hosts file to block websites in WIN7

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.

Graphical tutorial on modifying the hosts file to block websites in WIN7

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.

Graphical tutorial on modifying the hosts file to block websites in WIN7

At this time, a [hosts.txt] file will appear on the desktop. Rename it and remove its suffix.

Graphical tutorial on modifying the hosts file to block websites in WIN7

Copy the obtained file to the directory where the hosts file is stored, which is [C: WindowsSystem32driversetc], and overwrite the original file.

Graphical tutorial on modifying the hosts file to block websites in WIN7

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!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Microsoft's New PowerToys Search Is the Missing Feature Windows 11 Needs Microsoft's New PowerToys Search Is the Missing Feature Windows 11 Needs Apr 03, 2025 am 03:53 AM

Microsoft's latest PowerToys update introduces a game-changing search feature reminiscent of macOS' Spotlight. This improved "Command Palette" (formerly PowerToys Run) surpasses the functionality of the Windows R Run command and the task

Windows kb5054979 update information Update content list Windows kb5054979 update information Update content list Apr 15, 2025 pm 05:36 PM

KB5054979 is a cumulative security update released on March 27, 2025, for Windows 11 version 24H2. It targets .NET Framework versions 3.5 and 4.8.1, enhancing security and overall stability. Notably, the update addresses an issue with file and directory operations on UNC shares using System.IO APIs. Two installation methods are provided: one through Windows Settings by checking for updates under Windows Update, and the other via a manual download from the Microsoft Update Catalog.

How to Disable Windows 11 Round Corners: 4 Easy Methods! How to Disable Windows 11 Round Corners: 4 Easy Methods! Mar 27, 2025 pm 03:27 PM

This guide provides four methods to remove the rounded corners in Windows 11, restoring the classic square-edged look. While the rounded corners offer a modern aesthetic, some users prefer the sharper look for reasons including improved screenshot a

Why Do Some Keyboards Have Coiled Cables? Why Do Some Keyboards Have Coiled Cables? Mar 27, 2025 pm 09:01 PM

For mechanical keyboard enthusiasts, those intriguing coiled cables are a common sight. But why the coil? Let's delve into the reasons. Coiled Cables: Primarily Aesthetics The main draw of coiled cables is their visual appeal. They enhance the look

These Are My Go-To Free Alternatives for Paid Windows Apps These Are My Go-To Free Alternatives for Paid Windows Apps Apr 04, 2025 am 03:42 AM

Many free apps rival their paid counterparts in functionality. This list showcases excellent free Windows alternatives to popular paid software. I firmly believe in using free software unless a paid option offers a crucial, missing feature. These

You Can Get This Powerful Mini PC for Under $150 Today You Can Get This Powerful Mini PC for Under $150 Today Apr 02, 2025 am 03:55 AM

Kamrui GK3Plus Mini PC: Small and powerful, affordable! During Amazon's spring sale, the Kamrui GK3Plus Mini PC is priced as low as $150! This mini computer has powerful performance, easy upgrade and small size, making it an ideal choice for users who pursue cost-effectiveness. Whether it’s a mini computer enthusiast or a first-time user who’s trying out a small computer, the Kamrui GK3Plus Mini PC is an excellent starter choice. Originally priced at $199, Amazon currently enjoys a 15% discount (and a $20 coupon) and can be purchased for less than $149. Such a affordable price, but with a good configuration: equipped with a slightly old but competent In

Microsoft Might Finally Fix Windows 11's Start Menu Microsoft Might Finally Fix Windows 11's Start Menu Apr 10, 2025 pm 12:07 PM

Windows 11's Start Menu Gets a Much-Needed Overhaul Microsoft's Windows 11 Start menu, initially criticized for its less-than-intuitive app access, is undergoing a significant redesign. Early testing reveals a vastly improved user experience. The up

This Third-Party File Manager Is So Impressive That I Replaced Windows File Explorer With It This Third-Party File Manager Is So Impressive That I Replaced Windows File Explorer With It Apr 05, 2025 am 03:50 AM

File Pilot: A Superior Windows 11 File Explorer Replacement? OneCommander, Directory Opus, and Q-Dir are popular Windows 11 File Explorer alternatives. However, File Pilot stands out, offering compelling reasons to switch permanently. Exceptional Sp

See all articles