one of my friend changed some network config in my laptop at home, He said he tried something related to block a website(he tested it with www.google.com).Now www.google.com not loading . Even he dont no what to do now .

Now Everytime when i try www.google.com in chrome browser its saying , could't connect to www.google.com,i tried it even with different browsers,but same result.But not problems with other domain names.

Instead of domain name i am using the the ip address of www.google.com ,That time it's loading

But no problem in other google websites like www.google.co.in , www.google.co.uk , www.gmail.com ,

i guess the problem is in dns settings . But i am not familier with networking .

Details of file /etc/hosts   localhost   karthi-Vostro-1550 www.google.com

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

**this is the result of nslookup**


Non-authoritative answer:
Name:   www.google.com
Name:   www.google.com
Name:   www.google.com
Name:   www.google.com
Name:   www.google.com

result of Ping www.google.com - 100 % packet loss

My friend changed the config in my home. Now i am in college .The same problem is happening in my college too . But there is a difference

In home When i enter into a website that enabled google adsense then the google chrome asking username and password . But even though that page is loading .

In college Chrome not asking for any username or password . But www.google.com not loading

If any further details needed i am ready to give

2 Answers 2


Your friend added a mapping forwww.google.com to /etc/hosts which points to an IP address in the private IPv4 network address space corresponding to the CIDR block. This block has been reserved by IANA for private networking and is commonly used for home, office, and enterprise LANs, when globally routable addresses are not required or not available. The mapping in /etc/hosts overrides regular DNS lookups, and unless there happens to be a host with the IP address on the local network, the address is unused.

To remedy the situation, remove the following line from /etc/hosts: www.google.com
  • May I know why you said the network is
    – Ron Vince
    Apr 30, 2014 at 5:08
  • @RonVince The goal of the OPs friend is to block a web site based on its hostname. To do this, he maps the hostname to a "bogus" IP address in the hosts file, in this case Presumably this address was chosen because it is in the - range, which is one of the three IP address blocks reserved for private use. Because these addresses have no global meaning, packets with private source or destination addresses should not be forwarded across inter-network links. Apr 30, 2014 at 6:40
  • @RonVince Of course, if the OPs laptop happens to be in a LAN which uses addresses from block, there might be a host with the address present, which might have unintended consequences. As you wrote, the particular address is the conventional address for the network gateway, making it a somewhat unfortunate choice, although the significance of the address is that it would not be used on the global Internet. Apr 30, 2014 at 6:41
  • I missed 'result of Ping www.google.com - 100 % packet loss' which makes mapped to www.google.com is obviously not network gateway or host. The fact that OP could surf internet validates that is not network gateway. But no one except the network administrator can know that if is mapped to a MAC address which is probably not online. None of the given information can lead to deduce to what network is being used on the LAN. I understand your reasoning why was used in this case and (quite rare).
    – Ron Vince
    Apr 30, 2014 at 6:51
  • @RonVince You are misreading me. I'm not saying that the OPs network is, nor that it isn't (the gateway could be at a different address). You cannot determine the network from the information provided. I'm only saying that the significance of the address is that it belongs to a private block, which means that it is less likely that the address would point to a host (although in this particular case it happens to correspond to the conventional gateway address), and certainly not a host on the global Internet. Apr 30, 2014 at 7:02

Based on the content of /etc/hosts, www.google.com is set to be the IP It does not matter if you have set your computer to use any DNS servers including Google DNS server. Your computer will check the hostname, e.g. www.google.com, if it matches the hostname on /etc/hosts file first before it request the hostname to be resolved by the pointed DNS server.

As for the solution, remove ' www.google.com' line on /etc/hosts file and save the edit.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .