Skip to content

Instantly share code, notes, and snippets.

@RobyRew
Last active January 15, 2023 08:54
Show Gist options
  • Save RobyRew/58cf3a46a0015fda3fc716278e705907 to your computer and use it in GitHub Desktop.
Save RobyRew/58cf3a46a0015fda3fc716278e705907 to your computer and use it in GitHub Desktop.
Spotify Methods to Block Ads
Official SubReddit: https://www.reddit.com/r/Spotifyhosts/
FOLLOW DOWN
| |
| |
\ | / \ | /
\|/ \|/
@RobyRew
Copy link
Author

RobyRew commented Oct 14, 2020

Does anyone have copy of Little Snitch 4.4.3?

https://drive.google.com/file/d/1A99Mz51SkKRsVquS9Y643yxu_VLeUaeC/view

@aman-github-account
Copy link

aman-github-account commented Nov 9, 2020

At this point I have just given up. No matter what I put in the hosts file, it just updates, like out of no where. Its impossible to stop it from updating. So now what I do is I have the zip file in my documents, and if I see an ad or the black banner at the bottom when you click on any playlist, ads will be inevitable from that point on. So I just delete Spotify, and add it to my applications AGAIN from the zip file. Easy.

@Angel-M-R
Copy link

In Mac os Big sur, Little Snitch 4.4.3 does not work, some alternative?

@RobyRew
Copy link
Author

RobyRew commented Nov 19, 2020

In Mac os Big sur, Little Snitch 4.4.3 does not work, some alternative?

at the moment any way bro, just to use the 3h trial every time

@MisterMike
Copy link

Not trying to be lame, but why dont you buy Little Snitch? It helps you with a ton of stuff that connects to anywhere and tracks you. Its well worth it. But yes if you came here to get Spotify Prem for free, I might be talking to the wrong people haha

@RobyRew
Copy link
Author

RobyRew commented Jan 14, 2021

Not trying to be lame, but why dont you buy Little Snitch? It helps you with a ton of stuff that connects to anywhere and tracks you. Its well worth it. But yes if you came here to get Spotify Prem for free, I might be talking to the wrong people haha

I bought it 3 days ago using the school discount, really good software

@K3das
Copy link

K3das commented Jan 17, 2021

Woah... Why are you blocking s3? That'll break 1/2 of the internet

@RobyRew
Copy link
Author

RobyRew commented Jan 17, 2021

Woah... Why are you blocking s3? That'll break 1/2 of the internet

oh, sorry, its an old setup, here its the one that i use right now:

image
This works perfect even on Big Sur, I have Little Snitch 5 bought, and works 10/10

@AdrianFiroiu
Copy link

Same with the old 'hosts' file method: This method also heavily depends on your geographical location.

With the config above it doesn't work in EU - Switzerland to be precise. Ads every 3-4 songs (but only 'Premium Upgrade' ads) and black banner.

image

Blocking other domains results in songs not playing OR getting the 'Disconnected' error from the app.

If anyone in EU found a working combination please let us know.

@MisterMike
Copy link

i can confirm this. Haven't found a way to bypass. If I block more, it continues to play for a song or two, then stops. If I leave it that way, it plays a premium upgrade ad every few songs.

@AdrianFiroiu
Copy link

Thanks @MisterMike. Furthermore, one of the main causes for this (I think) is the gew1-accesspoint-* and guc3-accesspoint-* type domains.

Problem with blocking these is that whenever you block one - another one is triggered and added to the list. Blocking the whole 'Spotify' entry and then allowing just 'dealer.spotify.com' breaks the app connection and disconnects it.

Absent a solution here - another option would be to revert to an older Spotify version (1.0.98.78 or earlier) and test it that way too. Just an idea. Problem is I can't find those older versions for Mac anywhere anymore (filehippo, filehorse etc.)

@rublev
Copy link

rublev commented Jan 19, 2021

This is the worst but I also can't justify $10/mo just for music which should be free. Ridiculous.

@RobyRew
Copy link
Author

RobyRew commented Jan 19, 2021

This is the worst but I also can't justify $10/mo just for music which should be free. Ridiculous.

Here is a Little Snitch Backup:
https://drive.google.com/open?id=17vLEuSPQHVvwLjNlBbq-wQkzXasUonXu

