Edit Spotify Hosts File Mac
This is the default location of hosts file in Mac OS X: /private/etc/hosts. And, here is the way to edit the file. Open terminal and type this command: sudo nano /private/etc/hosts. And it will ask your system password once you enter the password, you will see a screen like this. Hosts file is located in the file path “/private/etc/hosts” in mac. You should have an administrator privileges in order to edit the hosts file. Press “Command + Space” buttons in the keyboard to open “Spotlight Search”. Enter “Terminal” and double click on the “Terminal” app appearing as a top hit.
Method 2: Block Ads on Spotify with AudFree Software
Instead of upgrading to premium plan on Spotify, another way is to download Spotify music and playlists as local files so that there is no way for Spotify advertisement. When it comes to downloading Spotify tracks to local files on computer, free users need to look for a professional third-party Spotify downloading tool.
Here, we can meet AudFree Spotify Playlist Downloader, which is not only a Spotify music downloader and converter but also a Spotify ad blocker. It is capable of downloading songs and tracks from Spotify for offline playback and converting them to MP3, FLAC, WAV, AAC, M4A and M4B while removing ads and preserving high-quality local audio files, even if you are using a free Spotify account.
AudFree Spotify Playlist Downloader
- Download Spotify songs and playlists for offline playback
- Convert Spotify music to MP3, AAC, FLAC, M4A, WAV, etc.
- Block ads on Spotify while removing DRM protection
- Work at 5X faster speed, edit music quality and parameters
Download Ad-free Spotify Music with AudFree
Step 1. Launch AudFree program on your computer with Spotify opened. You can drag and drop tracks from Spotify the main interface or copy and paste the URL of Spotify files to the search box of AudFree.
Step 2. To get high output audio quality, you’d better to open setting window by clicking Preference -> Convert option, in which you can customize bit rate as 320 kbps. Also, you can set output format as you need.

Step 3. Now, you just need to hit on the ‘Convert’ button, and AudFree software will start to download Spotify files to destination folder blocking the ads. After conversion, you can listen to Spotify songs on all devices without ads.
Note: If you are using AudFree Spotify Playlist Downloader for Windows to skip ads, you’d better to login the 30-day free trial premium account. And then it will download ad-free Spotify playlists to MP3 or other common audio files successfully.
When you encounter an iTunes error like 3194, network failures, or connectivity issues, it is recommended to edit the hosts file. If you have updated the file many times, the original version is gone. Of course, you would have ideally created a backup copy of the original, but in the event that you didn’t, here’s how to reset the hosts file to default in macOS and Windows.
What is the Hosts File?
The simplest explanation is that it is a text file used by your computer to map a connection between an IP address and domain names. It can be edited to test certain network aspects or to troubleshoot connectivity issues. Of course, you should keep a backup of it before editing. But in case you do not, you can still recover the original version as explained below.
How to Reset the Hosts File Back to Default in macOS
On a Mac, the hosts file mostly contains nothing more than a couple of lines of active code. The rest of the stuff is just commented out (description of the hosts file itself).
To reset, we are going to open the hosts file in a text editor, replace the entire file with the default text and save it. That’s it.
- From the Finder, navigate to Go → Go to Folder.
- Type this in the Go to Folder window:
/private/etc/hosts
- From the finder window, click and drag the hosts file to the desktop. (We are doing this because we can’t open directly and edit it.)
- Double-click the hosts file (on the desktop), and it will open in TextEdit (or any default text editor on your Mac).
- Erase everything in it by pressing Command + A to select all and then press the delete key.
- Copy the following piece of text and paste it into the hosts file.
- Save this file by clicking on the red close button. Or, click on File from the top menu bar and then select Save.
- Open the Go to Folder window and open /private/etc/hosts again.
- Step #9. Drag the hosts file from the desktop back to the /private/etc/ folder.
- You will be asked about the existing hosts file. Choose Replace and authenticate with the admin password when asked for it.
- Restart the Mac to get things rolling again.
Block Spotify Ads Hosts File
How to Restore the Hosts File Back to Default in Windows
- Open Notepad on your PC
- Go to this page and copy the text of the hosts file for your OS version. Different hosts file contents exist for different Windows versions (although they vary slightly)
- Once you’ve pasted the text into Notepad, save the file as “hosts” – include the quotes. (this is because you don’t want to save the file as a .txt file). Save it on the desktop so that you can easily access it in the next few steps
- Now, open this location:
%WinDir%System32DriversEtc
You can do this by opening Run and pasting the location here - Once the folder opens, drag and drop the hosts file from the desktop into the folder. You will be prompted to replace the file and then prompted for the admin password
With this huge update to the hosts file, you might want to restart your computer.
Mac Os X Host File
The hosts file is usually used just to map web addresses to specific IP addresses and to block websites (by re-directing/mapping them to invalid/incorrect IPs).
Signing off…
This is how you can reset hosts file to default. Once you change it to default, it may resolve some connectivity problems that you have with your computer.
You may like to check:
I have been an Apple user for over seven years now. At iGeeksBlog, I love creating how-tos and troubleshooting guides that help people do more with their iPhone, iPad, Mac, AirPods, and Apple Watch. In my free time, I like to watch stand up comedy videos, tech documentaries, news debates, and political speeches.
- https://www.igeeksblog.com/author/ankur/How to Turn ON or OFF Facebook Nearby Friends on iPhone
- https://www.igeeksblog.com/author/ankur/
- https://www.igeeksblog.com/author/ankur/How to Turn off Unread Mail Count in Mail App on iPhone
- https://www.igeeksblog.com/author/ankur/How to Get Final Cut Pro X and Logic Pro X Free for 90 Days