0

I visit one social network site that loads another social network site in an iframe.

Is there a way to block a specific site on Firefox on Mac?

For example, pintrest.com has an updated cookie. I don't have an account there and don't visit the site.

enter image description here

4 Answers 4

2

One option if you (and no one else who uses your computer) ever intends to use that site, would be to create a black hole host table entry. What that does is forces your computer to resolve that DNS entry to an alternate IP address (like localhost/127.0.0.1). Since the IP address is not correct, attempts to access that site would fail and prevent your computer from loading any content.

Note: Make sure you use an IP address that doesn't have a different web server or you may accidentally load content from that site. Localhost is usually a safe bet unless you're running your own server.

https://www.imore.com/how-edit-your-macs-hosts-file-and-why-you-would-want

Open a Finder window. Select Applications from the sidebar.

Open Finder, then click on Applications Double-click on Utilities. Double-click Terminal.

Double-click on Utilities, then double-click on Terminal In the Terminal window, you will need to enter a command to open the Nano text editor. You will need your administrator password, as well.

type sudo nano /etc/hosts and then hit return. Enter your administrator password and then hit return.

Enter enter Nano Text Editor in Terminal You're now in the Nano text editor.

Map the IP address in the Nano text editor If you want to add a new device or domain, move the cursor using the arrow keys and position it after the text in the window. Then, begin typing.

If you're mapping a particular IP address on your local network to a domain, you can type the IP address, hit tab, then type the domain name.

Conversely, if you'd like to make sure a web URL doesn't go to its intended site — if you're trying to keep your Mac away from certain sites, use "127.0.0.1." That'll map it back to your Mac. Even if your Mac is assigned a different IP address by its router, 127.0.0.1 defaults to the local machine thanks to the default settings in that hose file.

Once you're done, hold down the control and O keys to save the file, then control and X to exit.

One last step Back at the command line, type sudo killall -HUP mDNSResponder then type return. That will flush your Mac's DNS cache, so it doesn't get confused by any changes you've made to the Hosts file.

1

The question mentioned that a problem website was loading a 3rd party site in an iframe. The extension AdBlock Plus can help with that. You will have to train it using 'Block this element'

1

I understand you are concerned with the case where going on one website brings in cookies from other websites. These unintended cookies are called "third-party cookies", since you are the first party and the website you are displaying is the second.

See the Mozilla article Disable third-party cookies in Firefox to stop some types of tracking by advertisers that explains how to block such cookies.

I prefer not to describe here the method of blocking the cookies, since in case of a change of procedure in the future, my answer will not be updated, but the Mozilla Support article will certainly be updated.

But since it's being demanded :

  • Click the menu button and choose Options
  • Select the Privacy & Security panel and go to the Cookies and Site Data section.
  • In the drop-down menu next to Accept third-party cookies and site data choose Never.
  • Close the about:preferences page. Any changes you've made will automatically be saved.
4
  • OK That makes sense. It was suggested the site was being loaded in an iframe. I've disabled third party cookies for now. I upvoted but will leave this open since now I would like to put a few social networks on a no load list. Sep 28, 2018 at 19:37
  • If you are using Firefox, you might also have a look at the NoScript add-on, although it requires some knowledge.
    – harrymc
    Sep 28, 2018 at 19:40
  • Does NoScript block sites or block cookies? Sep 28, 2018 at 19:44
  • It blocks JavaScript. For me it's a security measure.
    – harrymc
    Sep 28, 2018 at 19:47
1

If you are not only concerend about 3rd party cookies but any type of "3rd party" access you can use the addon uMatrix. It's very flexible much more so than AdBlock but you have to sort of know what you are doing.

I had very specific ideas about what my browser should be allowed to access from other domains (like google analytic etc.). It was a little painstaking to configure what's allowed and what isn't, for (a simple) example for "superuser.com" google-analytics.com is off limits but ajax.googleapies.com is required.

enter image description here

But only to deny certain sites should be fairly easy: just block all access on those domains and allow everything else.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .