Question -- Blocking Web URL's in Firefox. Please Reply If You Know Answer

Posted:
in Genius Bar edited January 2014
Hey.



This may not be the correct website or forum to ask this question, but there are smart people here who use Mac's and most likely also use Firefox with their Mac's.



There's a website that I WANT to block very much, but I can't figure out how to do so. It opens when using various other websites, mainly forums.



It's http://www.drivecleaner.com, don't click it.



What happens is, I'll open a page at a forum, and the Firefox window automatically shrinks to the smallest possible size, with the following screen capture notice attached to it. I havent ever pressed OK, but when pressing Cancel, the box closes then immediately opens a full screen Firefox window of the Drive Cleaner page anyway, and then freezes Firefox, if I don't Command-Quit Firefox immediately after pressing Cancel, that is.



Screen capture





It is incredibly annoying.



Nowhere in Firefox's preferences have I found anything to block URL's.



I don't know of any add-on's for Firefox that might block URL's, so if you know of any, PLEASE tell me.



I NEED to block that site.



I HATE IT!

Comments

  • Reply 1 of 12
    chuckerchucker Posts: 5,089member
    Try opening /etc/hosts and adding this line to it:

    Code:


    0.0.0.0www.drivecleaner.com







    Then, in Terminal, run 'lookupd -flushcache'.
  • Reply 2 of 12
    Quote:
    Originally Posted by Chucker View Post


    Try opening /etc/hosts and adding this line to it:

    Code:


    0.0.0.0www.drivecleaner.com







    Then, in Terminal, run 'lookupd -flushcache'.





    Where is /etc/hosts located and what is it? folder?



    In Terminal -- something that I never use and don't really know anything about -- I don't know where or how to run that command.



    Could you please offer a more thorough explanation?



  • Reply 3 of 12
    chuckerchucker Posts: 5,089member
    Sure.



    First, open TextEdit. Ask it to open a file. Now type a slash ('/'), and you should get a sheet letting you enter a path. That path should be '/etc'. You should see a folder with lots of files such as "authorization", "crontab", etc., and a few folders such as "defaults". Navigate to "hosts" and open that.



    You probably have a few lines in there like:

    Code:


    127.0.0.1localhost

    255.255.255.255broadcasthost

    ::1 localhost







    Don't touch them.



    Below them, add a new line:



    Code:


    0.0.0.0www.drivecleaner.com







    Make sure to press return at the end so the file ends with an empty line.



    Now, save it on your Desktop, because TextEdit won't let you save it to this place directly.



    Open a Terminal session. In the window, you should see something like:

    Code:


    Last login: Fri Jan 19 14:06:14 on ttyp1

    Welcome to Darwin!

    (your machine):~ (your account)$







    After the $, you should see a cursor.



    Type in the following:



    Code:


    sudo mv ~/Desktop/hosts /etc/







    You will be prompted for your admin password. (The 'sudo' means 'superuser do', allowing you to perform a command with unlimited rights.) Type the password (you won't see any indication of it) and press Enter.



    Your current hosts file will now be replaced with the one you just saved. (The 'mv' is short for 'move'. You are moving your new file to the path of the old one, thereby replacing it.)



    Now, run:

    Code:


    lookupd -flushcache







    And relaunch your browser. It should no longer be able to connect to this particular website.
  • Reply 4 of 12
    Thanks very much for the detailed and speedy response. I'm going to try it later, as I'm off to bed now and don't want to do something technical that I've never done before, while I'm straining to keep my eyes open [laughing]. Thanks!
  • Reply 5 of 12
    sunilramansunilraman Posts: 8,133member
    Cool. That's a great tip for blacklisting sites. I wanna try when I get MacBook back from servicing. Especially the rubbish "OMFG YOUR PC WINDOWS IS INFECTED OMFG OMFG DOWNLOAD THIS SHITE TO MAKE IT EVEN MORE INFECTED AND STUFFED UP"
  • Reply 6 of 12
    Okay, it seems to have worked correctly [big smile]. Now am I free to erase the "hosts" Text Edit file from the Desktop?
  • Reply 7 of 12
    chuckerchucker Posts: 5,089member
    Quote:
    Originally Posted by - Ø®£Z - View Post


    Okay, it seems to have worked correctly [big smile]. Now am I free to erase the "hosts" Text Edit file from the Desktop?



    Sure.
  • Reply 8 of 12
    Quote:
    Originally Posted by Chucker View Post


    Sure.



    Thx for your help!
  • Reply 9 of 12
    Website did it again. And the DriveCleaner website isn't anything to do with any forums or sites that it happens at, it seems like some kind of hack of the websites.



    I don't know. But the above suggestion seems to have done nothing.



    I actually just erased all the Cookies in Firefox, shortly prior to going to the forum.



    Would the Cookies being erased have anything to do with it?
  • Reply 10 of 12
    The Terminal command works fine to block entire domains, but is there any way to block only a specific URL address? For exemple could I block a certain URL leading to a video on youtube without blocking any other video in that same domain?



    I,ve done many searches on the net (openDNS, Terminal commands, PithHelmet and so on...) still cant find a solution!



    Thanks for your help guys!



  • Reply 11 of 12
    anyone knows??
  • Reply 12 of 12
    My nightmare is over! Finally found an easy (but not free) solution!



    Let me share with you guys the results of my tests!



    OpenDNS, PithHelmet, the famous "etc/hosts" command on the Terminal, Northern Softwork's Hostal, Mac Os X's Parental Control and most of the traditionnal Parental control softwares ONLY ALLOW YOU TO BLOCK ENTIRE DOMAINS.



    If you have young kids that you wish to protect agains general categories of websites or specific domains (but not specific URL or subdomains), all these previous softs I mentionned will do the job!



    BUT



    If like me you need to block a specific URL (for exemple, just one specific page on myspace.com, BUT NOT all the pages on myspace.com), you can install K9 Web Protection (for free!). Be aware that when rying to access a URL you volontary blocked, a "K9 filter alert" will be displayed, and you cannot change,redirect, or personalize that displayed page.



    FINALLY



    If like me you need an application that will be completely transparent when blocking a website, an application that lets you block either categories of websites, subdomains or very specific URL's, you need...



    Content Barrier (Mac or PC, 30 day free trial available, or else you'll have to buy it!)



    That soft is amazing, the only place you can locate it on your computer is in "My application". When accessing a prohibited URL, it lets you choose where to redirect it (in my case, for prohibited myspace.com/exemple, is automatically redirected to myspace.com) which simply looks like the page doesnt exist or a bug, or something weird but for which my teen cant blame me!



    There are also many features to receive printscreens every 1 minute or 1 hour of what's happening on your computer, you can also schedual whatever you want or dont want your kid/teen to do, it's very easy to set up, and it's got more features than I'll ever need to use!



    There's also one complicated/free way to accomplish this, but be prepared to read and get headaches before you ever reach your goal! Just in case you want to follow that trail here's what I had gathered :

    http://www.macosxhints.com/article.p...10117003458918

    http://dansguardian.org/?page=whatisdg

    http://www.ex-parrot.com/pete/upside-down-ternet.html



    Thanks to everyone who offered me their help and suggestion!



Sign In or Register to comment.