title: Editing of "hosts" file not effective
body: <p>I've recently been trying to edit my hosts file to redirect URL's, effectively blocking them on my computer. I have years of programming experience, and experience with Terminal/nano, but I can't quite figure out why it won't redirect.</p>
  
  <p>I have appended my hosts file like so (both /etc/hosts and /private/etc/hosts)</p>
  
  <pre><code>127.0.0.1       google.com
  </code></pre>
  
  <p>and I have flushed the dns cache like so</p>
  
  <pre><code>sudo dscacheutil -flushcache
  </code></pre>
  
  <p>however, even after a restart it will not redirect. Any ideas on what might be the problem?</p>
  
  <p>EDIT:</p>
  
  <p>So the redirect works when I ping "google.com" (it attempts to ping 127.0.0.1). However, it will not redirect in my web browser. I suppose this narrows down the problem.</p>
  
  <p>EDIT 2:</p>
  
  <p>So now I have determined that the redirects will work in any other web browser, but not in safari. Any ideas? I'm about to clear browsing data in Safari and see if that helps.</p>
  
  <p><strong>Solution is below</strong></p>