icon-dark icon-light
Cover image for Block ads on Spotify App

Block ads on Spotify App

Everyone loves spotify, but are tired of it’s ads that keep coming between songs. Here is way to block ads through your host file be it Windows or Mac.

Host Content:

# — Spotify Ad Block
127.0.0.1 media-match.com
127.0.0.1 adclick.g.doublecklick.net
127.0.0.1 googleads.g.doubleclick.net
127.0.0.1 http://www.googleadservices.com
127.0.0.1 pagead2.googlesyndication.com
127.0.0.1 desktop.spotify.com
127.0.0.1 pubads.g.doubleclick.net
127.0.0.1 audio2.spotify.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 heads-ec.spotify.com
127.0.0.1 prod.spotify.map.fastlylb.net
127.0.0.1 sto3.spotify.com
127.0.0.1 spclient.wg.spotify.com
127.0.0.1 upgrade.spotify.com
# — Spotify Ads Block End

Add the above contents in your host file.

In Windows

Go to C:\Windows\System32\drivers\etc. Open the hosts file as administrator and add the above contents to it. (You could open notepad/Sublime/Atom as administrator and browse to open the hosts file.)*

Note:
Incase the newly added mappings are not working try restarting Windows to take effect

In Mac

To find the hosts file, open Finder and, in Finder’s menu bar, select Go > Go to Folder. In the box, type the following location and press Return.

/private/etc/hosts

To open it, simply double-click and it will display the file’s contents in TextEdit (or the text editor of your choice). Add the host content in it and save.

In most cases, the new mapping should work immediately, but if you’re not seeing the correct behavior, you may need to flush your DNS cache. For OS X Lion and OS X Mountain Lion, open Terminal and use the following command. Note that you’ll need to enter your admin password to execute it:

sudo killall -HUP mDNSResponder

For OS X Mavericks +, use this command instead:

dscacheutil -flushcache; sudo killall -HUP mDNSResponder

You could also launchTerminal, type the following command, and press Return. As with allsudocommands, you’ll need to also enter your admin password to execute it:

sudo nano /private/etc/hosts

When you’re done making changes, press Control+X to exit the editor, Y to save, and Return to overwrite the existing hosts file. As mentioned earlier, make sure to flush your DNS cache if you notice that your new mappings aren’t working properly.

Loading...