您的Internet 服务提供商(Internet Service Provider)( ISP ) 提供的(ISP)DNS服务器是否太慢?您担心网络安全吗?或者,也许您想保护您的孩子免受不当网站的侵害?不管是什么原因,将您计算机的DNS服务器更改为新的,例如由(DNS)Cloudflare、Google或OpenDNS维护的公共DNS服务器可能会有所帮助。以下是在Windows 10中设置(Windows 10)DNS服务器的三种方法:
注意:(NOTE:)如果您不知道DNS是什么,请阅读:什么是DNS?如何在Windows中查看我的(Windows)DNS设置?此外,如果您想了解为什么公共DNS服务器比您的ISP(互联网服务提供商)提供的服务器更好,请阅读:使用(Internet Service Provider)第三方公共(party public)DNS服务器的6 个理由。
方法 1(Method 1)。从“设置”应用(Settings app)更改DNS服务器
如果您使用的是最新版本的Windows 10 ,您可以从“设置”(Settings)应用轻松为您的网络连接设置新的(network connection)DNS服务器。首先(Start)打开设置:单击或点击(click or tap)开始菜单(Start Menu)中的按钮,或同时按下键盘上的Windows + I键。然后,转到网络和互联网(Network & Internet)。
如果要更改以太网连接使用的(Ethernet connection)DNS服务器,请在窗口左侧单击或点击(click or tap)以太网(Ethernet)。如果您想更改无线连接使用的DNS服务器,请单击或点击(click or tap)Wi-Fi。
在窗口右侧,无论您使用的是有线连接还是无线连接,单击或点击(click or tap)您的网络连接(network connection)名称。
在网络连接(network connection)详细信息页面上,滚动直到找到IP 设置(IP settings)部分,然后单击或点击编辑(Edit)按钮。它是那里唯一的一个,所以你不能错过它。
设置应用程序会打开一个名为(Settings)“编辑 IP 设置”("Edit IP settings.")的对话框。在其中,选择手动(Manual)并打开IPv4开关。
接下来,向下滚动,直到您到达首选 DNS(Preferred DNS)和备用 DNS(Alternate DNS)字段。您可以在此处指定要用于网络连接的两个(network connection)DNS服务器。在首选 DNS(Preferred DNS)字段中,键入要使用的DNS 服务器的(DNS server)IP 地址(IP address),如果需要,在备用 DNS(Alternate DNS)字段中键入备份选项。(backup option)在下一个屏幕截图中,您可以看到我们选择使用Cloudflare的公共DNS服务器。
完成后,按保存(Save)按钮并重新启动 Windows 10计算机或设备(computer or device),以便操作系统(operating system)可以应用您的更改。
Windows 10重新启动后,它应该使用您设置的DNS服务器,而不是您的(DNS)路由器或 ISP(router or ISP)(互联网服务提供商(Internet Service Provider))提供的默认服务器。
方法二(Method 2)。从控制面板(Control Panel)中的网络连接(Network Connections)更改DNS服务器
Windows 10 还允许您从控制面板中的(Control Panel)网络连接(Network Connections)部分更改网络连接使用的(network connection)DNS服务器。要访问网络连接(Network Connections),请打开控制面板(Control Panel),导航到网络和 Internet(Network and Internet),访问网络和共享中心(Network and Sharing Center),然后单击或点击(click or tap)窗口左侧的更改适配器设置(Change adapter settings)。
或者,您可以打开设置(Settings)应用程序,导航到网络和 Internet(Network & Internet),选择窗口左侧的状态(Status),然后单击或点击右侧的更改适配器选项。(Change adapter options)
无论哪种方式,您都应该进入名为Network Connections的窗口,它看起来像下一个屏幕截图。您会发现列出了您的 Windows 10 PC 上安装的所有网络适配器。(network adapter)找到用于连接到 Internet的网络适配器。(network adapter)然后,右键单击或点击并按住(tap and hold)它。在上下文菜单中,单击或点击(click or tap)属性(Properties)。
Windows 10 会打开该网络适配器的“(network adapter)属性(Properties)”窗口。确保(Make)您位于网络选项卡上,然后从(Networking)网络连接(network connection)使用的项目列表中选择"Internet Protocol Version 4 (TCP / IPv4)"。然后,单击或点击(click or tap)列表下方的“属性”按钮。(Properties)
"Internet Protocol Version 4 (TCP / IPv4) Properties"窗口的底部,有一个设置,默认情况下,您的网络连接(network connection) “自动获取 [s] DNS 服务器地址”。("Obtain[s] DNS server address automatically.")如果要更改网络适配器使用的(network adapter)DNS服务器,请标记“使用以下 DNS 服务器地址”("Use the following DNS server addresses")选项并输入您希望 Windows 10 PC 使用的DNS服务器的 IP 地址。
按OK并关闭您在此过程中打开的所有窗口。然后重新启动您的 Windows 10计算机或设备(computer or device),以便它可以应用更改并开始使用您设置的新DNS服务器。(DNS)
方法3(Method 3)。从命令提示符或 PowerShell(Command Prompt or PowerShell)更改DNS服务器
有些人更喜欢命令行环境而不是图形界面。如果您是其中之一,请知道您也可以从命令提示符或 PowerShell(Command Prompt or PowerShell)更改Internet 连接使用的DNS服务器。为此,首先以管理员身份打开您喜欢的那个。
您应该运行的第一个命令是netsh(按Enter 键(Enter)),然后是interface show interface(按Enter 键(Enter))。这将向您显示 Windows 10 PC 上启用的所有网络连接。
请注意您要更改DNS服务器的(DNS)网络连接(network connection):它可能是Connected的那个。
接下来,键入以下命令:interface ip set dnsservers "Network Connection" static [DNS server IP address],其中"Network Connection"是您的网络适配器(network adapter)的名称,[DNS server IP address]是DNS(DNS server)服务器的IP 地址(IP address)你想使用的。例如,对于我们的Wi-Fi网络连接(network connection),我们想从Cloudflare设置一个(Cloudflare)DNS 服务器(DNS server),其IP 地址为 1.1.1.1(IP address 1.1.1.1)。为此,我们必须输入interface ip set dnsservers "Wi-Fi" static 1.1.1.1。
按键盘上的Enter键,立即设置新的DNS 服务器。(DNS server)
您是否更改了 DNS 服务器?
如您所见,更改 Windows 10 PC 使用的DNS服务器并不复杂。无论(Whether)您是因为您的ISP提供的(ISP)DNS服务器太慢而这样做,还是您想增强您的安全性,现在您知道如何进行切换了。如果您有任何问题或有什么要添加到我们的教程中,请随时在下面发表评论。
3 ways to change the DNS settings in Windows 10
Are the DNS servers providеd by your Internet Servіce Proνider (ISP) too slow? Are you concerned abоut online securіtу? Оr maybe you want to protect your children from inappropriate websites? Whatever the rеason, changing your computer's DNS serverѕ to something new, like the public DNS servers maintained by Сloudflare, Google, or OpenDNS can be helpful. Here are three wayѕ to set DNS servers in Windows 10:
NOTE: If you do not know what DNS is, read: What is DNS? How do I see my DNS settings in Windows?. Furthermore, if you want to understand why public DNS servers can be better than the ones provided by your ISP (Internet Service Provider), read: 6 reasons why you should use third party public DNS servers.
Method 1. Change the DNS servers from the Settings app
If you're using a recent version of Windows 10, you can easily set new DNS servers for your network connection, from the Settings app. Start by opening the Settings: click or tap on its button from the Start Menu or simultaneously press the Windows + I keys on your keyboard. Then, go to Network & Internet.
If you want to change the DNS servers used by your Ethernet connection, on the left side of the window, click or tap on Ethernet. If you want to change the DNS servers used by your wireless connection, click or tap on Wi-Fi.
On the right side of the window, regardless of whether you're using a wired or wireless connection, click or tap on the name of your network connection.
On the network connection details page, scroll until you find the IP settings section and then click or tap the Edit button. It is the only one there, so you can't miss it.
The Settings app opens a dialog box called "Edit IP settings." In it, select Manual and turn the IPv4 switch on.
Next, scroll down until you get to the Preferred DNS and Alternate DNS fields. This is the place where you can specify the two DNS servers that you want to use for your network connection. In the Preferred DNS field, type the IP address of the DNS server that you want to use, and, if you want, type a backup option in the Alternate DNS field. In the next screenshot, you can see that we chose to use Cloudflare's public DNS servers.
When you're done, press the Save button and restart your Windows 10 computer or device so that the operating system can apply your changes.
After Windows 10 restarts, it should use the DNS servers you set, instead of the default ones provided by your router or ISP (Internet Service Provider).
Method 2. Change the DNS servers from the Network Connections in Control Panel
Windows 10 also lets you change the DNS servers used by a network connection from the Network Connections section in Control Panel. To get to the Network Connections, open the Control Panel, navigate to Network and Internet, access the Network and Sharing Center, and click or tap on Change adapter settings on the left side of the window.
Alternatively, you can open the Settings app, navigate to Network & Internet, select Status on the left side of the window, and then click or tap on Change adapter options on its right.
Either way, you should get to the window called Network Connections, which looks like the next screenshot. You find listed all the network adapters installed on your Windows 10 PC. Locate the network adapter that you use for connecting to the internet. Then, right-click or tap and hold on it. In the contextual menu, click or tap on Properties.
Windows 10 opens the Properties window of that network adapter. Make sure that you are on the Networking tab, and select "Internet Protocol Version 4 (TCP / IPv4)" from the list of items used by the network connection. Then, click or tap on the Properties button found below the list.
Towards the bottom of the "Internet Protocol Version 4 (TCP / IPv4) Properties" window, there's a setting which, by default, says that your network connection "Obtain[s] DNS server address automatically." If you want to change the DNS servers used by your network adapter, mark the "Use the following DNS server addresses" option and enter the IP addresses of the DNS servers you want your Windows 10 PC to use.
Press OK and close all the windows you've opened throughout this process. Then restart your Windows 10 computer or device so that it can apply the changes and start using the new DNS servers that you've set.
Method 3. Change the DNS servers from the Command Prompt or PowerShell
Some people prefer command-line environments to graphical interfaces. If you're one of them, know that you can change the DNS servers used by your internet connection from the Command Prompt or PowerShell also. For that, first open the one you prefer, as an administrator.
The first commands you should run are netsh (press Enter) and then interface show interface (press Enter). This shows you all the network connections that are enabled on your Windows 10 PC.
Note the network connection for which you want to change the DNS servers: it's probably the one that is Connected.
Next, type the following command: interface ip set dnsservers "Network Connection" static [DNS server IP address], where "Network Connection" is the name of your network adapter and [DNS server IP address] is the IP address of the DNS server that you want to use. For example, for our Wi-Fi network connection, we wanted to set a DNS server from Cloudflare, which has the IP address 1.1.1.1. To do that, we had to type interface ip set dnsservers "Wi-Fi" static 1.1.1.1.
Press Enter on your keyboard, and the new DNS server is immediately set.
Did you change your DNS servers?
As you've seen, changing the DNS servers used by your Windows 10 PC is not that complicated. Whether you do it because the DNS servers provided by your ISP are too slow, or you want to enhance your security, now you know how to make the switch. If you have questions or if you have something to add to our tutorial, don't hesitate to leave a comment below.