Mar 12, 2015

/etc/hosts is not DNS.. Please use the right tool to test; nslookup and dig always consult DNS and never use the entries in /etc/hosts (or for that matter NIS, LDAP or other alternative hosts databases). The fact that the /etc/hosts file is used at all by your system and the priority it has is determined by the Name Service Switch libraries configured in /etc/resolv.conf hosts (file) - Wikipedia The computer file hosts is an operating system file that maps hostnames to IP addresses.It is a plain text file. Originally a file named HOSTS.TXT was manually maintained and made available via file sharing by Stanford Research Institute for the ARPANET membership, containing the hostnames and address of hosts as contributed for inclusion by member organizations. Resolving the Diplodia complex on apple and other Rosaceae Oct 26, 2012 SQL SERVER - AlwaysOn Availability Group Stuck in

Jul 31, 2019

Sep 22, 2016 resolving host, slow internet - Apple Community Dec 27, 2017 domain name system - nslookup not resolving hostname

Resolving host names with a hosts file. Domain names or IP addresses on a local computer can be resolved by adding entries in the local hosts file on a computer. Entries in the local hosts file have the added advantage that the system can run the application server, even …

Ok, it turns out the "host" command not resolving was a bit of red herring for my original problem - it couldn't work because it doesn't look into /etc/hosts, as explained in answers below. The original issue was lack of canonical hostname i.e. hostname --fqdn was returning localhost.