Skip to content

Commit

Permalink
The location of the hosts file varies by OS.
Browse files Browse the repository at this point in the history
Link to Wikipedia for an extensive list of hosts file locations, including mobile OS.
  • Loading branch information
StevenBlack committed Jan 21, 2015
1 parent 1ddd19c commit c4bbbd9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,9 @@ DNS lookup...
* Browser checks if the domain is in its cache.
* If not found, calls ``gethostbyname`` library function (varies by OS) to do
the lookup.
* ``gethostbyname`` checks if the hostname can be resolved by looking in the
``/etc/hosts`` file, before trying to resolve the hostname through DNS.
* ``gethostbyname`` checks if the hostname can be resolved by reference in the
local ``hosts`` file (whose location `varies by OS`_) before trying to
resolve the hostname through DNS.
* If ``gethostbyname`` does not have it cached nor in the ``hosts`` file then a
request is made to the known DNS server that was given to the network stack.
This is typically the local router or the ISP's caching DNS server.
Expand Down Expand Up @@ -550,3 +551,4 @@ page rendering and painting.
.. _`Cellular data network`: https://en.wikipedia.org/wiki/Cellular_data_communication_protocol
.. _`analog-to-digital converter`: https://en.wikipedia.org/wiki/Analog-to-digital_converter
.. _`network node`: https://en.wikipedia.org/wiki/Computer_network#Network_nodes
.. _`varies by OS` : https://en.wikipedia.org/wiki/Hosts_%28file%29#Location_in_the_file_system

0 comments on commit c4bbbd9

Please sign in to comment.