I was able to block spotify ads by adding the following:
# — Spotify Ad Block
0.0.0.0 media-match.com
0.0.0.0 adclick.g.doublecklick.net
0.0.0.0 googleads.g.doubleclick.net
0.0.0.0 pagead2.googlesyndication.com
0.0.0.0 desktop.spotify.com
0.0.0.0 pubads.g.doubleclick.net
0.0.0.0 audio2.spotify.com
# —
0.0.0.0 crashdump.spotify.com
0.0.0.0 adeventtracker.spotify.com
0.0.0.0 log.spotify.com
0.0.0.0 analytics.spotify.com
0.0.0.0 ads-fa.spotify.com
0.0.0.0 audio-ec.spotify.com
0.0.0.0 heads-ec.spotify.com
0.0.0.0 prod.spotify.map.fastlylb.net
0.0.0.0 sto3.spotify.com
0.0.0.0 spclient.wg.spotify.com
0.0.0.0 upgrade.spotify.com
0.0.0.0 adclick.g.doublecklick.net
0.0.0.0 adeventtracker.spotify.com
0.0.0.0 ads-fa.spotify.com
0.0.0.0 analytics.spotify.com
0.0.0.0 audio2.spotify.com
0.0.0.0 b.scorecardresearch.com
0.0.0.0 bounceexchange.com
0.0.0.0 bs.serving-sys.com
0.0.0.0 content.bitsontherun.com
0.0.0.0 core.insightexpressai.com
0.0.0.0 crashdump.spotify.com
0.0.0.0 d2gi7ultltnc2u.cloudfront.net
0.0.0.0 d3rt1990lpmkn.cloudfront.net
0.0.0.0 desktop.spotify.com
0.0.0.0 doubleclick.net
0.0.0.0 ds.serving-sys.com
0.0.0.0 googleadservices.com
0.0.0.0 googleads.g.doubleclick.net
0.0.0.0 gtssl2-ocsp.geotrust.com
0.0.0.0 js.moatads.com
0.0.0.0 log.spotify.com
0.0.0.0 media-match.com
0.0.0.0 omaze.com
0.0.0.0 open.spotify.com
0.0.0.0 pagead46.l.doubleclick.net
0.0.0.0 pagead2.googlesyndication.com
0.0.0.0 partner.googleadservices.com
0.0.0.0 pubads.g.doubleclick.net
0.0.0.0 redirector.gvt1.com
0.0.0.0 s0.2mdn.net
0.0.0.0 securepubads.g.doubleclick.net
0.0.0.0 spclient.wg.spotify.com
0.0.0.0 tpc.googlesyndication.com
0.0.0.0 v.jwpcdn.com
0.0.0.0 video-ad-stats.googlesyndication.com
0.0.0.0 weblb-wg.gslb.spotify.com
0.0.0.0 www.googleadservices.com
0.0.0.0 www.googletagservices.com
# — Spotify Ads Block End
Can you please add this section to the hosts file?
Hello! Thank you for opening your first issue in this repo. It’s people like you who make these host files better!
@AddaxSoft from what i can remember there was a Spotify lists here which was removed due to too many complains/false positives.I don't think that your request will be approved.
Hi @AddaxSoft yeah, we’ve learned the hard way about Spotify.
Think about it:
I’m willing to entertain adding a specialized curated list, with all that entails, but I’m not ready to be the curator of this.
the list I provided above was tested on Win client + iOS app. No issue no ads.
as for the web interface I think we have to remove 0.0.0.0 open.spotify.com for that.
@AddaxSoft the issue is, we've seen this movie before: add Spotify ad domains that somebody thinks is ok, then we spend several days responding to edge cases until, finally, we take it down. It's just not worth it.
I'm testing and so far everything is ok.
Ok a way around this is to keep the normal hosts from this repo, and append this one link-here to the hosts
redirector.gvt1.com is used for a bunch of legitimate services. Please remove it from the list. I have no doubt that it could be used for ads, but its also used for things people want.
Blocking it has caused issues before https://github.com/StevenBlack/hosts/issues/506#issuecomment-366889870
I removed domains that are already in the list. I also added some comments on a couple of them
# — Spotify Ad Block
0.0.0.0 desktop.spotify.com # seems like a bold block
0.0.0.0 audio2.spotify.com
0.0.0.0 crashdump.spotify.com
0.0.0.0 log.spotify.com
0.0.0.0 analytics.spotify.com
0.0.0.0 ads-fa.spotify.com
0.0.0.0 audio-ec.spotify.com
0.0.0.0 heads-ec.spotify.com
0.0.0.0 prod.spotify.map.fastlylb.net
0.0.0.0 sto3.spotify.com
0.0.0.0 spclient.wg.spotify.com # this is in the list but commented out for affecting mobile app
0.0.0.0 upgrade.spotify.com # is this going to block updates?
0.0.0.0 content.bitsontherun.com
0.0.0.0 d2gi7ultltnc2u.cloudfront.net
0.0.0.0 d3rt1990lpmkn.cloudfront.net
0.0.0.0 gtssl2-ocsp.geotrust.com
0.0.0.0 omaze.com
# 0.0.0.0 open.spotify.com # breaks web mode
0.0.0.0 v.jwpcdn.com
0.0.0.0 weblb-wg.gslb.spotify.com
# — Spotify Ads Block End
@lightswitch05 yeah, desktop.spotify.com seems indeed like a bold block.
Will you accept to curate this for us?
No, I personally don't think its possible to block them without breaking the app. I verified that spclient.wg.spotify.com is required for the android app to work. As soon as I unblocked it the app started working, but I also have ads. There are a bunch of other domains that aren't in the list like audio-ak.spotify.com.edgesuite.net - but I don't have the time to figure out which are ad related and which are service related.
If I ever saw analytics.spotify.com, ads-fa.spotify.com, or log.spotify.com come across my network I would be happy to add them to my list. But I've never seen them, so I doubt if they are still used. I think the list linked by @AddaxSoft is probably people's best bet if they want this feature, but isn't something the average person could use without some major whitelist tuning since it also blocks breaking sites like redirector.gvt1.com
Sometimes I use Spotify web mode so the open.spotify.com needs to be deleted.
I have a playing subscription and a few non-premium users and I have experienced some problems when using the lists I find left and right. I copied this one (minus the lines known to break stuff) in a gist to feed to my pihole installation, to check:
I have access to the Linux and Android clients (my main use), but also MacOS, Windows and iOS.
https://gist.github.com/nxadm/10e6a8ebb86f506e5d8b188696dcede1
Check here: https://gist.github.com/teomaragakis/cb187d880c9a3ca2c8a2
@mrdc What's that?
Please add more info
blocking spclient.wg.spotify.com blocks some songs too on desktop ☹
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 daysif no further activity occurs. Thank you for your contributions.
Closing.
Most helpful comment
blocking spclient.wg.spotify.com blocks some songs too on desktop ☹