I have a pretty extensive hosts file that I use to block sites. Prior to 10.10 everything worked as it should. Since upgrading to 10.10 it seems as though all entries in the hosts file are ignored. I have tried moving all entries to the top before the localhost loopback, flushed cache, and rebooted. In all cases the entries are ignored. Has anyone experienced this? Any ideas or reasons why this is happening? Thanks.
Its beta. Or, Apple may be cracking down on the way Host files are used to fake activation for pirated software.
Mine seems to behave as expected. I do a lot of local web development, so I edit my hosts file all the time. I did have some issues with my Apache configuration due to Apache being upgraded from 2.2 to 2.4, but I was able to resolve these.
Missed the memo that the "It's a beta" mantra has commenced. Guess we should all crawl under a rock until the final release. The hosts file is located on every single operating system out there. I really don't think Apple is all of a sudden ignoring it because thieves out there want to steal software. It has a pretty important purpose which is beyond this thread. Sure, it there can be a bug in 10.10 that causes the entries to be ignored. Or possibly it has moved somewhere from the normal location found on every UNIX based OS (private/etc/hosts). But that is the point of my question and hopefully discussion. ---------- See! Believe it or not.... not everyone is a pirate! Thanks for the reply. At least I know it's still where it's supposed to be.
Has anyone else had an issue where sudo nano private/etc/hosts...doesn't yield the hosts file? It's completely blank.. I'm having issues with one of my test devices being "not eligible" for updating to iOS 8, despite being on my dev profile. Usually when this happens it's just a hosts file issue and I can fix it and go, but after my update to yosemite that command doesn't seem to get me where I need to be.
Check the alternative place where it's store on other UNIX systems, /etc/hosts. That's where it should be, not a symlink like Apple has done in the past.
This worked! Now to figure out why it won't properly authenticate that the device is eligible.... Thank you though! Simple mystery SOLVED.
how it's solved? Would you be so kind to elaborate... What is the solution? I have the same problem but /etc/hosts is sym. link to /private/etc/hosts and whatever I put there it gets ignore unfortunately.
Its not working for me either. I need to edit my websites without uploading via ftp every minute. This is terrible!
/etc/ is actually a symlink to /private/etc so yes, /private/etc/hosts is the correct location for the hosts file. Open up Terminal.app and issue: Code: dscacheutil -flushcache to flush the cache. My adblock hosts file is working perfectly.
Issue is the mDNS Responder is no longer loaded by default I had the same issue and the problem was related to the fact that the mDNSresponder was no longer being loaded at startup. Once I reenabled that everything worked fine again. Directions at the below url for resolving http://azchipka.thechipkahouse.com/dns-overrides-yosemite-10-10-etchosts/10473/
You can also use the directory service. Apple has been moving everything to it for some time, so I can imagine that they could deprecate the hosts file at some point. For more info, look here: https://tomafro.net/2009/07/dscl-the-easy-way-to-add-hosts-on-osx
Best I can tell though this only works with .local domains though which when interlinking multiple websites or iOS apps that you need to define the full domain for this doesn't do much good, any chance you know how to make it work with .coms and similar?
Right, I should have tried it out myself before suggesting it, sorry It seems that this feature no longer works since Lion or so (from what I found on the net). Seems that hosts is still the way to go. P.S. It also does not work with localhost aliases on Yosemite, the whole Hosts node is ignored.
Ya looks like in the latest version that no longer works either. Trying to find yet another work around will update the above linked post when I find one.
As of 10.10 mDNSResponder as a separate daemon is deprecated and included in the newer discovery daemon. Its shared functionality can be seen in the plist file: cat /System/Library/LaunchDaemons/com.apple.discoveryd.plist At least on my end, I have no problems with discoveryd and the /etc/hosts file If theres any need to reload the dns daemon this would be the way i guess:
I'm noticing the command I usually use to launch TextEdit to edit my host file no longer works in Yosemite. Code: sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/hosts Is there something I'm missing here?
that is cool but when it opens the document is locked and it tries to make a duplicate to make any changes. Any way to have it unlocked? I thought sudo would have taken care of that.