DNS Settings: How to Change DNS (Windows, Mac, Android, iPhone, Router)

Sunucun 8 min read

DNS settings decide which DNS server your device asks to translate domain names (such as sunucun.com.tr) into IP addresses. By default you use your internet provider’s (ISP’s) DNS servers. Changing DNS means setting a public DNS server such as Cloudflare, Google or Quad9 manually instead. In this guide we explain what DNS settings do, list the current DNS addresses, and show step by step how to change DNS on Windows 11, Windows 10, macOS, Linux, Android, iPhone and the router.

Illustration: DNS

What Are DNS Settings?

When you type an address into the browser, your device first checks its own DNS cache; if there is no record, it asks the DNS server set in its settings “what is the IP address of this domain?” and connects using the answer. The DNS settings screen usually has two fields:

  • Preferred DNS server: The primary DNS address that queries go to first.
  • Alternate DNS server: The backup address used if the primary server does not answer. Choosing both from the same provider is the most common setup.

If “Automatic” (DHCP) is selected, your router, and therefore your ISP, decides these addresses. When you choose “Manual”, you enter them yourself. For the bigger picture of where DNS sits in a network, see our article what is a network.

Why Change DNS?

  • Resolution problems: If your ISP’s DNS server answers slowly or not at all (errors such as “DNS server not responding”), switching to a public DNS often fixes it.
  • Security filtering: Some providers such as Quad9 add a layer of protection by not resolving known malicious domains.
  • Privacy: With encrypted DNS (DNS over HTTPS / DNS over TLS), third parties on the network cannot read your DNS queries as plain text.
  • Filtering needs: DNS services that block ads or adult content (for example AdGuard’s family mode) give a simple filter for a home network.
  • DNS-based blocks: If a block is applied only on the ISP’s DNS server, using a different DNS can work; if it is applied at the connection level, changing DNS alone is not enough.

Note: changing DNS does not increase your download or upload speed (Mbps); it only affects how long it takes to turn domain names into IP addresses. That time can be noticeable when pages open, but your line speed stays the same.

Current DNS Addresses

ProviderPreferred DNSAlternate DNSIPv6Encrypted DNS hostname (Android Private DNS)
Cloudflare1.1.1.11.0.0.12606:4700:4700::1111
2606:4700:4700::1001
one.one.one.one
Google8.8.8.88.8.4.42001:4860:4860::8888
2001:4860:4860::8844
dns.google
Quad99.9.9.9149.112.112.1122620:fe::fe
2620:fe::9
dns.quad9.net
AdGuard94.140.14.1494.140.15.152a10:50c0::ad1:ff
2a10:50c0::ad2:ff
dns.adguard-dns.com
OpenDNS208.67.222.222208.67.220.2202620:119:35::35
2620:119:53::53
—

Which provider is faster for you depends on your location and ISP. Try one, and switch to another if you see delays or errors when pages open. If you do not have an IPv6 connection, you can leave the IPv6 fields empty.

How to Change DNS on Windows 11

  1. In Settings → Network & internet, open the connection you use (Wi-Fi or Ethernet). For Wi-Fi, open the hardware properties page of the network you are connected to.
  2. On the DNS server assignment line, click Edit and choose Manual.
  3. Turn on IPv4 and enter one of the addresses from the table as the preferred and alternate DNS.
  4. If you want encrypted DNS, set DNS over HTTPS to On (automatic template) for both addresses and save.

How to Change DNS on Windows 10

  1. Press Win + R, type ncpa.cpl and press Enter.
  2. Right-click the connection you use and choose Properties.
  3. Select Internet Protocol Version 4 (TCP/IPv4) and click Properties.
  4. Choose Use the following DNS server addresses, fill in the preferred and alternate DNS server fields and save with OK.

Changing DNS from the Command Line (Windows)

In PowerShell opened as administrator, you can change DNS in one line using the connection name (you can see it with Get-NetAdapter):

Set-DnsClientServerAddress -InterfaceAlias "Wi-Fi" -ServerAddresses ("1.1.1.1","1.0.0.1")

To go back to automatic DNS:

Set-DnsClientServerAddress -InterfaceAlias "Wi-Fi" -ResetServerAddresses

After the change, clear the DNS cache so old records are not used:

ipconfig /flushdns

How to Change DNS on macOS

  1. Go to Apple menu → System Settings → Network and select your connection (Wi-Fi or Ethernet).
  2. Click Details next to the connected network and open the DNS tab.
  3. Add the new DNS addresses with +, remove the old ones with − and click OK.

