{"id":"https://www.namesilo.com/questions/dns-and-email/why-does-a-hostname-work-in-a-browser-but-not-in-a-command-line-tool","url":"https://www.namesilo.com/questions/dns-and-email/why-does-a-hostname-work-in-a-browser-but-not-in-a-command-line-tool","title":"Why does a hostname work in a browser but not in a command-line tool?","description":"Compare the exact name, resolver and error in both applications. A browser can use DNS over HTTPS, while a command-line lookup can query the…","language":"en","category":"dns-and-email","datePublished":"2026-11-18","dateModified":"2026-11-19","answer":"Compare the exact name, resolver and error in both applications. A browser can use DNS over HTTPS, while a command-line lookup can query the operating system’s configured DNS service. RFC 8484 defines that separate HTTPS-based DNS path; Microsoft also notes that nslookup does not use the Windows client’s DNS cache.","body":"Why does a hostname work in a browser but not in a command-line tool?\n\nCompare the exact name, resolver and error in both applications. A browser can use DNS over HTTPS, while a command-line lookup can query the operating system’s configured DNS service. RFC 8484 defines that separate HTTPS-based DNS path; Microsoft also notes that nslookup does not use the Windows client’s DNS cache.\n\nSeparate resolution from connection failures\n\nUse the same fully qualified hostname and compare the actual A or AAAA results. Then test the website’s HTTP or TLS connection independently. Record which stage differs before changing authoritative records, because a DNS answer and a successful application connection are separate evidence.\n\nYour next steps\n\nUse the identical full hostname\n\nIdentify each resolver and cached path\n\nCompare A and AAAA answers\n\nCompare the actual connection error\n\nSeparate resolution from connection failures\n\nUse the same fully qualified hostname and compare the actual A or AAAA results. Then test the website’s HTTP or TLS connection independently. Record which stage differs before changing authoritative records, because a DNS answer and a successful application connection are separate evidence.\n\nVerified detail: DoH resolver transport.\n\nYour next step: Compare the actual connection error.","steps":["Use the identical full hostname","Identify each resolver and cached path","Compare A and AAAA answers","Compare the actual connection error"],"faqs":[],"sources":[{"name":"IETF RFC 8484 §3","url":"https://www.rfc-editor.org/rfc/rfc8484.txt#section-3"},{"name":"Official supporting source","url":"https://learn.microsoft.com/en-us/windows-server/networking/dns/troubleshoot/troubleshoot-dns-client"},{"name":"IETF RFC 9110 §4.2","url":"https://www.rfc-editor.org/rfc/rfc9110.txt#section-4.2"}],"json":"https://www.namesilo.com/questions/data/why-does-a-hostname-work-in-a-browser-but-not-in-a-command-line-tool.json","markdown":"https://www.namesilo.com/questions/data/why-does-a-hostname-work-in-a-browser-but-not-in-a-command-line-tool.md"}