hosts文件修复方法

hosts文件修复方法:

hosts文件的重要性想必很多人都不知道,下面小编先为大家介绍hosts文件的作用

hosts是一个没有扩展名的系统文件,其基本作用就是将一些常用的网址域名与其对应的IP地址建立一个关联数据库,

  当用户在浏览器中输入一个需要登录的网址时,系统会首先自动从Hosts文件中寻找对应的IP地址,一旦找到,系统会立即打开对应网页,如果没有找到,则系统再会将网址提交DNS域名解析服务器进行IP地址的解析,如果发现是被屏蔽的IP或域名,就会禁止打开此网页!

那么如果hosts文件出错了该怎么办呢?下面就就随小编一起来学习一下hosts文件修复方法吧。

方法一:

1、在c盘C:WindowsSystem32driversetc文件夹中找到hosts文件

hosts文件修复方法

2、右键使用记事本打开

hosts文件修复方法

3、将以下内容复制该文件中

# 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

4、保存之后退出即可

hosts文件修复方法
方法二:

如方法一无效,那么就只能将整个host文件替换了

1、首先我们需要下载正确的hosts文件,下载地址如下:

hosts文件下载,host文件修复

2、将自己c盘C:WindowsSystem32driversetc中的hosts文件删除,将新下载的hosts文件放入相同位置

总结:以上就是hosts文件修复方法了,希望对 大家有帮助

本文来自互联网或AI生成,不代表系统内阁立场。本站不负任何法律责任。

如若转载请注明出处:https://www.system.cab/tutorials/23267.html

热心网友的头像热心网友
上一篇 2025-04-09 12:16
下一篇 2025-04-09 12:16

相关推荐

无论是个人用户还是专业人士,都能在这里找到适合自己的系统版本。
本站[系统内阁]所有内容来自互联网投稿或AI智能生成,并不代表[系统内阁]的立场。