How to Change Your DNS Server (to 1.1.1.1 or 8.8.8.8)
How to switch your DNS resolver to a faster, more private option like Cloudflare 1.1.1.1 or Google 8.8.8.8 β on any device or your whole network via the router.
Learning how to change your DNS server is one of the quickest, safest tweaks you can make to your internet connection. Your DNS resolver is the service that translates names like example.com into IP addresses, and by default you use whatever one your ISP provides β which is often slower, less private, and sometimes less reliable than the free public alternatives. Switching to a resolver like Cloudflare's 1.1.1.1 or Google's 8.8.8.8 takes a couple of minutes and is completely reversible.
What changing your DNS server does (and doesn't do)
DNS is the internet's address book. Every time you visit a site, your device asks a DNS resolver "what's the IP for this name?" and the resolver answers. Changing your DNS server simply points that question at a different provider. It can bring:
- Faster lookups β big public resolvers are often quicker to respond than a congested ISP one, so pages start loading a touch sooner.
- Better privacy β providers like Cloudflare commit to not selling your browsing data, unlike some ISPs.
- More reliability β global anycast networks rarely go down.
- Optional filtering β some resolvers offer malware or adult-content blocking on special addresses.
What it does not do: it will not increase your bandwidth, so downloads and video quality stay the same, and on its own it does not hide your IP address β for that you would want a VPN. It also does not change your public IP, which you can always check at IP Animals.
Popular public DNS servers
| Provider | Primary | Secondary | Known for |
|---|---|---|---|
| Cloudflare | 1.1.1.1 | 1.0.0.1 | Speed & privacy |
8.8.8.8 | 8.8.4.4 | Reliability | |
| Quad9 | 9.9.9.9 | 149.112.112.112 | Security filtering |
Any of these is a solid upgrade. The examples below use Cloudflare's 1.1.1.1 / 1.0.0.1, but you can substitute Google's 8.8.8.8 / 8.8.4.4 anywhere.
Change DNS on Windows
- Open Settings β Network & Internet.
- Select your active Wi-Fi or Ethernet connection.
- Next to DNS server assignment, click Edit.
- Switch from Automatic (DHCP) to Manual and turn on IPv4.
- Set Preferred DNS to
1.1.1.1and Alternate DNS to1.0.0.1, then save.
Prefer the command line? In an elevated PowerShell:
netsh interface ip set dns name="Wi-Fi" static 1.1.1.1
netsh interface ip add dns name="Wi-Fi" 1.0.0.1 index=2
Then clear old entries so lookups use the new server immediately:
ipconfig /flushdns
Change DNS on macOS
- Open System Settings β Network.
- Select your active connection (Wi-Fi or Ethernet) and click Detailsβ¦.
- Choose the DNS tab.
- Under DNS Servers, click + and add
1.1.1.1, then1.0.0.1. Remove any old ISP entries if you wish. - Click OK, then Apply.
To clear the cache afterwards, open Terminal and run:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Change DNS on Linux
On a NetworkManager desktop, the quickest route is nmcli:
nmcli con mod "MyConnection" ipv4.dns "1.1.1.1 1.0.0.1"
nmcli con mod "MyConnection" ipv4.ignore-auto-dns yes
nmcli con up "MyConnection"
Replace "MyConnection" with the name from nmcli con show. You can also do this graphically: open your connection's settings, go to the IPv4 tab, switch DNS to manual (or set the method to "Automatic (addresses only)"), and enter the servers. On systems using systemd-resolved, flush the cache with:
resolvectl flush-caches
Change DNS on your router (whole network)
Setting DNS on the router is the most efficient method, because every device on your network β phones, TVs, consoles, laptops β then uses the new resolver automatically, with no per-device setup.
- Open a browser and go to your router's admin page at the default gateway, commonly
192.168.1.1or192.168.0.1. - Log in (credentials are often on a sticker on the router).
- Find the DNS settings β usually under Internet, WAN, LAN or DHCP settings.
- Replace the automatic/ISP DNS with
1.1.1.1and1.0.0.1(or8.8.8.8and8.8.4.4). - Save and reboot the router if prompted. Devices pick up the change as their DHCP leases renew.
Change DNS either on the router or on individual devices, not both, to avoid confusion. A per-device setting overrides the router's, so if you set a device manually and later change the router, that device will keep using its own DNS until you switch it back to automatic.
Change DNS on iPhone and Android
iPhone / iPad:
- Open Settings β Wi-Fi and tap the (i) next to your network.
- Tap Configure DNS, choose Manual, remove the existing servers, and add
1.1.1.1and1.0.0.1. - Tap Save.
Android: the cleanest option is Private DNS (encrypted DNS-over-TLS). Go to Settings β Network & internet β Private DNS, choose Private DNS provider hostname, and enter one.one.one.one for Cloudflare or dns.google for Google. This applies on both Wi-Fi and mobile data. To set a plain DNS server for a single Wi-Fi network instead, edit that network's IP settings and switch to Static.
Test that it worked
After switching, confirm your device is really using the new resolver. Run a lookup and check the server that answered:
- Windows:
nslookup example.comβ the Server line should show your new DNS. - macOS / Linux:
dig example.comand check theSERVER:line, or runnslookup example.com.
You can also confirm resolution end to end with our DNS Lookup tool, and check your public address any time with What's My IP. If a site still fails to load right after switching, flush your DNS cache using the command for your OS above β old cached answers from the previous resolver are the usual culprit. That's it: faster, more private name resolution across your whole network in a few minutes, and fully reversible by switching each setting back to Automatic.
Frequently asked questions
Is it safe to change my DNS server?
Yes, as long as you use a reputable resolver such as Cloudflare's 1.1.1.1 or Google's 8.8.8.8. Changing DNS only alters which service translates names to addresses; it does not touch your files or connection, and you can revert to automatic at any time.
Will changing my DNS make my internet faster?
It can make name lookups quicker, which makes pages start loading a little faster, and some public resolvers respond faster than a slow ISP one. It does not increase your bandwidth, so large downloads and video quality are unaffected.
Should I change DNS on each device or on my router?
Changing it on the router applies the new DNS to every device on the network at once, which is the most convenient option. Setting it per device is useful when you only want to change one machine or cannot access the router.
What is the difference between 1.1.1.1 and 8.8.8.8?
Both are free, fast public resolvers. 1.1.1.1 is run by Cloudflare and markets a strong privacy stance, while 8.8.8.8 is Google's long-standing resolver known for reliability. Either is a solid upgrade over a typical ISP resolver.
Do I need to flush my DNS cache after changing servers?
It is a good idea. Your device may still hold old lookups from the previous resolver, so flushing the cache ensures fresh queries go to your new DNS server right away and avoids stale or inconsistent results.