Quick answer
Flush your DNS cache (ipconfig /flushdns), check the URL for typos, and disable any active proxy or VPN that might be intercepting traffic. That fixes 90% of cases.
Why this happens
The NS_E_CURL_INVALIDHOSTNAME error (0XC00D1326) pops up when Windows can't translate the host part of a URL to an IP address. Common triggers: you mistyped the URL, your DNS server is down or returning garbage, a proxy or VPN is injecting a bad route, or the hosts file (C:\Windows\System32\drivers\etc\hosts) has a corrupted or conflicting entry. I've seen this most often in Windows Media Player and old streaming apps that don't handle DNS failures gracefully.
Don't waste time reinstalling apps or drivers — the network stack is almost always the culprit.
Step-by-step fix
- Check the URL for typos. Look for extra dots, missing slashes, or swapped characters. The hostname has to match exactly —
http://example.cmowon't work. - Flush DNS resolver cache. Open Command Prompt as admin and run:
Thenipconfig /flushdnsipconfig /registerdns. This clears any stale or corrupted entries. - Reset Winsock. Still broken? Run
netsh winsock resetand reboot. This wipes out any left-over socket configurations from old VPNs or proxies. - Test DNS manually. Ping the hostname:
If it fails, tryping example.comnslookup example.com. If that also fails, your DNS server is the problem. Switch to Google's DNS (8.8.8.8 and 8.8.4.4) temporarily to confirm. - Disable proxy and VPN. Go to Settings > Network & Internet > Proxy, turn off “Use a proxy server”. Also disable any VPN client. Restart the app that threw the error.
- Check the hosts file. Open
C:\Windows\System32\drivers\etc\hostsin Notepad as admin. Look for any line referencing the hostname you're trying to reach. If it's there and pointing to a wrong IP, comment it out with a#at the start of the line.
Alternative fixes if the main steps fail
- Reset network stack completely. In an admin command prompt, run:
Reboot.netsh int ip reset
netsh winsock reset
ipconfig /release
ipconfig /renew
ipconfig /flushdns - Turn off IPv6. Some older apps don't handle IPv6 hostnames well. Go to Network Adapter settings, uncheck “Internet Protocol Version 6 (TCP/IPv6)”, and reboot.
- Use a different DNS server globally. Set your adapter to use Cloudflare (1.1.1.1) or Google (8.8.8.8). Don't bother with OpenDNS — it's slower.
- Run the Windows Network Troubleshooter. It's basic, but I've seen it fix DNS issues in Windows 10/11 when nothing else did. Right-click the network icon > Troubleshoot problems.
Prevention tip
Set your DNS to a public resolver at the router level. This avoids ISP DNS problems that cause exactly this error. Also, never let apps install proxy settings — always disable “Automatically detect settings” in Internet Options > Connections > LAN settings. That checkbox is a magnet for broken proxy configs.
One more thing: if you use a corporate VPN, this error often means the VPN DNS suffix isn't set correctly. Talk to your network admin before trying anything drastic.