How to change a DNS server on any device

A DNS (domain name system) server translates website names, like nordvpn.com, into the IP addresses your device needs to load them. Changing the DNS server can improve browsing speed, add privacy, block some malicious domains, or bypass certain network restrictions. With this guide, you’ll learn how to change the DNS server on Windows 10, Windows 11, Mac, Android, iPhone, Linux, and routers.

Jun 17, 2026

11 min read

How to change DNS on Windows 10/11

There are two common ways to change your DNS server on Windows:

  • Through “Control panel”
  • Through Windows “Settings”

The process of changing DNS settings in Windows 10 and 11 is similar. The main difference is the “Settings” interface: Windows 11 has a newer “Network & internet” layout, while Windows 10 retains more of the older structure. The Control Panel method is nearly the same on both versions.

Use “Control panel” if you want a method that works on both Windows 10 and 11. Use “Settings” if you prefer the newer interface.

Change your DNS server via “Control panel” (Windows 10 and 11)

The “Control panel” route is useful because it looks familiar on both Windows versions. Follow these steps:

  1. 1.Open the “Start” menu.
  2. 2.Search for “Control panel” and open it.
  3. 3.Go to “Network and internet” > “Network and sharing center.”
  4. 4.Click “Change adapter settings.”
    change adapter options
  5. 5.Right-click your active connection. This may be “Wi-Fi” or “Ethernet.”
    ethernet properties
  6. 6.Select “Properties.”
  7. 7.Click “Internet protocol version 4 (TCP/IPv4).”
    IPv4 properties
  8. 8.Select “Properties.”
  9. 9.Choose “Use the following DNS server addresses.”
  10. 10.Enter the preferred and alternate server addresses for your chosen DNS service.
  11. 11.Click “Ok,” then close the remaining windows.

To change IPv6 DNS, repeat the process for “Internet protocol version 6 (TCP/IPv6)” and enter IPv6 DNS addresses.

Change your DNS server via Windows 10 settings

You can also change DNS through the Windows 10 “Settings” app:

  1. 1.Open “Settings” and go to “Network & internet.”
  2. 2.Select “Wi-Fi” or “Ethernet,” depending on your connection.
  3. 3.For Wi-Fi, click your active network. For Ethernet, click the connected network.
  4. 4.Scroll to “IP settings” and click “Edit.”
  5. 5.Change the setting from “Automatic (DHCP)” to “Manual.”
  6. 6.Turn on IPv4.
  7. 7.Enter your preferred DNS and alternate DNS.
  8. 8.Click “Save.”

Change your DNS server via Windows 11 settings

Windows 11 lets you change your DNS server settings directly in the Settings app. This is the simplest way if you don’t want to use “Control panel”:

  1. 1.Open “Settings” and go to “Network & internet.”
  2. 2.Select “Wi-Fi” or “Ethernet.”
  3. 3.For Wi-Fi, select your connected network or open “Hardware properties.”
  4. 4.Find “DNS server assignment” and click “Edit.”
    DNS server assignment
  5. 5.Choose “Manual.”
    manual
  6. 6.Turn on IPv4 and/or IPv6.
    adjust DNS settings
  7. 7.Enter your preferred and alternate DNS servers.
  8. 8.Click “Save.”

Windows 11 also supports DNS over HTTPS for some DNS providers, depending on your configuration. If the option appears, you can enable it for encrypted DNS queries.

How to change DNS on Android devices

Android DNS settings vary slightly by phone brand, but the general path is similar. You can change the DNS for a specific Wi-Fi network, or use Private DNS on Android 9 or later.

To change DNS for a Wi-Fi network:

  1. 1.Open your device’s “Settings.”
    Android phone settings
  2. 2.Go to “Connections” and choose “Wi-Fi.”
    Android connections
    wifi android
  3. 3.Find the “Current network,” tap the cog icon, and press “View more.”
    Android cog
  4. 4.Change your “IP settings” to “Static.”
    Android IP settings
    Android static
  5. 5.Scroll down to the “DNS 1” and “DNS 2” fields that appear and enter your chosen DNS addresses. Tap “Save.”
    Android DNS1 DNS2 save
  6. 6.Disconnect from the network, then reconnect for the changes to take effect.

