正確的配置host檔案,可以加快對某些網站的訪問速度,也可以遮蔽一些網站。
工具/原料
電腦
方法/步驟
開啟電腦裡面的系統盤,一般是C盤,然後開啟以此開啟“C:\Windows\System32\drivers\etc”
這個就是傳說中的“host”檔案。
為了安全起見,可以先備份這個檔案。複製這個檔案到桌面。然後滑鼠右鍵選擇“開啟方式”
選擇用“記事本”開啟。
這個裡面就是host檔案的內容。預設內容如下“
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
0.0.0.1 mssplus.mcafee.com
”
根據我們的需要,可以在最後面加入相應的資訊。
點選“檔案”,儲存,然後直接替換到系統盤的host檔案。
注意事項
替換host檔案之前,先備份host檔案。