On a client machine such as OSX or Windows:
Do web browsers check the hosts file before refering to their DNS cache?
I am trying to figure out the full DNS 'route' in my mind.
- Hosts File
- Browser DNS Cache
- Local DNS Cache
- DNS Server
- Root Hints or Forwarding
Does it differ between browsers and OSs?
Browsers generally do not do anything except asking the IP library of the operating system to resolve a host name. So the normal behavior of ANY IP based program applies.
If you are on UNIX systems like me on Debian, the first thing which is checked is the /etc/hosts file.
On a Windows machine, hosts file entries are loaded into the DNS cache.