How to Fix Slow DNS Lookup
Measure your DNS speed first, then flush the cache, drop dead servers, restart the router, or switch to Cloudflare, Google, or Quad9 on any device.
A page that sits blank for a second or two before anything happens, then loads normally once it starts, can be a DNS problem. Before your browser can fetch a site, it has to turn the name you typed into a numeric address, and that lookup has to finish before anything else can begin.
The fix most guides give is to switch to Google or Cloudflare. We measured that before trying it on our own Windows 11 PC. Our internet provider's DNS answered in a median of 11.6 ms, Cloudflare's 1.1.1.1 in 12.6 ms, and Google's 8.8.8.8 in 32.2 ms. Switching would have made our lookups no faster, and one of the two famous options would have made them slower. So this guide starts by measuring, and only then changes anything.
The fixes run from quickest to most involved and cover Windows 11, Mac, iPhone, Android, and your router. The last step also covers the "DNS server not responding" error, which is the same system failing outright instead of slowly.
A Windows PC or Mac where you can run commands as administrator Your router's admin password, if you want to change DNS for the whole house Pen and paper to note your current DNS settings before you change them
Confirm DNS is the slow part
Slow DNS has a particular feel. The first visit to a site hangs on a blank page before anything appears, and the next page on the same site loads quickly. That pattern comes from caching. Once your device has looked up a name, it keeps the answer for a while and skips the lookup next time. In Chrome you may also see Resolving host in the bottom corner of the window while it waits. To check properly, open the site in Chrome, press F12 to open DevTools, choose the Network tab, and reload. Click the first request in the list and open Timing. The DNS Lookup bar is the only part DNS controls. If it takes a few milliseconds and the long bar is Waiting for server response or Content Download, your DNS is fine, and nothing in this guide will speed that page up. If there is no DNS Lookup row at all, the answer came from the cache. Clear it with step 3 and reload.
Good to know: Notice which devices are affected. If every device in the house hangs, including phones on Wi-Fi, look at the router or your internet provider first. If only one computer does, look at that computer's settings, a VPN, or security software on it.
Time your DNS servers against each other
On Windows, open PowerShell as administrator and run this line. It empties the cache, then times one lookup through the DNS server your connection already uses: Clear-DnsClientCache; (Measure-Command { Resolve-DnsName example.com }).TotalMilliseconds Then time the same lookup against public servers by naming them: (Measure-Command { Resolve-DnsName example.com -DnsOnly -Server 1.1.1.1 }).TotalMilliseconds (Measure-Command { Resolve-DnsName example.com -DnsOnly -Server 8.8.8.8 }).TotalMilliseconds Run each one several times and go by the middle result, not the first. Keep the Clear-DnsClientCache part in the first line, or every run after the first is answered from the cache. Without it, ours dropped from 23.5 ms to 8.5 ms, which says nothing about the server. Test a few different sites too. We used five sites and three runs each before trusting any number, because single results jumped around. One lookup took 125.7 ms on a server whose typical answer was under 12 ms. On a Mac, open Terminal and run dig @1.1.1.1 example.com | grep "Query time". Leave out @1.1.1.1 to test the server your Mac is set to use. dig talks to DNS servers directly, so it measures the server rather than everything Safari does on top. A healthy lookup to a nearby server takes tens of milliseconds. If yours regularly takes hundreds, or some take a full second or more, you have found the problem.
Heads up: Skip namebench, the free benchmark older guides still recommend. Its last release was in 2010 and Google archived its code in May 2024. GRC's DNS Benchmark tests many servers at once on Windows, but the current version is a paid download, and the two commands above answer the question for free.
Flush the DNS cache
A cache holding a bad or outdated answer can make one site fail or crawl while everything else works. Clearing it costs nothing. On Windows, open Command Prompt as administrator and run ipconfig /flushdns. It also clears remembered failures, which can keep a site broken after the real problem has gone away. On a Mac, open Terminal, run sudo killall -HUP mDNSResponder, and enter your password. Restarting the Mac clears the cache too. Chrome keeps its own cache. Type chrome://net-internals/#dns in the address bar and click Clear host cache. Be realistic about this step. Flushing fixes stale answers. It does not make a slow server faster, and the first lookup after a flush is the slowest one, because nothing is cached yet. You will also see advice to restart the DNS Client service with net stop dnscache. On our Windows 11 PC the service reports that it cannot be stopped, so that command no longer does anything useful.
Restart the router and check its DNS setting
If the DNS server your devices use is the router's own address, such as 192.168.1.1, every lookup passes through the router on its way to your internet provider. That middle step is one more thing that can slow down or stall, and a restart clears it. Unplug the modem and the router, wait at least 30 seconds, plug the modem back in first, and wait until its lights settle before you plug the router in. We found one case in Microsoft's support forum that shows why this matters. Flushing the cache did nothing, and switching the laptop to a public DNS server fixed only the laptop, while an iPhone on the same Wi-Fi kept failing. Unplugging the router was the only thing that fixed both. When several devices struggle at once, start here. Some routers have a setting called DNS relay or DNS proxy. When it is on, your devices send every lookup through the router. If lookups stay slow after a restart, step 6 lets you point your devices past it.
Find a DNS server that does not answer
Windows asks your DNS servers in order and waits for each one. Microsoft's documentation on DNS client timeouts spells out the cost. If the first server does not answer within 1 second, Windows moves on to the next, and if the only working server is fourth in the list, every uncached lookup waits at least 4 seconds. One dead server at the top of the list is enough to make browsing feel broken, even though a download runs at full speed once it has started. To see your list on Windows, run ipconfig /all and look at DNS Servers. Test each address with the Resolve-DnsName line from step 2, putting that address in place of 1.1.1.1. A server that times out or takes seconds is your problem. You cannot delete a server your router hands out, but setting your own servers in step 6 replaces the whole list. On a Mac, the list is under System Settings > Network > your connection > Details > DNS.
Switch to a faster public DNS server
Only do this if step 2 showed a public server beating yours by a clear margin. Write down your current settings first, which is also Google's advice before switching to its public DNS, so you can put them back. The three big free options are Cloudflare (1.1.1.1 and 1.0.0.1), Google (8.8.8.8 and 8.8.4.4), and Quad9 (9.9.9.9 and 149.112.112.112). DNSPerf, which tests public DNS services from more than 200 locations every minute, averaged Cloudflare at about 14 ms, Google at about 19 ms, and Quad9 at about 22 ms worldwide over the 30 days to September 26, 2026. Those are global averages. From our desk the order was different. Our internet provider's own DNS answered in a median of 11.6 ms, Cloudflare in 12.6 ms, Quad9 in 16.5 ms, and Google in 32.2 ms, so switching would have gained us nothing. Trust your own test over the chart. Windows 11: open Settings > Network & internet, choose Wi-Fi or Ethernet and then your connection, find DNS server assignment, and select Edit. Some versions put that button next to IP assignment instead. Choose Manual, turn on IPv4, and type the two addresses into Preferred DNS and Alternate DNS. For these three providers the same screen can also encrypt your lookups with DNS over HTTPS, as Microsoft's page on changing TCP/IP settings describes. Mac: open System Settings > Network, click your connection, click Details, then DNS. Click the + button, type each address, and click OK. iPhone: go to Settings > Wi-Fi, tap the info button next to your network, tap Configure DNS, choose Manual, add the servers, and tap Save. This applies to that one Wi-Fi network only, not to cellular data. Android: search Settings for Private DNS (Google's own path is Network & internet > Private DNS), choose Private DNS provider hostname, and enter a hostname rather than numbers, such as one.one.one.one for Cloudflare or dns.google for Google. Router: changing it here covers every device in the house at once. Open the router's admin page (usually 192.168.0.1 or 192.168.1.1), find the DNS setting in the Internet or WAN section, enter the two addresses, and save. The exact menu names differ by brand.
Heads up: A custom DNS server can get in the way on hotel and cafe Wi-Fi, where the sign-in page relies on the network's own DNS. If a login page will not appear, switch back to automatic, sign in, then switch again. A new DNS server also sidesteps any parental controls your internet provider or router applies through DNS. Do not change it on a work laptop at all, where the company's VPN depends on its own DNS.
When lookups still hang or fail
If Windows says DNS server not responding, the computer got no answer at all. Run the network troubleshooter first, which Windows 11 keeps in the Get Help app. If that fails, open Command Prompt as administrator, run the five commands below in order, and restart. It is the sequence Microsoft's Wi-Fi troubleshooting page gives: netsh winsock reset netsh int ip reset ipconfig /release ipconfig /renew ipconfig /flushdns If only one computer is affected, look at what sits between it and the internet. A VPN sends your lookups to its own DNS servers, and Android's Private DNS setting has no effect while a VPN is on. Security software that filters web traffic can add its own delay. A reply in Microsoft's support forum blamed Windows' own DNS over HTTPS setting for 5- to 10-second hangs on most sites, so if you turned that on in step 6, turn it off and test again. Some routers also hand out an IPv6 DNS path that fails before the computer falls back to IPv4. Microsoft recommends against switching IPv6 off permanently, so treat unticking it as a test, not a fix. If a public DNS server solves the problem, your internet provider's DNS is the weak point, so tell them. If nothing here changes the DNS Lookup time from step 1, the slowness is somewhere else.
Slow DNS feels like a slow internet connection, but it only ever costs the moment before a page starts loading. That is why measuring comes first. In a couple of minutes it tells you whether the fix is your router, one dead server in a list, a VPN, or nothing DNS can help with. We ended up changing nothing on our own connection, because our provider's DNS was already as quick as the famous alternatives. If yours is slow, the switch in step 6 takes a couple of minutes per device, or one change on the router for the whole house. If your computer is sluggish in other ways too, our guides on fixing an overheating laptop and fixing a slow-booting Mac cover the next most likely culprits.
Questions we get asked about this
Answers from experience, not a textbook.
On average, yes. DNSPerf's worldwide averages for August and September 2026 put Cloudflare's 1.1.1.1 at about 14 ms and Google's 8.8.8.8 at about 19 ms. What matters is the distance from you to their nearest server, though. On our connection Cloudflare answered in a median of 12.6 ms and Google in 32.2 ms, a bigger gap than the global figures, and our internet provider's own server beat both. The PowerShell and dig tests in step 2 give you your own answer in about 2 minutes.
On your own devices, yes, and you can always switch back to automatic. Cloudflare, Google, and Quad9 all publish privacy policies for their public DNS. Cloudflare says it deletes its resolver logs within 25 hours, Google says its temporary logs holding your IP address are deleted within 24 to 48 hours, and Quad9 says it does not record user IP addresses at all. Leave work and school devices alone, since their VPNs and internal sites rely on the organization's own DNS.
Not directly. DNS only affects the moment before a connection starts, so it does nothing for your ping in a game or the speed of a download once it is running. It can even make things slightly worse. Large sites that serve video and downloads from many locations can pick the copy closest to your DNS server rather than to you, so a DNS server that is far away can point you at a distant copy.
Only when something is wrong. It is a troubleshooting step, not maintenance, and every flush makes your next few lookups slower because the cache starts empty. Restarting your computer clears the cache anyway.
It can. While a VPN is connected, your lookups usually go to the VPN provider's DNS servers, which may be much farther away than your own. On Android, the Private DNS setting has no effect while a VPN is on. To check whether the VPN is the cause, run the step 2 test with it connected and again with it off.
Because the answer is cached after the first lookup. Your computer, your browser, and often your router each keep recent answers for a set time, so the second visit skips the lookup. On our PC the same lookup took 23.5 ms straight after a flush and 8.5 ms the next time. If the first visit to every site takes seconds, that is the slow lookup this guide is about.
Tech Troubleshooting Basics
How to Clear Cache on iPhone
How to Force Quit on Mac
How to Fix GPS Not Working
How to Fix Laptop Overheating
How to Fix Phone Screen Unresponsive Touch
How to Fix Slow Boot Mac
How to Fix Slow DNS Lookup
← you’re here