Summary

One of the most confusing Windows glitches is when your computer swears you have no internet, even though your browser loads every site you pull up. You might even have an email app refusing to grab new messages while you’re sitting right there watching YouTube on the exact same PC. So how does Windows figure out whether you’re online in the first place? After some digging on my Windows 11 laptop, I discovered that a comically bare-bones web page hosted by Microsoft has a lot of influence over that decision. Windows checks the internet with three little words The world’s least impressive webpage has an important job Just because you’re connected to your Wi-Fi router doesn’t mean you’re actually online. There are several reasons you might be connected to Wi-Fi but have no internet access. Your computer might have a great signal to your router, while your internet provider is experiencing an outage. Windows needs a way to tell those two situations apart, and that’s where a built-in tool called the Network Connectivity Status Indicator comes in. When you establish a new network connection, Windows can perform what’s known as an active probe. On Windows 11, this involves sending an HTTP request to a predetermined web server and examining the response. You can visit the very same address Windows uses by opening www.msftconnecttest.com/connecttest.txt in your browser. The entire page consists of three words: Microsoft Connect Test. I fetched the file using PowerShell and found that the response body weighed in at a measly 22 bytes. Windows expects an HTTP 200 OK response containing those exact words, which gives it evidence that your computer can reach the wider internet. Windows actually runs separate checks for IPv4 and IPv6 connections, each using its own hostname to retrieve the same text. A successful response from either is enough for NCSI to recognize internet connectivity. There’s a smart reason Microsoft uses plain HTTP and looks for such a specific phrase. Think back to the last time you connected to an airport or hotel Wi-Fi network and had to go through a sign-in page or accept a wall of terms and conditions. These pages, known as captive portals, can intercept ordinary HTTP requests without running into the security certificate errors that would arise with HTTPS. When Windows gets a sign-in page or a redirect instead of the expected response, it can recognize that the network requires authentication and prompt you to log in. Microsoft has used this particular text file since Windows 10 version 1607, with its public connectivity-test infrastructure hosted by Akamai since June 2023. I blocked the file to see what Windows would do Microsoft has a backup plan There are plenty of ways that little web check can go wrong, even when your internet is working just fine. A network-wide ad blocker like Pi-hole might filter out Microsoft’s test domain, a firewall could block the request, or a glitchy VPN might send that check down the wrong path. To recreate this scenario on my laptop, I modified the Windows hosts file to redirect Microsoft’s IPv4 and IPv6 connectivity-test hostnames to my computer’s own loopback addresses. As expected, subsequent attempts to retrieve the text file resulted in a connection error. Interestingly, after I disconnected and reconnected to my Wi-Fi, Windows still recognized I had internet access. A little rummaging through the NCSI logs in Event Viewer revealed how Windows had worked its way around the problem. I found an event showing that Windows had downgraded a network interface’s connectivity status to local access following a failed connectivity check. Several subsequent entries listed PassivePacketHops as the reason Windows had upgraded its assessment back to internet connectivity. Windows has a backup plan called passive probing, which examines incoming network traffic for clues about its origin. One of those clues is how many hops the data appears to have made before reaching your computer. This gives Windows another way to confirm internet connectivity even when it can’t retrieve Microsoft’s text file. Passive probing relies on the network traffic your computer receives, though, so Windows may not have enough evidence to recognize an internet connection when its active checks fail. Some of your apps take Windows’ word for it A bad diagnosis can become a self-fulfilling prophecy A wrong NCSI call can do a lot more than mess with the little globe icon in your taskbar. Microsoft provides developers with a way to ask Windows whether an internet connection is available, and its own Office applications use an API called get_IsConnectedToInternet to do exactly that. For an email app, this makes sense. It can ask Windows whether it’s online instead of repeatedly trying to contact its mail server during an outage. The downside is that if Windows gets its assessment wrong, the app might hold off on a connection that would’ve worked perfectly well. Microsoft’s own support documentation acknowledges that NCSI problems can prevent Outlook from connecting to mail servers or interfere with Windows Update downloads, even when the computer has internet access. This has happened before. In October 2020, Microsoft released Windows 10 update KB4577063 to address a bug that could prevent certain apps from opening when Windows incorrectly reported no internet access because connectivity checks were disabled or failed. I couldn’t reproduce those app failures on my Windows 11 laptop, as passive probing was able to restore its internet connectivity status. Check Microsoft’s little file before you reset your router Your ISP might be innocent this time If Windows claims you’ve lost your internet connection while your browser is still working fine, there are a few quick checks you can perform before diving into an endless troubleshooting rabbit hole:

  • Open a couple of unrelated websites to make sure you can establish fresh connections to the internet.

Pull up Microsoft’s connectivity test pagein your browser and see if the three expected words pop up. - Open PowerShell, run Get-NetConnectionProfile , and check the IPv4Connectivity and IPv6Connectivity fields for your active network interface. A value of Internet means Windows recognizes internet access over that protocol, while LocalNetwork means it only recognizes local connectivity. Don’t panic if one protocol lacks internet access, though, as your network may only support the other. If normal websites load fine but Microsoft’s test page won’t budge, check whether a network-wide ad blocker, custom DNS filter, VPN, or firewall is blocking www.msftconnecttest.com or ipv6.msftconnecttest.com. Temporarily disconnecting your VPN or checking the blocked domains in your DNS filter can help narrow down the culprit. Keep in mind that the test page loading in your browser doesn’t guarantee Windows’ background check will pass, especially if you’ve enabled DNS over HTTPS in your browser. You might also run into tips online telling you to turn off NCSI’s active probing through the Windows Registry. Microsoft recommends against it, since passive probing on its own can’t handle every kind of network situation. The globe icon doesn’t get the final say I’ve come to appreciate how much detective work Windows has to cram into that tiny network icon. Even so, I wouldn’t let it boss me around when I’m troubleshooting my computer. Knowing how to tell the difference between a confused Windows connectivity check and a real internet outage could easily save you from factory-resetting a completely innocent router.

By Oluwademilade Afolabi

Original Article