On Android 9 and newer, you can also use private DNS:

  1. 1.Go to “Settings” > “Network & internet” > “Private DNS.”
  2. 2.Choose “Private DNS provider hostname” and enter the provider hostname.

This is important: Android doesn’t let you enter an IP address like 8.8.8.8 or 8.8.4.4. Instead, you must enter the corresponding hostname. For example, for Google Public DNS, that’s "dns.google," and for CloudFlare DNS, you’ll need to type "1dot1dot1dot1.cloudflare-dns.com."

How to change DNS on a Mac

On macOS, DNS settings are inside the “Network” menu. You can set DNS separately for Wi-Fi, Ethernet, or other network services.

Follow these steps:

  1. 1.Go to “System preferences” and click on “Network.”
    system preferences and network
  2. 2.Select the network interface you are using and tap “Details.”
    network and details
  3. 3.Open the “DNS” tab and click the “+” button at the bottom, then add the DNS server addresses of your choice.
    add DNS server address

How to change DNS on an iPhone

You can change DNS settings on an iPhone with the following steps:

  1. 1.Open your device’s “Settings.”
  2. 2.Tap on “Wi-Fi.” You’ll have to turn it on if it’s been switched off.
    iOS wifi
  3. 3.Choose a Wi-Fi network and tap the blue “i” icon.
    iOS i
  4. 4.Then tap “Configure DNS” and select “Manual.”
    configure DNS
    ios manual
  5. 5.Tap “Add server” and add the DNS addresses of your choice.
    iOS add server

Important: iOS DNS settings are network-specific. If you connect to a different Wi-Fi network later, you’ll need to reconfigure DNS for that network.

How to change DNS on a router

You may want to change the DNS settings on your router to improve internet browsing speed, security, and efficiency. By default, your router uses DNS servers operated by your ISP. All the devices connected to your network use the same DNS servers that your router does, which means that by changing DNS server settings on your router, you also apply the same configuration to every device on your network. So let’s see how it’s done on different routers.

Change DNS on an Asus router

On Asus routers, DNS settings are usually under the WAN menu. The exact wording may vary slightly by model, but the process is generally the same:

  1. 1.To access your router settings, type “http://192.168.1.1” into your browser’s address bar.
  2. 2.Select “WAN” from the left-side menu and click the “Internet connection” tab.
  3. 3.Scroll down to “WAN DNS setting” and change the setting “Connect to DNS server automatically” to “No.”
  4. 4.Enter your preferred primary and secondary DNS server addresses in the “DNS server 1” and “DNS server 2” fields.
  5. 5.Click “Apply” to save the new settings.

Change DNS on a NetGear router

​​First, you need to find the default gateway IP address of your specific router. Type “cmd” into the search field on your desktop taskbar to open “Command Prompt,” enter “ipconfig,” and find the string of numbers listed next to “Default gateway.” 

Having found your router’s default gateway IP, follow these steps:

  1. 1.Enter the default gateway IP address into your browser to sign in to the NetGear web interface.
  2. 2.If your NetGear interface has both “Basic” and “Advanced” tabs displayed at the top of the page, select “Basic” and click on “Internet.” If it only has the “Basic” tab, just click “Settings.”
  3. 3.Under the DNS address, select “Use these DNS servers.”
  4. 4.Enter your preferred primary and secondary DNS server addresses in the “Primary DNS” and “Secondary DNS” fields.
  5. 5.Click “Apply” and restart your device if prompted. 

Change DNS on a Linksys router

Linksys menus differ between older routers and newer mesh systems, but the idea is the same:

  1. 1.To sign in to your Linksys router’s web interface, type “http://192.168.1.1” into your browser’s address bar.
  2. 2.Click “Setup” on the main menu and select “Basic setup.”
  3. 3.Enter your preferred primary and secondary DNS server addresses in the “Static DNS 1” and “Static DNS 2” fields.
  4. 4.You can add a different DNS server address in the “Static DNS 3” field, or you can leave that field blank.
  5. 5.To save the new settings, click “Apply” at the bottom of the screen.

