Saturday, August 5, 2017

Block Ads Spotify Desktop

Support HighTek:

[ Intro ]

Today I will be teaching you how to easily block the servers hosting Spotify ads on your machine. This will allow you to listen all day long on a free account without hearing a single ad.  This trick is very simple, legal and works great.  Spotify may catch on and find some way to stop this from working but, as of today (08/05/2017) it works swimmingly.

[ Blocking Ad Server ]

In order to remove those pesky ads, all we need to do is setup out hosts file to override the DNS for Spotify's ad servers and redirect that traffic to our local machine.  When the traffic hits out local machine the call will fail and the ad will be skipped.  Follow the steps below to add the entries needed.

  • Open your hosts file using your favorite text editor.  If you are using windows this life is located at "c:\Windows\System32\Drivers\etc\hosts".  If you are using Linux or Mac it is located at "/etc/hosts"
  • Add the following lines to the bottom of your hosts file:

# Block Spotify Ads

  • Save your hosts file and restart your desktop spotify client
You should now be able to listen to all the music you want without every hearing another advertisment.

[ Why This Works ]

To understand how this works we first need to understand the role DNS plays in our operating system.  When we are communicating with other services on the web everything is referenced by IP address.  For instance, when I tell my browser to go to, it has to know where to find  This is where DNS comes into play.  DNS short for Domain Name Servers is a service that translates human readable, easy to remember domain names into IP addresses that other machines can communicate with.  Whenever you add an entry to your local hosts file you are overriding the DNS entry locally for whatever domain you enter.  For instance, if I add the line " test.local" to my hosts file, whenever i type "test.local/" into my browser, it will see the entry in my hosts file and use the IP rather than reaching out to a DNS server to try and resolve that address.  Where this comes into play for us is overriding Spotify ad servers.  When we add an entry for each server that hosts ads for Spotify and points them to our local machine, we are ensuring that whenever Spotify reaches out for an add it hits our local machine instead of the real ad server and gets an error. WhenSpotifyy detects this error it stops trying to attempt to run the ad and the ad is skipped.

[ Wrap Up ]

Hopefully after reading this you have a better understanding of how DNS works, how to override it and how to never have to listen to another spotify ad again.  As always I love feedback so leave a comment down below if you have anything you would like to add.