# Why does a hostname work in a browser but not in a command-line tool?

Canonical: https://www.namesilo.com/questions/dns-and-email/why-does-a-hostname-work-in-a-browser-but-not-in-a-command-line-tool

Published: 2026-11-18

Last updated: 2026-11-19

Topic: DNS & email

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.

Separate resolution from connection failures

Use 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.

Your next steps

Use the identical full hostname

Identify each resolver and cached path

Compare A and AAAA answers

Compare the actual connection error

Separate resolution from connection failures

Use 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.

Verified detail: DoH resolver transport.

Your next step: Compare the actual connection error.

## Sources

- [IETF RFC 8484 §3](https://www.rfc-editor.org/rfc/rfc8484.txt#section-3)

- [Official supporting source](https://learn.microsoft.com/en-us/windows-server/networking/dns/troubleshoot/troubleshoot-dns-client)

- [IETF RFC 9110 §4.2](https://www.rfc-editor.org/rfc/rfc9110.txt#section-4.2)
