Blocking instagram ads, sponsored and promoted posts? [iOS] [Adguard]

I am very new to iOS/Apple, and I am trying to dial in my tracker/adblocking setup. I expected it would be more limited compared to Android or Linux but I’m still a bit disappointed (but I’m still learning).

My current blocking setup is:

  • Layer 1 (DNS):
    • Tool: Adguard Premium (DNS filtering)
    • List(s): Hagezi Light
  • Layer 2 (Browser/Safari)
    • Tool:Adguard Premium (Safari ‘advanced’ blocking)
    • List(s): Adguard #reccomended + #annoyances

I’m using Instagram as a Safari webapp. The first reason is that as a webapp tracking will be more strictly confined to within the app/browser, and the second reason is that I assumed Adguard for Safari would be able to block instagram ads and sponsored content in the browser like uBO + Firefox can (on desktop).

I spent most of last night experimenting with different filterlists (for both the DNS level and Browser level blocking) and was not able to get Adguard to block Instagram ads.

My questions are:

  1. Have you found a way to block Instagram ads (including sponsored/promoted posts) on iOS? If so, how?
  2. Is the seeming impossibility of blocking IG ads on iOS/Safari a limitation of Safari, of iOS, or of Adguard Premium?

[Edit: see the next comment for info on what I’ve tested so far]

Update:

Is the seeming impossibility of blocking IG ads on iOS/Safari a limitation of Safari, of iOS, or of Adguard Premium?

I still have access to an Android device so I’ve been using that to help eliminate some of the variables (OS, Browser, Blocker, Blocklists).

What I've tested so far (click to expand)

On iOS (16):

  1. Safari + Adguard = Can’t block ads on IG :x:
  2. Brave = Not blocking ads on IG :x:

On Android (11):

  1. Firefox + uBO = Blocks ads on IG :white_check_mark:
  2. Firefox + Adguard = Blocks ads on IG :white_check_mark:
  3. Brave = Not blocking ads on IG :x:

On Linux (Fedora 38):

  1. Firefox + uBO = Blocks ads on IG :white_check_mark:
  2. Firefox + Adguard = Blocks ads on IG :white_check_mark:
  3. Brave = Not blocking ads on IG :x:
  4. Brave + uBO = Blocks ads on IG :white_check_mark:

On MacOS (Ventura):

  1. Safari + Adguard = Blocks ads on IG :white_check_mark:

Based on this, it appears that Adguard can be ruled out as the cause of the failure to block IG ads. So it must be either the Browser (Safari), the OS (iOS) or misconfiguration on my part.

What about changing your DNS blocklists have you tried changing to a more aggressive blocklist?

This might be useful for seeing how effective your adblocking is:

What about changing your DNS blocklists have you tried changing to a more aggressive blocklist?

I believe I can rule out DNS based blocklists as the cause/solution (theoretically and empirically).

Theoretically because IG ads are in the category of ads that cannot be blocked at the DNS level because the ads themselves are served from the same domain as the user content. So you can’t block one without blocking the other. And empirically because I spent a good portion of last night testing various DNS based blocklists (for general effectiveness, not IG in particular, but none could block IG ads).

The tool you linked to to test adblockers is pretty cool, this is what I was using last night, it is somewhat new to me, and it made testing a lot more straightforward.

Doesn’t look too good then, seems like you might be stuck with ads in Instagram until Apple allows alternative non-WebKit browsers.

All iOS browser pretty much look the same on PrivacyTests.org: open-source tests of web browser privacy seems like the desktop version of Safari has slightly more tracking protection?

You are most likely right, though it may be that there is some solution I am unaware of in either the Safari or Adguard settings. One thing that gives me some hope is that the combination of Macos + Safari + Adguard appears to be able to block instagram ads. I’m new to Apple, so I’ve no idea how different Safari on iOS and Safari on MacOS are from one another.

1 Like

Have you tried logging in to Instagram through Brave? Could be a good test to help rule things out.

1 Like

Brave doesn’t block instagram ads since the ads are made to be indistinguishable from instagram content (which is strange because they have a marker on top that labels that they’re sponsored), even with aggressive blocking on desktop enabled, instagram ads still show up

There are no working instagram frontends I know of after Bibliogram got discontinued, but maybe try Rss so you can still get your feed

As for a way to get rss feeds for instagram accounts, I’m not sure

1 Like

I have (see my second comment for info on what I’ve tested so far). Brave actually doesn’t block IG ads on any of the OSes that I tested (iOS, Android, Linux). This surprised me.

Another thing which surprised me is that Safari+Adguard can block IG ads on MacOS.

What is strange about this is that Brave’s adblocker was “inspired by” uBlock Origin, and uBlock Origin is able to block Instagram sponsored/promoted content. I am trying to find the exact rule in uBO that blocks this content and see what happens if I add it as a custom rule in Brave or Adguard/Safari.

If memory serves, Bibliogram shut down because they were served a cease and desist order and threatened with legal action or something to that effect. I expect that will have a pretty large chilling effect on the creation of any successors.

