The Hosts file is used by the operating system to map human-friendly hostnames to numerical Internet Protocol (IP) addresses which identify and locate a host in an IP network. The Hosts file contains lines of text consisting of an IP address in the first text field followed by one or more hostnames. If the Hosts file is changed from the default, resetting it can help resolve some connectivity issues.
Your hosts file is missing from your computer, check here C:/WINDOWS/system32/drivers/etc
to find the host file. If not,follow these steps to solve this issue.
Create a new text file using notepad, paste the following code in it and save it as hosts without any extension (if the .txt extension appears in the file, remove the .txt extension). After saving, move the file to C:/WINDOWS/system32/drivers/etc folder. Start Wamp server and check the error has gone. You can also check this help from Microsoft.
# Copyright (c) 1993-2006 Microsoft Corp.
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
# For example:
# 22.214.171.124 rhino.acme.com # source server
# 126.96.36.199 x.acme.com # x client host
# localhost name resolution is handle within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost