Reputation: 53843
I'm Mac OSX and I've previously edited my hosts file multiple times and it always worked. But all of a sudden I now don't get the results anymore that I want.
The contents of /etc/hosts
are currently this:
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
www.google.nl www.example.com
but if I go to www.example.com
, I still get the example.com website instead of google. I restarted the browser and the whole laptop, but nothing changes.
Does anybody know how it could be that this doesn't work anymore? All tips are welcome!
Upvotes: 0
Views: 1093
Reputation: 1657
The syntax of the /etc/hosts
file is
IP[tab]DOMAIN[tab]ALIAS1[tab]ALIAS2...
If you'd like www.example.com to redirect you to www.google.nl you will have to resolve www.google.nl, take that IP and insert it into your /etc/hosts.
Upvotes: 1