Ask the same question twice: once of the DNS server your PC normally uses and once of a public resolver. If a name fails on your own server but resolves from the public one, DNS on your network is the fault, and the culprit is the router, the office DNS server, a filtering service or the PC's own settings. If it fails everywhere with a 'name does not exist' answer, the name itself is wrong or the domain has lapsed. If every lookup returns an address and the page still will not load, DNS is not the cause and you should look at the connection to the site instead. The checks below only read information from a Windows PC. Nothing is changed until the cache-clearing step near the end.
Is it DNS? What the symptom does and does not tell you
DNS (the Domain Name System) turns a name such as www.example.com into the numeric address your device actually connects to. Every web page and most business apps do that lookup first, usually without anyone noticing. When the lookup fails, it looks like a dead internet connection even though the cabling, Wi-Fi and broadband are fine.
Three observations narrow it down before you open a command window, and anyone can make them:
- Does it fail for one site or for everything? One site points at that site or its domain. Everything points at your connection or your DNS.
- Does it fail on every device on the network or just one? All devices points at the router, the office DNS server or the broadband. One device points at that device's settings, cache or hosts file.
- Does the same site load on a phone using mobile data, with Wi-Fi switched off? If it does, the site is up and the problem is somewhere on your network. If it does not, the site or its domain is the problem and your DNS is probably innocent.
Check which DNS server a Windows PC is using and whether it answers
The commands in this section and the next only read information and send ordinary lookups, so they are safe to run from a normal PowerShell window on any affected Windows PC. They show what the PC is configured to use, then ask the same question of different DNS servers so you can see which link in the chain gives the wrong answer.
Your PC normally gets its DNS server addresses automatically from the router or the office DHCP server (the service that hands out IP addresses). In a typical home or small office that address is the router, for example 192.168.1.1, or an office server. Replace YOUR_WEBSITE_NAME below with the exact name from the browser's address bar, such as www.example.co.uk, and YOUR_DNS_SERVER_IP with an address found in the first step.
- Open PowerShell from the Start menu and list the DNS servers each adapter is using. Find the adapter that is actually connected (Wi-Fi or Ethernet) and note its addresses. VPN and virtual adapters list their own servers and can be ignored for now. Expect at least one address on the active adapter. An empty list, or an address that does not belong to your network or provider, is a finding in its own right.
Get-DnsClientServerAddress -AddressFamily IPv4 - Look up a name that should always work, using only DNS. The example.com domain is reserved for documentation and always resolves. A table of address records means this PC can ask its DNS server questions and get answers. Failing here suggests the problem is not specific to your site.
Resolve-DnsName example.com -DnsOnly - Look up the failing name the same way. Compare it with the previous step: a working control name with a failing site name points at that one name rather than DNS in general.
Resolve-DnsName YOUR_WEBSITE_NAME -DnsOnly - Ask a public DNS resolver the same question. 1.1.1.1 is Cloudflare's public resolver. This sends a single one-off lookup and changes nothing on the PC. Use it only for public site names, because the provider can see what you ask. If your network deliberately blocks outbound DNS to anywhere except its own server, a timeout here is expected and tells you nothing.
Resolve-DnsName YOUR_WEBSITE_NAME -Server 1.1.1.1 -DnsOnly - If your PC lists more than one DNS server, or you want to separate the PC from the server, query each configured server directly by repeating this command with each address from the first step. A server that answers promptly and correctly is fine. One that times out or gives a different answer from its neighbour is the one to look at.
Resolve-DnsName YOUR_WEBSITE_NAME -Server YOUR_DNS_SERVER_IP -DnsOnly
Rule out the hosts file and the cached answers
Windows does not go straight to the DNS server. It checks its own DNS cache first (a short-term memory of recent answers, including recent failures), then the hosts file (a plain text file that can pin a name to an address by hand), and only then asks the server. So a stale or hand-written entry can make a site fail on one PC while every other device is fine, and no amount of server checking will explain it.
Both of these checks only read.
- Display the hosts file. Lines starting with # are comments. On most machines you will see nothing else. Any line that contains your website name pins it to that address and DNS is never consulted for it. Do not delete a line you did not put there until you know which person or program did. Editing the file needs administrator rights, so save a copy first.
Get-Content "$env:SystemRoot\System32\drivers\etc\hosts" - Search the DNS cache for the failing name. If an entry appears with an old address, or the site recently moved to new hosting, the cache is feeding the PC an old answer and clearing it is a sensible fix. No entry simply means the name has not been looked up recently.
ipconfig /displaydns | Select-String "YOUR_WEBSITE_NAME" -Context 0,6
Reading the results
Put the answers from the checks side by side. The pattern matters more than any single result.
- Your own server answers and the public resolver answers, but the site still fails: DNS is probably not the cause. Go to the section on names that resolve.
- Public resolver answers, your own server times out or gives an error: the fault sits in your network's DNS path, meaning the router, the office DNS server, its forwarder (the upstream server it passes unknown names to), a filtering service or the DNS addresses handed out by DHCP.
- Public resolver answers, your own server answers with a different or old address: look for a stale record on that server, a filtering service redirecting the name, or a cache or hosts entry on the PC.
- Both fail with a timeout: the PC cannot reach any DNS server. Check the connection itself first, or whether outbound DNS is being blocked by a firewall rule. Microsoft documents a blocked UDP port 53 as one cause of exactly this timeout.
- Both fail with an error saying the name does not exist (NXDOMAIN, the standard 'no such name' answer): the name is mistyped, the domain has expired or its DNS hosting has a problem. That is for the domain owner to fix, not you.
- Only one PC shows any of this while others work: concentrate on that PC's hosts file, cache and adapter settings.
Fixing what you found
Which fix applies depends on where the fault sits. Make one change at a time and retest, so you know which change did it. Write down the current setting before you change anything so you can put it back.
- Router or home broadband: a router's built-in DNS forwarding can get stuck. Restart the router, wait for it to be fully back and retest. If it still fails and the public resolver works, the broadband provider's DNS may be at fault. Contact the provider before changing the router's DNS settings.
- Office DNS server or DHCP scope: this needs administrator access to the server or router. Check that the DNS addresses being handed out are ones that still exist. A DNS server that was retired years ago is a surprisingly durable thing to leave in a DHCP scope. Microsoft's own example shows one unreachable server in a list adding around four seconds to each lookup, which is enough to make applications time out.
- Slow rather than failing: time a lookup against each configured server. Microsoft treats a result under one second as acceptable. Run it once per server.
(Measure-Command {Resolve-DnsName -Name YOUR_WEBSITE_NAME -Server YOUR_DNS_SERVER_IP -DnsOnly}).TotalMilliseconds - Filtering or protective DNS: protective DNS services block lookups for known malicious domains. The NCSC notes a block can appear as a block page with a certificate error, as a redirect to a sinkhole, or simply as an NXDOMAIN answer that tells the user nothing. If the failing name is blocked, check the service's log and allow list. Confirm with whoever runs the service whether the block is deliberate. Do not switch the filtering off to make a page load.
- Internal names failing: a short name such as intranet is tried against each suffix in the PC's DNS suffix search list in turn, which can delay or misdirect the lookup. Adding a trailing dot to a full name, such as intranet.example.local., makes Windows query exactly that name.
Clear the cache and confirm the fix
Clearing the DNS cache is the only change in this article. It discards every remembered answer, including remembered failures. The next lookups are marginally slower while the cache refills, nothing is lost, there is no restart and no rollback is needed. Windows may require an elevated (Run as administrator) PowerShell window for this one.
- Clear the cache. This is equivalent to the older ipconfig /flushdns command.
Clear-DnsClientCache - Repeat the lookup using the PC's normal DNS server (no -Server option). It should now return an address record for the name.
Resolve-DnsName YOUR_WEBSITE_NAME -DnsOnly - Fully close and reopen the browser, because browsers can keep their own short-lived records of names, then load the site. Finally try one other device on the same network. Success means the name resolves from the PC's default server and the site loads on both devices.
If the name resolves but the site still will not load
When every lookup returns an address, DNS has done its job and the fault lies further along. A quick test shows whether the PC can open a connection to the site's secure web port. If TcpTestSucceeded is True, the name resolves and the connection opens, so look at the browser, a proxy setting, or the site itself. If it is False, something between you and the site, such as a firewall, filter or the site's own hosting, is refusing the connection. That is a separate investigation from DNS.
Test-NetConnection YOUR_WEBSITE_NAME -Port 443When to hand it over
If the fault is in the office DNS server, the DHCP scope, a forwarder or a filtering service and you do not administer those, pass the evidence on rather than guessing. Give your IT provider the PC's configured DNS server addresses, the failing name, and which of the lookups above worked and which failed. That removes most of the back-and-forth. Do the same for the broadband provider if only the router's DNS fails.
Technical terms explained
- DHCP
- The service that automatically gives devices their IP address and settings, including which DNS servers to use.
- DNS
- The Domain Name System. It translates names such as www.example.com into the numeric addresses devices use to connect.
- DNS cache
- A short-term store of recent DNS answers kept by the PC so repeat lookups are quick. It can also hold recent failures.
- DNS resolver
- A server that answers DNS questions on behalf of devices, such as a router, an office server or a public service like 1.1.1.1.
- forwarder
- An upstream DNS server that your own DNS server passes names to when it does not know the answer itself.
- hosts file
- A plain text file on a PC that can map a name to an address by hand. Windows checks it before asking a DNS server.
- NXDOMAIN
- The standard DNS answer meaning that the requested name does not exist.
- protective DNS
- A DNS service that blocks lookups for domains known to host malware, phishing or similar threats.
Sources and further reading
- Troubleshoot DNS client name resolution issues - Microsoft Learn
- Resolve-DnsName - Microsoft Learn
- Get-DnsClientServerAddress - Microsoft Learn
- Clear-DnsClientCache - Microsoft Learn
- ipconfig - Microsoft Learn
- Test-NetConnection - Microsoft Learn
- Protective DNS for the private sector - NCSC
- 1.1.1.1 resolver IP addresses - Cloudflare