Software & Platforms

Windows uses a 22-byte file to verify internet connectivity

Windows utilizes the Network Connectivity Status Indicator to verify internet access via a 22-byte text file hosted by Akamai. Network-wide ad blockers, VPNs, or firewalls can interfere with this active probe, causing Windows to incorrectly report a lack of internet access.

Windows uses a 22-byte file to verify internet connectivity

The 22-byte file that manages your connection

Windows determines if a computer has internet access using the Network Connectivity Status Indicator, which relies on a single, tiny text file. Just because you have a strong signal to your Wi-Fi router does not mean you have actual internet access, as your provider might be experiencing an outage. Windows uses an active probe to tell these two situations apart. This involves sending an HTTP request to a predetermined web server. You can visit the exact address Windows uses by opening www.msftconnecttest.com/connecttest.txt in your browser. The page consists of only the words "Microsoft Connect Test" and the response body weighs 22 bytes. Windows expects an HTTP 200 OK response containing those exact words to confirm the computer can reach the wider internet. The system runs separate checks for IPv4 and IPv6 connections, and each uses its own hostname to retrieve the same text. A successful response from either protocol is enough for the tool to recognize internet connectivity. Microsoft has used this specific text file since Windows 10 version 1607. Since June 2023, Akamai has hosted the public connectivity-test infrastructure. This plain HTTP method allows Windows to recognize captive portals, such as those at airports or hotels, without running into security certificate errors that arise with HTTPS.

Why Windows might report no internet access

Network-wide ad blockers like Pi-hole, a firewall, or a glitchy VPN can block the request and cause a false "No internet" warning. I tested this on my laptop by modifying the Windows hosts file to redirect the connectivity-test hostnames to my computer’s own loopback addresses. When I modified the Windows hosts file to redirect the connectivity-test hostnames to my computer’s own loopback addresses, the subsequent attempts to retrieve the small text file resulted in a connection error. Windows initially downgraded the network interface status to local access following the failed check, but it later upgraded the assessment back to internet connectivity. I found entries in the Event Viewer showing that PassivePacketHops allowed Windows to recognize the internet connection. This passive probing examines incoming network traffic for clues about its origin, such as how many hops the data made before reaching the computer. A bad diagnosis can cause a self-fulfilling prophecy. Passive probing relies on received traffic, so Windows may not have enough evidence to recognize a connection if these active checks fail.

Troubleshooting a wrong connectivity report

A wrong assessment from the NCSI can cause apps to fail even if the browser loads every website. Microsoft provides developers with a way to ask Windows if an internet connection is available, and Office applications use the "get_IsConnectedToInternet" API to do this. For an email app, this means the software might hold off on a connection that would work perfectly well if Windows incorrectly reports no internet. Microsoft support documentation says NCSI problems can prevent Outlook from connecting to mail servers or interfere with Windows Update downloads. In October 2020, Microsoft released Windows 10 update KB4577063 to address a bug that prevented certain apps from opening when connectivity checks failed. If you see a globe icon instead of a Wi-Fi icon, you should perform a few checks before troubleshooting your router. First, open unrelated websites to ensure fresh connections work. Next, pull up the Microsoft connectivity test page in your browser to see if the three expected words appear. You can also run Get-NetConnectionProfile in PowerShell and check the IPv4Connectivity and IPv6Connectivity fields. A value of Internet means Windows recognizes access, while LocalNetwork means it only recognizes local connectivity. If normal websites load but the test page fails, check if a VPN, DNS filter, or firewall blocks www.msftconnecttest.com or ipv6.msftconnecttest.com. Keep in mind that the test page loading in your browser does not guarantee the background check will pass, especially if you have enabled DNS over HTTPS in your browser. Do not turn off NCSI active probing through the Windows Registry, because Microsoft recommends against it as passive probing cannot handle every network situation.