Yosemite 10.10 Hosts File

Discussion in 'OS X Yosemite (10.10)' started by ominx, Jun 4, 2014.

  1. ominx macrumors 6502

    Joined:
    Jun 23, 2010
    #1
    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.
     
  2. pmz macrumors 68000

    Joined:
    Nov 18, 2009
    Location:
    NJ
    #2
    Its beta.

    Or, Apple may be cracking down on the way Host files are used to fake activation for pirated software.
     
  3. HyperliteG4 macrumors regular

    HyperliteG4

    Joined:
    Jul 18, 2002
    Location:
    Southern California
    #3
    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.
     
  4. ominx thread starter macrumors 6502

    Joined:
    Jun 23, 2010
    #4
    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. ;)
     
  5. justblais macrumors member

    Joined:
    Jun 24, 2013
    #5
    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.
     
  6. Intell macrumors P6

    Intell

    Joined:
    Jan 24, 2010
    Location:
    Inside
    #6
    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.
     
  7. justblais macrumors member

    Joined:
    Jun 24, 2013
    #7
    This worked! Now to figure out why it won't properly authenticate that the device is eligible....

    Thank you though! Simple mystery SOLVED.
     
  8. ljakab macrumors newbie

    Joined:
    Jun 7, 2014
    #8
    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.
     
  9. jharnett macrumors newbie

    Joined:
    Mar 13, 2013
  10. kanyonb38 macrumors newbie

    Joined:
    Jun 16, 2013
    Location:
    PA, USA
    #10
    Its not working for me either. I need to edit my websites without uploading via ftp every minute. This is terrible!
     
  11. Watabou macrumors 68040

    Watabou

    Joined:
    Feb 10, 2008
    Location:
    United States
    #11
    /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.
     
  12. Wire_Apple_Geek macrumors newbie

    Joined:
    Mar 6, 2002
    Location:
    Durham NC
    #12
  13. leman macrumors 604

    Joined:
    Oct 14, 2008
    #13
  14. Wire_Apple_Geek macrumors newbie

    Joined:
    Mar 6, 2002
    Location:
    Durham NC
    #14
    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?
     
  15. leman macrumors 604

    Joined:
    Oct 14, 2008
    #15
    Right, I should have tried it out myself before suggesting it, sorry :eek: 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.
     
  16. Re4DeR macrumors newbie

    Joined:
    Sep 27, 2014
    #16
    Does it work for you in last yosemite? My com.apple.mDNSResponder.plist is empty :(
     
  17. Wire_Apple_Geek macrumors newbie

    Joined:
    Mar 6, 2002
    Location:
    Durham NC
    #17
    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. :mad:
     
  18. Re4DeR macrumors newbie

    Joined:
    Sep 27, 2014
  19. Re4DeR macrumors newbie

    Joined:
    Sep 27, 2014
  20. matthewadams macrumors regular

    Joined:
    Dec 6, 2012
    #20
    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:
     
  21. cubbox macrumors newbie

    Joined:
    Oct 13, 2014
    #21
    Brilliant this worked perfectly. Thanks
     
  22. scotty588 macrumors 6502

    Joined:
    Jan 2, 2007
    Location:
    Carlsbad, CA
    #22
    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?
     
  23. leman macrumors 604

    Joined:
    Oct 14, 2008
    #23
    You are making it way too complicated. Why not just

    sudo open -a TextEdit /etc/hosts

    ?
     
  24. scotty588 macrumors 6502

    Joined:
    Jan 2, 2007
    Location:
    Carlsbad, CA
    #24
    That works. Thanks!
     
  25. viizi macrumors regular

    Joined:
    Dec 2, 2010
    #25
    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.
     

Share This Page