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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

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)

win11 activation key permanent 2025 win11 activation key permanent 2025 Mar 18, 2025 pm 05:57 PM

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

win11 activation key permanent 2024 win11 activation key permanent 2024 Mar 18, 2025 pm 05:56 PM

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

Acer PD163Q Dual Portable Monitor Review: I Really Wanted to Love This Acer PD163Q Dual Portable Monitor Review: I Really Wanted to Love This Mar 18, 2025 am 03:04 AM

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

Top 3 Windows 11 Gaming Features That Outshine Windows 10 Top 3 Windows 11 Gaming Features That Outshine Windows 10 Mar 16, 2025 am 12:17 AM

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

This Wild Ultra-Wide Alienware Monitor is $300 Off Today This Wild Ultra-Wide Alienware Monitor is $300 Off Today Mar 13, 2025 pm 12:21 PM

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

How to Create a Dynamic Table of Contents in Excel How to Create a Dynamic Table of Contents in Excel Mar 24, 2025 am 08:01 AM

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, the Open-Source Windows, Just Got an Update ReactOS, the Open-Source Windows, Just Got an Update Mar 25, 2025 am 03:02 AM

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

Shopping for a New Monitor? 8 Mistakes to Avoid Shopping for a New Monitor? 8 Mistakes to Avoid Mar 18, 2025 am 03:01 AM

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

See all articles