devELEMENTS

Made-to-order websites, applications, promotions and beyond.

I specialize in creative social media solutions for brands and artists.

enright [dot] sean [at] gmail [dot] com

  • Tips: blocking access to certain domains on your Mac

    Tips: blocking access to certain domains on your Mac

    Tips: blocking access to certain domains on your Mac

    If you’re reading this, you’ve probably accepted the fact that self-control alone is not going to keep you from wasting away on Facebook, Gawker, or whatever your favorite vice website is.

    Here’s a tip that will trick your Mac into thinking that a particular domain is hosted locally on your computer. After going through these steps, visiting said domain will result in an “unable to connect” message. Only going through the semi-tedious reversal process will allow you to reconnect to that domain.

    1) open applications->terminal

    2) type the following and press return: cd /etc/

    3) type the following and press return: sudo emacs hosts

    4) when prompted, enter your computers password, press return

    5) go to the line that begins: 127.0.0.1

    6) add the domain to end to the end of that line (do both www and non-www). For example, if you are trying to block Facebook, it should now looks something like:

    127.0.0.1 localhost etc. etc. www.facebook.com facebook.com

    7) ctrl-x-s (to save)

    8) ctrl-x-c (to exit)

    9) close your browser

    10) type the following onto the terminal window command line and press return: dscacheutil -flushcache

    (the above flushes your dns cache so your computer doesn’t try and resolve facebook.com to the previously cached location)

    11) reopen browser

    If you change your mind and just can’t live without it, follow the same steps, removing www.facebook.com and facebook.com from step #6