On macOS Monterey and earlier, the same setting is under System Preferences → Network → Advanced → DNS. To change it and clear the cache in Terminal:

networksetup -setdnsservers Wi-Fi 1.1.1.1 1.0.0.1
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

To go back to automatic DNS, use networksetup -setdnsservers Wi-Fi empty.

How to Change DNS on Linux

Most desktop distributions use NetworkManager. Find the connection name with nmcli connection show and change it permanently:

nmcli connection modify "Connection-Name" ipv4.dns "1.1.1.1 1.0.0.1" ipv4.ignore-auto-dns yes
nmcli connection up "Connection-Name"

On systems that use systemd-resolved, resolvectl status shows which DNS is in use. Because /etc/resolv.conf is managed automatically on these systems, manual edits can be lost on reboot; make the permanent change through NetworkManager or your distribution’s network configuration.

How to Change DNS on Android (Private DNS)

On Android 9 and later, the most practical method is Private DNS; it works on both Wi-Fi and mobile data and encrypts queries:

  1. Go to Settings → Network & internet (on Samsung, Connections → More connection settings).
  2. Tap Private DNS and choose Private DNS provider hostname.
  3. Enter one of the encrypted DNS hostnames from the table (for example dns.google) and save.

If the hostname is wrong or the server cannot be reached, it can look as if the internet is completely down; in that case set it back to Automatic. On older Android versions, DNS can only be changed in the Wi-Fi network’s settings by choosing IP settings → Static and filling in DNS 1 and DNS 2.

How to Change DNS on iPhone

  1. Go to Settings → Wi-Fi and tap the (i) icon next to the network you are connected to.
  2. Tap Configure DNS and choose Manual.
  3. Delete the existing servers, add the addresses from the table with Add Server and tap Save.

This setting applies only to that Wi-Fi network; iPhone has no DNS field for mobile data. To use a different DNS on mobile data too, you can use the DNS provider’s official app (for example Cloudflare’s 1.1.1.1 app) or a configuration profile.

How to Change DNS on the Router

If you change DNS on the router, every device at home (except those with manually set DNS) uses the new DNS:

  1. Open the router’s interface in the browser (usually 192.168.1.1 or 192.168.0.1; the address and login details are on the label under the router).
  2. Find the DNS fields in the LAN / DHCP or WAN / Internet settings.
  3. Enter the addresses from the table as primary and secondary DNS and save; turn Wi-Fi off and on so devices pick up the new setting.

The interface differs by brand. On some ISP routers the DNS field is locked; in that case set DNS on the device instead.

Secure DNS in the Browser

If you want encrypted DNS only for browser traffic: in Chrome go to Settings → Privacy and security → Security → Use secure DNS, in Edge Settings → Privacy, search, and services → Use secure DNS, and in Firefox Settings → Privacy & Security → DNS over HTTPS. This setting does not affect other apps.

How to Verify the DNS Change

On Windows, run the commands below in Command Prompt. The Server/Address line in the nslookup output should show the DNS you chose; you can also check the DNS Servers line in the ipconfig /all output:

nslookup sunucun.com.tr
ipconfig /all

On macOS and Linux, look at the SERVER line in the output of nslookup or dig sunucun.com.tr. If you turned on encrypted DNS in Windows 11, the connection details show “Encrypted” next to the DNS servers.

If You Have Problems After Changing DNS

  • No site opens: You may have mistyped an address; check the addresses in the table again or set DNS back to Automatic.
  • Some sites open, others do not: Clear the cache (ipconfig /flushdns) and restart the browser.
  • You are on a company or school network: These networks use their own DNS servers for internal domains; changing DNS can break access to internal systems. Ask the network administrator before changing it on such networks.
  • The change is reverted: VPN apps and some security software route DNS to their own servers; a setting made while these apps are running may not take effect.

For Site Owners: A Domain’s DNS Settings Are Different

The settings in this guide decide which DNS resolver your device uses. A website’s DNS settings (nameserver, A, CNAME, MX records), on the other hand, are managed at the domain registrar or in the hosting panel and decide which server the site points to. We explain adding records in a panel in our guides on DNS settings in cPanel and DNS settings in CyberPanel. Depending on the record’s TTL, it can take from minutes to hours for record changes to be visible everywhere.

Conclusion

DNS settings decide which server your device uses to resolve domain names. To change DNS, enter one of the Cloudflare, Google, Quad9, AdGuard or OpenDNS addresses from the table on your device or router, turn on encrypted DNS where possible, then clear the cache and verify with nslookup. If you run into problems, you can always go back to your ISP’s default DNS by setting it to Automatic.

Categories

Latest guides