The discontinuation announcement:
https://bibliogram.art/

From the blog:

  • Instagram is really annoying, and I’ve given enough, and I don’t want to deal with it anymore. Bibliogram will remain mostly broken unless somebody steps up to fix it. The main instance, bibliogram.art, will shut down, unless somebody wants to take it over. If you want to try fixing Bibliogram, you should read through the rest of this post for helpful tips about the current situation.

Thanks for this, I must be misremembering or confusing bibliogram with a different frontend.

[Edit: I was getting confused, I was thinking of Barinsta (another Instagram frontend)]

Vanced was sent a cease and desist and shut down:

Invidious was contacted by google but will “continue until they can’t anymore”

The frontend space was fine for awhile, but now that frontends are so popular and common now, the whole space is very shaky

Also I only ever heard of Barinsta because it shut down

It was Barinsta that I was thinking of, which was an Instagram client for Android

I’ve done more experimenting and as best I can tell, “Cosmetic Filtering” is the capability that is needed to block IG ads. uBO can do it, Adguard can do it but seemingly only on Firefox for Android or Desktop. Brave shields so far does not seem to be using cosmetic filtering and Adguard for iOS doesnt appear to be capable either.

I believe these are the rules that work, as you can see they are more complex than an average blocklist rule (click to expand)
instagram.com#?#div[style="max-height: inherit; max-width: inherit;"]:-abp-has(span:-abp-contains(Paid partnership with ))
instagram.com#?#div[style="max-height: inherit; max-width: inherit; display: none !important;"]:-abp-has(span:-abp-contains(Paid partnership))
instagram.com#?#div[style="max-height: inherit; max-width: inherit; display: none !important;"]:-abp-has(span:-abp-contains(Paid partnership with ))
instagram.com#?#article[role="presentation"] > div[style]:-abp-has(span:-abp-contains(/Anzeige|Gesponsert|Sponsored|Geborg|Sponzorováno|Sponsoreret|Χορηγούμενη|Publicidad|Sponsoroitu|Sponsorisé|Bersponsor|Sponsorizzato|広告|광고|Ditaja|Sponset|Gesponsord|Sponsorowane|Patrocinado|Реклама|Sponsrad|ได้รับการสนับสนุน|May Sponsor|Sponsorlu|赞助内容|贊助|প্রযোজিত|પ્રાયોજિત|स्पॉन्सर्ड|Sponzorirano|ಪ್ರಾಯೋಜಿತ|സ്‌പോൺസർ ചെയ്‌തത്|पुरस्‍कृत|प्रायोजित|ਪ੍ਰਾਯੋਜਿਤ|මුදල් ගෙවා ප්‍රචාරය කරන ලදි|Sponzorované|விளம்பரதாரர்கள்|స్పాన్సర్ చేసింది|Được tài trợ|Спонсорирано|Commandité|Sponsorizat|Спонзорисано/))
instagram.com#?#article[class] > div[class]:-abp-has(span:-abp-contains(/Anzeige|Gesponsert|Sponsored|Geborg|Sponzorováno|Sponsoreret|Χορηγούμενη|Publicidad|Sponsoroitu|Sponsorisé|Bersponsor|Sponsorizzato|広告|광고|Ditaja|Sponset|Gesponsord|Sponsorowane|Patrocinado|Реклама|Sponsrad|ได้รับการสนับสนุน|May Sponsor|Sponsorlu|赞助内容|贊助|প্রযোজিত|પ્રાયોજિત|स्पॉन्सर्ड|Sponzorirano|ಪ್ರಾಯೋಜಿತ|സ്‌പോൺസർ ചെയ്‌തത്|पुरस्‍कृत|प्रायोजित|ਪ੍ਰਾਯੋਜਿਤ|මුදල් ගෙවා ප්‍රචාරය කරන ලදි|Sponzorované|விளம்பரதாரர்கள்|స్పాన్సర్ చేసింది|Được tài trợ|Спонсорирано|Commandité|Sponsorizat|Спонзорисано/))
1 Like

Update (for myself and anyone else who cares),

I am closer to understanding the problem, but what I’ve learned is bad news :frowning: for PWA fans.

I did some further testing and discovered that I could get Adguard to block Instagram ads on Safari/iOS in the browser. But if I click the ‘add to home screen’ button to ‘install’ as a PWA instagram adblocking no longer works.

According to one of the Adguard filter developers, this is because of how iOS/Safari work and out of Adguard’s control. Apparently they handle installed webapps differently than websites, there is a different more limited API, and it is not possible for an Adblocker to do the same things in a Safari webapp that they can do in the browser.

Short conversation with Adguard filter developer (click)

So it sounds like Safari PWAs on iOS are inherently limited–at least with respect to extensions and/or adblocking which is a major bummer because one of the most interesting usecases for PWAs for me was the ability to “install” “apps” that had tracker and ad blocking built in. It sounds likeat least for now and maybe forever this will not be possible.