(the file its the one with the extension .xpl)

@AdrianFiroiu
Copy link

--- For EU folks ---

  1. In the end - using the latest or 1.1.125 Spotify version won't fully work with Little Snitch. I always get the black ad banner and 'upgrade' ads every 3-4 songs. An interesting note though: I don't get any ads if I select the songs, no matter how many consecutively. So only if I don't trigger 'Next' or 'Previous' through the buttons or keyboard.

  2. The actual working solution for me was to revert to an older version I was able to finally find (1.0.98.78), and available here:
    https://drive.google.com/file/d/1qLCg9IllYjg_SHphB9TVH0TYTwNxkUqK/view?usp=sharing

And then:

  • move it into Applications
  • open it and log in
  • set up Little Snitch like in the screenshot below
  • restart it

image

With this, I have no ads whatsoever (playing, banner, etc.) and all songs and playlists are working fine. (except Radio, as always)

@aman-github-account
Copy link

is there an updated little snitch file for Big Sur? I would buy it if I was using it for more than just Spotify.

@rublev
Copy link

rublev commented Jan 26, 2021

This is the worst but I also can't justify $10/mo just for music which should be free. Ridiculous.

Here is a Little Snitch Backup:
https://drive.google.com/open?id=17vLEuSPQHVvwLjNlBbq-wQkzXasUonXu

(the file its the one with the extension .xpl)

Thanks. Eventually got it working then spotify started playing ads again. Back to youtube mixes.

@alfosno
Copy link

alfosno commented May 13, 2021

hi, i found out 2 new directions to ban, and my list stay like this:

127.0.0.1 media-match.com
127.0.0.1 adclick.g.doublecklick.net
127.0.0.1 www.googleadservices.com
127.0.0.1 pagead2.googlesyndication.com
127.0.0.1 googleads.g.doubleclick.net
127.0.0.1 pubads.g.doubleclick.net
127.0.0.1 securepubads.g.doubleclick.net
127.0.0.1 www.omaze.com
127.0.0.1 omaze.com
127.0.0.1 bounceexchange.com
127.0.0.1 core.insightexpressai.com
127.0.0.1 content.bitsontherun.com
127.0.0.1 s0.2mdn.net
127.0.0.1 v.jwpcdn.com
127.0.0.1 d2gi7ultltnc2u.cloudfront.net
127.0.0.1 cs283.wpc.teliasoneracdn.net
127.0.0.1 cs126.wpc.teliasoneracdn.net
127.0.0.1 u.scdn.co
127.0.0.1 cs126.wpc.edgecastcdn.net
127.0.0.1 pagead46.l.doubleclick.net
127.0.0.1 pagead.l.doubleclick.net
127.0.0.1 video-ad-stats.googlesyndication.com
127.0.0.1 pagead-googlehosted.l.google.com
127.0.0.1 partnerad.l.doubleclick.net
127.0.0.1 prod.spotify.map.fastlylb.net
127.0.0.1 adserver.adtechus.com
127.0.0.1 na.gmtdmp.com
127.0.0.1 anycast.pixel.adsafeprotected.com
127.0.0.1 ads.pubmatic.com
127.0.0.1 idsync-ext.rlcdn.com
127.0.0.1 www.googletagservices.com
127.0.0.1 googlehosted.l.googleusercontent.com
127.0.0.1 d361oi6ppvq2ym.cloudfront.net
127.0.0.1 gads.pubmatic.com
127.0.0.1 ads-west-colo.adsymptotic.com
127.0.0.1 geo3.ggpht.com
127.0.0.1 showads33000.pubmatic.com
127.0.0.1 crashdump.spotify.com
127.0.0.1 adeventtracker.spotify.com
127.0.0.1 log.spotify.com
127.0.0.1 analytics.spotify.com
127.0.0.1 ads-fa.spotify.com
127.0.0.1 audio-ec.spotify.com
127.0.0.1 sto3.spotify.com
127.0.0.1 audio2.spotify.com
127.0.0.1 http://audio2.spotify.com
127.0.0.1 www.audio2.spotify.com
127.0.0.1 desktop.spotify.com
127.0.0.1 heads-ec.spotify.com
127.0.0.1 open.spotify.com
127.0.0.1 www.spotify.facebook-ads.adtz.com
127.0.0.1 www.spotify.pinterest.adtz.com
127.0.0.1 play.google.com
127.0.0.1 mad41s13-in-f5.1e100.net

