Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have blocked in my country. But I have another domain that points to the same server and it's not blocked (Apache Virtual Host) and works fine.

I put an entry in hosts file of my computer as follows.

I still can't access Am I getting hosts file all wrong?

share|improve this question
up vote 6 down vote accepted

Yes, this is incorrect. Host files are designed to map a single host or a list of hosts to a single IP address. Instead, you've attempted to map a host to a host.

Assuming and do point to the same IP address, you could try the following.

1 - Ping the address you can resolve, which is


2 - Assuming the IP is, copy it into the host file, enter a space, then enter the domain you wish to map.

3 - On Windows, you may need to flush your browser cache. Open a command prompt and type:

ipconfig /flushdns

4 - You may still need to restart your browser. On Mac and Unix-based systems, the changes should be immediate.

Note that, depending on how the site is blocked, you may need to use other methods to get through. If it's blocked by your ISP and not DNS, then you'll likely need to look for an Anonymous proxy in order to fetch the content from a proxy in another country. You can find some proxies here, as well as on Google. Good luck!

Note: You can add more than one host to a single IP by spacing out the addresses:
share|improve this answer
What if I say, this is single IP on which, and few others are pointed by Apache Virtual Host. If I ping and get the IP address, this is not the webpage I want. – Neutralizer Sep 29 '12 at 9:20
This is the explicit need to map host to host. Is there a way in windows and mac to do that? – Neutralizer Sep 29 '12 at 9:22
No, you cannot control host to host, not without the IP. Plus, the target server, if using NameVirtualHost, will interpret the request by hostname anyway, so all you can do is tell your computer to point the domain to a specific IP address. Like I said, if this doesn't work, you'll likely just need to use a proxy. – jmort253 Sep 29 '12 at 9:39

Hostfiles point a domain name to an ip address (effectively acting like a A record), you can't use it to point a domain name to another name (like a C record). It simply dosen't work that way.

share|improve this answer
Got it. Is there a way to explicitly map host to host in windows and mac? – Neutralizer Sep 29 '12 at 9:29
The way you expect it to work? not really. If you map to, the request the server recieves is for Not much use there. – Journeyman Geek Sep 29 '12 at 9:39

You must log in to answer this question.

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