Open the file /etc/nsswitch.conf and find the line with hosts:
hosts: files dns
It lists the services in order of priority, which are used to find the IP address for the domain name. The column files means the use of the /etc/hosts file, and the dns means use of the Domain Name Service.