How to block specific websites on Safari Mac?

Hi does anyone know how to block specific websites on Safari for Mac???


I don't want the traditional way through parental controls on system preferences ,,, is so tiring to use since I'm the only user... I just want some web pages out of the way! Does Apple have a way to do this on Safari 7.0.1 ___ maybe something similar to Safari on iOS ,,, please let me know! If not is there an app for this purpose? ... but do not tell me: K9 web protection by blue coat please ... that is pure junk... so please some small info will help thanks!

MacBook Pro, OS X Mavericks (10.9), 13-inch, Early 2011

Posted on Jan 18, 2014 12:18 AM

Reply
Question marked as Top-ranking reply

Posted on Jan 21, 2014 8:25 AM

If you want to block certain websites for a set amount of time you can use SelfControl. It's very easy to use and it's free.

38 replies

May 5, 2016 11:52 AM in response to Trey Yancy

This is a place to find help, not get insulted. If you can't help folks and feel a need to lash out, go buy a punching bag or something... please...


Anyway, go to /private/etc/hosts file. I like to use TextWrangler for such edits instead of terminal editors. TextWrangler is free and it is a fabulous tool. It will ask you if it is OK to unlock the file to edit. Certainly you do... You can see the format for how to make the entries. When done, you save it and then you need to flush the active cache for this to take effect right away. You do this from terminal. You can skip the part when I add a semi-colon and have it issue a voice command saying the task is completed. Just type in: sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder

Press enter...

The above works for OS X 10.5 and newer. If you have an older version, Google is your friend...


What you are doing is this.... When your computer browser initiates a request for a web address, the host name (mackeeper.com for example) must first be resolved to an IP address (54.175.172.236 for example). Your computer first looks to its DNS cache, the fastest possible lookup. If not there, then it looks to the hosts file. If there, then you are done. If not, then it makes a query to the DNS server. So, by flushing your cache and placing an entry in your hosts file, you then force the call for mackeeper.com or any in your list to simply direct the request back to your local machine. Bam... pest removed.. After a while, they may re-appear under a slight variation of the name. So you'll have to carefully watch the name that appears in the web address and then add it to your list.




User uploaded file

Dec 23, 2016 2:49 AM in response to Klaus1

Actually there is and it's called WasteNoTime Safari extension. You can either block a website all together or limit the time you spend on it. It's a great extension.

Some people are clever enough to make a business that answer people's needs, other just give them lesson on "self-discipline". There are many reasons why this user may want to block a website that do not involve a lack of control. You don't need to be self-sufficient in your replies. Either you know how to help and you help or you don't. that's the spirit of a community.

Nov 21, 2015 11:30 AM in response to Klaus1

Perhaps if you had the open-mindedness and compassion of an educated adult you would know that there actually is a way to block specific sites. Part of learning to stop visiting certain sites is to condition yourself that certain sites are bad. One way (and also extremely efficient and effective) of doing this is reminding yourself that the site is bad every time you visit it, because a lot of times people will go from website to website unaware that they've fallen back into the same pattern of behavior. If you block the site and prevent yourself from accessing the site enough times, eventually you can develop self-control. As well, it begins the train of self-control that these people can apply to other areas of life as well. I'm sad that your instinctual response to this person's plea for help was to not help them and to assume they're some kind of inferior being.

Jul 3, 2015 3:42 PM in response to --KaOZZZ--

This must be about hidden URLs which load without you wanting when you hover near them unawares


Someone wrote the best answer in a WikiHow. I'll give the link to that. But first, he got it slightly wrong, so I'll write the corrected answer here first


No new software required. You must use your terminal shell. It does not hurt

go one directory below applications to service programs? On my computer Dienstprogramme. You want Terminal

It's a nice bash shell. Edit a file called /etc/hosts


$ sudo vi /etc/hosts


add a new line below all the others giving the loopback address and the COMPLETE site address you want to block


127.0.0.1 www.********.com


write your edit away. You don't need to boot but the man said clear your DNS cache


$ sudo dscacheutil -flushcache


his explanation leaves off www. and it didn't work for me until I put that on. However I am duty bound to give his URL, since he gave me 99% of the answer, thank you sir


http://de.wikihow.com/Eine-Webseite-in-Safari-blockieren

Sep 23, 2015 5:34 PM in response to --KaOZZZ--

There is a new malicious scam site that invades Safari and pops up an ad that won't go away, no matter if you click Stay or Leave.

DO NOT CLICK THIS: http picfsff jordanschultzhasasmalldick-andruns-tech-support-mobilemadhatter com

You can try to block it via Terminal manually - one site at a time.

Unfortunately Apple does not have a protective measure for Safari to block unwanted hack sites, unless you use a parental control account.

Admin account has no protection and will always be a target for malicious hack site attacks.

Way to go, Apple!

Thanks for nothing.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to block specific websites on Safari Mac?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.