I am trying to troubleshoot certain CDN problem, testing what kind of download speeds I get on different servers. Let's say it is host.example.com which will return me some IP address, not sure which one (there are various, and they seem to offer different download speeds).
By default I seem to get a certain IP address, not sure how it decides which IP address it gives to me or anyone else (not important at this point), but I try to test some other servers in that pool by using the hosts file in Windows 11. I enter it into the hosts file and:
ipconfig /flushdns
ping host.example.com
nslookup host.example.com
Ping gives the IP address which I entered into the hosts file, while nslookup gives the one that I'd receive from DNS without the hosts file?
I am unsure if that is how it is supposed to work, ie. nslookup doesn't care about the hosts file, but I think I did get the hosts file IP address when I tried this same test in a Linux machine.
In addition, I realize that if the browser uses e.g. DNS-over-HTTPS, it would completely bypass the hosts file and instead use the IP address it gets from the DoH-capable DNS server, whatever it is. I've tried to make sure DoH is disabled in the browser.
So, now in Windows I am unsure what is the actual IP-address that the browser will use, if it tries to access host.example.com. So my question is: Is there some way to check that within the browser itself, whether it uses the entry in the hosts file or not? That is, to check what is the IP address that the browser (not ping or nslookup) thinks is the correct one for host.example.com?