# Can my hosts file override public domain DNS?

Canonical: https://www.namesilo.com/questions/dns-and-email/can-my-hosts-file-override-public-domain-dns

Published: 2026-11-18

Last updated: 2026-11-19

Topic: DNS & email

A local hosts mapping can change how applications using that host’s resolver reach a name. It does not change the authoritative DNS zone. Microsoft’s Hosts File Editor documentation describes local IP-to-domain mappings and says the hosts file takes precedence over DNS.

Compare the local mapping with a direct DNS query

Inspect the device’s intended override and compare an explicit DNS query to the authoritative service. On Windows, Microsoft notes that nslookup bypasses the client DNS cache, so it need not reproduce every result seen through the normal client path. Retest the actual application after removing an obsolete override.

Your next steps

Inspect the device’s local hostname mapping

Query DNS explicitly for the same name

Compare the actual application’s address

Remove obsolete local data and retest

Compare the local mapping with a direct DNS query

Inspect the device’s intended override and compare an explicit DNS query to the authoritative service. On Windows, Microsoft notes that nslookup bypasses the client DNS cache, so it need not reproduce every result seen through the normal client path. Retest the actual application after removing an obsolete override.

Verified detail: Windows hosts-file local mapping and precedence over DNS.

Your next step: Remove obsolete local data and retest.

## Sources

- [Official supporting source](https://learn.microsoft.com/en-us/windows/powertoys/hosts-file-editor)

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