DNS Overrides in Yosemite 10.10 – /etc/hosts

As someone who does web development the ability to manually set domain name to ip address resolution on my local machine is extremely important and for some reason Apple decided with the release of 10.10 aka Yosemite that reading the Hosts file found at /etc/hosts was no longer important. This change caused some major problems for me and I literally spent half the day digging around trying to find the solution. Every blog post I encountered on the issue all ended with “has anyone found the solution for this yet?”

So heres the solution to the problem.

  1. Launch Terminal.app from /Applications/Utilities
  2. Enter the following commands:
    sudo pico /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
  3. Near the top of the file you will see the following lines
    Disabled
  4. Delete them both.
  5. ctrl+w to exit and save.
  6. start up the mDNS Responder with the following command:
    sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
  7. Flush your dns cache with the following command
    dscacheutil -flushcache
  8. You should be all set at this point.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This site uses "tracking cookies" on your computer to deliver the best experience possible. To learn how these cookies are used please review our Privacy Policies by clicking here. Your continued use of this site indicates you have read and agree to our Terms of Use and Privacy Policies, collectively known as "the agreement". If you do not agree to this agreement or are not authorized to utilize the site because of the conditions of the agreement. Please close your browser now. This notice will be provided once every seven calendar days.
Close