2

I'm aware that various domains are now redirected to 127.0.53.53 by ICANN to alert people to potential current/future name collisions.

However, I assumed any entries in my hosts file, for, for example, a development site running on Vagrant using a .dev domain, would still be honoured and have priority.

Currently I've a situation on a Mac (OSX 10.9.5) where most browsers (Safari 7.1.2, Firefox 35, Chrome Canary) are attempting to connect to 127.0.53.53 regardless. The only way I can get it to work is to change the TLD to something else.

Weirdly in Chrome stable 39.0.2171.95, which is my main browser, the .dev hosts file entries still load OK at present.

I've tried various things, restarting apps, restarting the VM, simplifying the hosts file / looking for errors, flushing the cache – dscacheutil -flushcache etc. Hosts entries with other TLDs (or none) still work fine.

Fixable / is there anything I've forgotten?

Community
  • 1
  • 1
William Turrell
  • 3,227
  • 7
  • 39
  • 57
  • that'd depend on what apple did to their dns resolver in osx, and whether any particular app is actually using that resolver. looks like chrome has their own and ignores whatever is being done in osx. – Marc B Jan 13 '15 at 18:26
  • 1
    @MarcB fixed it - my /etc/hosts was a symlink, not a regular file – apparently OSX only checks symlinked versions if the DNS lookup doesn't resolve. – William Turrell Jan 13 '15 at 19:22

1 Answers1

7

The reason was I had my /etc/hosts file symlinked (to Dropbox) and having read this answer, it turns out you must have an ordinary local file if you want to override anything that already has a valid DNS record (which ICANN's 127.0.53.53 is) – if the file is a symlink apparently it doesn't get checked first.

Have verified that removing the symlink makes it work again. Can't explain why Chrome was different though.

Community
  • 1
  • 1
William Turrell
  • 3,227
  • 7
  • 39
  • 57
  • 1
    Ditto this answer; I had to recreate a file at `/etc/hosts` instead of using a symlinked file in my Dropbox. Makes synchronizing hosts files between computers a little more burdensome, but at least my local domains are working correctly again. – geerlingguy Mar 05 '15 at 20:16
  • Please mark this as the answer, this was the resolution to my problem as well :) I wonder if this is purely an OSX issue, or if it's just how things are everywhere else. – Mike G Jul 01 '15 at 19:32
  • @geerlingguy — you might want to try a `/etc/hosts.d`-type solution noted in this answer http://unix.stackexchange.com/a/60554/87040 – Mike G Jul 01 '15 at 19:34
  • You could also use a hard link instead of a symbolic link – joeyhoer May 12 '17 at 15:46