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

A while ago I set to in my hosts, because it was way too much of a time sink. I don't remember exactly how I set it - I know I had some trouble with it and tried a few different things before I found the "right" method, so I might have done something weird.

Now, no matter what I do, I can't un-set it or set it to something else - it's somehow "stuck" on

$ sudo nano /etc/hosts

I add these two lines:

Save, exit, then:

$ dscacheutil -flushcache
$ ping
PING ( 56 data bytes
$ ping
PING ( 56 data bytes

Same thing if I don't specify at all.

What am I missing?? I don't have any other entry for in my hosts file. It's not a router or ISP issue - other computers on the same router are fine. Where else could it be defined?

For the sake of completeness, I cleaned everything out of my hosts, and it contains only the following:

# Host Database
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##       localhost broadcasthost
::1             localhost
fe80::1%lo0     localhost
share|improve this question
What IP address does 'dig' give you? – Steve Folly Oct 21 '09 at 22:30 6 IN A 6 IN A (I got from a google search just for testing, it's likely out of date.) – alex_c Oct 21 '09 at 22:46
Try 'dscacheutil -cachedump -entries host' as an admin. Is in there, and if so which DS node was it found in? – Steve Folly Oct 22 '09 at 5:41
up vote 3 down vote accepted

It sounds like you may've created the host entry in DSLocal, rather than /etc/hosts. To find out, run:

dscl /Search -read /Hosts/

It should come back with something like this:

AppleMetaNodeLocation: /Local/Default
RecordType: dsRecTypeStandard:Hosts

See the AppleMetaNodeLocation? That tells you where it's getting the info from. If it says /BSD/local, it's in /etc/hosts; if it says /Local/Default (which I suspect it will), that's the default local directory node, aka DSLocal. If it says <dscl_cmd> DS Error: -14136 (eDSRecordNotFound), then I have no idea what you've done.

Anyway, assuming the entry is coming from DSLocal, it's fairly easy to remove:

sudo dscl /Local/Default -delete /Hosts/
share|improve this answer
Thank you sir - that is exactly it! Would vote up, but no rep yet :) – alex_c Oct 22 '09 at 19:13


dscacheutil -flushcache

and report back.

share|improve this answer
Already did - see above. As far as I can tell this should do the trick, but it doesn't, that's why I'm baffled. – alex_c Oct 22 '09 at 0:27
Wow, sorry I apparently jumped over that while reading. I'd maybe grep for in /etc and see what comes up. – Tyler Oct 22 '09 at 2:16

It seems that you need to run

sudo niload -v -m hosts . < /etc/hosts

after updating your hosts file if you want the changes to take.

share|improve this answer
I think that was for older versions of Mac OS X, I'm running 10.5.7 - "command not found" on mine. – alex_c Oct 21 '09 at 22:49

You must log in to answer this question.

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