Home | Games | Directory | Downloads | Answers | Forum | Buyer's Guide
Coolefriend Answers-Technology Questions & Answers
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.5k 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.5k points)
Welcome to CEF Answers, you can ask questions and receive answers from members of the community.
22 questions
9 answers
3 users