Ask Mommy and get Answers from experts
0 votes
I've been trying to find a solution for the problem of wamp server host file not writable? Wamp shows The file: C:/WINDOWS/system32/drivers/etc/hosts is not writable or does not exists.
in Windows by Silver (2.7k points)

1 Answer

0 votes

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/etcto 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
    # space.
    #
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    #
    # For example:
    #
    #      102.54.94.97     rhino.acme.com          # source server
    #       38.25.63.10     x.acme.com              # x client host
    # localhost name resolution is handle within DNS itself.
    #       127.0.0.1       localhost
    #       ::1             localhost 

by Silver (2.7k points)
44 questions
15 answers
7 users