Another way to make your connection and online traffic more secure is to set up a VPN on your router. You may use up to a total of ten devices simultaneously with one active NordVPN subscription. However, you can configure your router with a VPN connection to cover your whole household while using only one of the ten available slots.

How to change DNS on Linux

If you’re comfortable using the command line, you can change your DNS server on Linux through the terminal with these steps:

  1. 1.Press “Ctrl + T” to open the terminal.
  2. 2.Enter the following command to become the root user: su
    How to change Your DNS server on Linux 1
  3. 3.Having entered your root password, run these commands:rm -r /etc/resolv.confnano /etc/resolv.conf
    How to change Your DNS server on Linux 2
  4. 4.When the text editor opens, type in “nameserver” and the preferred DNS server addresses:nameserver [primary DNS server address]nameserver [secondary DNS server address]
    How to change Your DNS server on Linux 3
  5. 5.Close and save the file. You can do so by clicking “Ctrl + X” and pressing “Y.” Then type in the terminal:chattr +i /etc/resolv.confreboot nowpic
    How to change Your DNS server on Linux 4

Why change the DNS server?

You can benefit in several ways by changing your DNS server:

  • Better speed. If your internet connection is slow due to high traffic going through your current DNS server, you can choose a faster server and improve the speed at which your computer loads websites.
  • More privacy and security. Since your internet service provider (ISP) assigns your DNS and IP addresses, you might be subjected to ISP tracking. That means your ISP may be tracking which websites you visit and how long you spend there, what content you’re viewing, and your IP address. If you change your DNS server, you limit the amount of data your ISP can collect on you. A secure DNS server also offers security features, such as blocking malicious websites and preventing data theft through phishing attacks. Some DNS providers further enhance privacy by supporting DNS over HTTPS (DoH) — a protocol that encrypts DNS queries to prevent eavesdropping and tampering, and by implementing no-log policies for added online anonymity.
  • Censored content. Some governments censor websites by manipulating DNS servers and restricting free access to information. Switching to a different DNS server can sometimes restore access to this information.
  • Better website performance. If you have a website, you have control over the DNS settings for your domain. By managing various types of DNS records, such as A records and MX records, as well as other DNS settings, such as DNS TTL, you can ensure your website resolves correctly and efficiently.

How to test DNS server changes

To test a DNS server, start by doing a DNS leak test. Simply go to the testing website and choose either a standard or extended test, or watch our DNS leak test video instructions first.

If you are using a VPN, your online traffic, including DNS queries, should be routed through the VPN network. A DNS leak test works by sending a number of domain names for the VPN to resolve. If at least one of the servers in the results belongs to your ISP, the VPN probably has a DNS leak. However, if the test displays DNS servers that don’t belong to your ISP, your traffic is secure.

Troubleshooting DNS change issues

If changing DNS causes problems, check these common issues:

  • No internet after changing DNS. You may have entered the DNS address incorrectly. Check the numbers and remove extra spaces.
  • Some websites still load old results. Clear your browser cache and flush your DNS cache.
  • DNS changes don’t apply. Your router, VPN, browser, or device may be using its own DNS settings.
  • iPhone DNS works on one network but not another. That’s expected because iOS DNS settings apply per Wi-Fi network.
  • Router DNS changes don’t affect one device. That device may have manual DNS settings configured locally.

If you’re not sure what went wrong, switch DNS back to automatic and test your connection again. Once your internet works normally, try the DNS change one more time.

Online security starts with a click.

Stay safe with the world’s leading VPN

FAQ

Also available in: Deutsch,English.

Rustė Tervydytė | NordVPN

Rustė Tervydytė

A certified geek, Rustė approaches every cybersecurity topic with curiosity and a knack for breaking down complex concepts. She's on a mission to make cybersecurity accessible, practical, and even a bit fun for readers.