The only mod i have done to ban ads is modifying my hosts file. Im using rn duckduckgo to navigate so i didnt know if redirecting play.google.com to loopback ip causes any problem.

@El-Wumbus
Copy link

Is it possible to use pihole or something similar instead of a firewall?

@RobyRew
Copy link
Author

RobyRew commented Jun 28, 2021

Is it possible to use pihole or something similar instead of a firewall?

No, because spotify use 2 subaplications for music, and both use sp.client… host but you need to block that host only for 1 app

@antoniocosta
Copy link

Here's what seems to be working consistently for me (Mac) for a Spotify Ad-free experience ...

  1. To use on the browser through https://open.spotify.com, just install https://ublockorigin.com.
  2. To use macOS app, install v1.1.9.393 available here: https://spotify.en.uptodown.com/mac/versions (higher versions will have parts not loading or will not load anything at all). Then in LittleSnitch or Lulu (free and the one I use: https://objective-see.com/products/lulu.html) create a rule to BLOCK ALL connections for 'Spotify Helper' and another to ALLOW ALL connections for Spotify app itself.

Everything should work with no audio or visual ads. Let me know if you try.

@cmcgheit
Copy link

cmcgheit commented Dec 31, 2022

@antoniocosta

Here's what seems to be working consistently for me (Mac) for a Spotify Ad-free experience ...

1. To use on the browser through https://open.spotify.com, just install https://ublockorigin.com.

2. To use macOS app, install v1.1.9.393 available here: https://spotify.en.uptodown.com/mac/versions (higher versions will have parts not loading or will not load anything at all). Then in LittleSnitch or Lulu (free and the one I use: https://objective-see.com/products/lulu.html) create a rule to BLOCK ALL connections for 'Spotify Helper' and another to ALLOW ALL connections for Spotify app itself.

Everything should work with no audio or visual ads. Let me know if you try.

Just FYI, there is no version v.1.1.9.393 listed on that spotify older versions site, only 1.1.93.896. I used the 1.1.93.896 version for about 3 songs and it cut off. I had Spotify Helper blocked. The music appears to play, but no sound. If anyone has that version in dmg that would be very appreciated!

@antoniocosta
Copy link

@cmcgheit
That is not the version I mentioned. Yes there IS a version 1.1.9.393. Mind the dots! I did NOT write 1.1.93.93 but 1.1.9.393). It is this one:
https://spotify.en.uptodown.com/mac/download/2022323
Keep in mind it's an old version... but it works. Anything newer than that I could NOT get to work reliably.

@cmcgheit
Copy link

@cmcgheit That is not the version I mentioned. Yes there IS a version 1.1.9.393. Mind the dots! I did NOT write 1.1.93.93 but 1.1.9.393). It is this one: https://spotify.en.uptodown.com/mac/download/2022323 Keep in mind it's an old version... but it works. Anything newer than that I could NOT get to work reliably.

Thanks for replying. I will try it and comment here with any issues. Right now an older spotify web version is working in the browser for me with no ads (ublock)

@antoniocosta
Copy link

NP. Yes, https://open.spotify.com should indeed just work with https://ublockorigin.com installed.
Let me know if you end up trying the macOS app mentioned. Old but works consistently. At least here.

@EmileDiaz
Copy link

EmileDiaz commented Jan 13, 2023 via email

@mapper14
Copy link

mapper14 commented Jan 13, 2023 via email

@RobyRew
Copy link
Author

RobyRew commented Jan 15, 2023

@everyone @ALL
I want to inform everyone that hosts method is now obsolete, is now replaced by most secure and safe xpui.spa modification.
SpotX Org is responsible of modifying it and remove all audio/visual/text ads from Windows/macOS/Linux

SpotX is OpenSource on Github, safe and free for everyone.
https://github.com/SpotX-CLI

Im mod on their Discord server, so if you have any question or need help:
https://discord.gg/Pj5tHTTX

Cheers 😉

older host modifications should be removed in order for SpotX to properly work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment