Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ominx

macrumors 6502
Original poster
Jun 23, 2010
356
9
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.
 

pmz

macrumors 68000
Nov 18, 2009
1,949
0
NJ
Its beta.

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

HyperliteG4

macrumors regular
Jul 18, 2002
248
164
Southern California
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.
 

ominx

macrumors 6502
Original poster
Jun 23, 2010
356
9
Its beta.

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

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.

----------

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.

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. ;)
 

justblais

macrumors member
Jun 24, 2013
67
0
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.
 

Intell

macrumors P6
Jan 24, 2010
18,955
509
Inside
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.
 

justblais

macrumors member
Jun 24, 2013
67
0
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.
 

ljakab

macrumors newbie
Jun 7, 2014
1
0
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.
 

Watabou

macrumors 68040
Feb 10, 2008
3,426
759
United States
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.

/etc/ is actually a symlink to /private/etc so yes, /private/etc/hosts is the correct location for the hosts file.

Same problem

Its not working for me either. I need to edit my websites without uploading via ftp every minute. This is terrible!

Open up Terminal.app and issue:

Code:
dscacheutil -flushcache

to flush the cache. My adblock hosts file is working perfectly.
 

Wire_Apple_Geek

macrumors newbie
Mar 6, 2002
8
0
Durham NC
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?
 

leman

macrumors Core
Oct 14, 2008
19,497
19,632
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 :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.
 

matthewadams

macrumors 6502
Dec 6, 2012
379
168
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:
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.discoveryd.plist
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.discoveryd.plist
 

cubbox

macrumors newbie
Oct 13, 2014
1
0
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:

Brilliant this worked perfectly. Thanks
 

scotty588

macrumors 6502
Jan 2, 2007
469
61
Los Angeles, CA
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?
 

leman

macrumors Core
Oct 14, 2008
19,497
19,632
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?

You are making it way too complicated. Why not just

sudo open -a TextEdit /etc/hosts

?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.