Skip to content

Instantly share code, notes, and snippets.

@pinksynth
Last active August 10, 2021 15:21
Show Gist options
  • Save pinksynth/19a547e83e51b6483146b6a937a3b63a to your computer and use it in GitHub Desktop.
Save pinksynth/19a547e83e51b6483146b6a937a3b63a to your computer and use it in GitHub Desktop.
Block all album artwork in Apple Music / iTunes Store (using /etc/hosts)

Block all album artwork in Apple Music / iTunes Store (using /etc/hosts)

Apple Music has some album artwork that may not be suitable for children or sensitive users. If you want to block all album artwork, use the following steps.

  1. Open the "Terminal" app (or a terminal emulator of your choice).
  2. Paste in the following command to update your /etc/hosts file to map Apple's album artwork traffic to 127.0.0.1. Once pasted in, press "Enter" to run the command. You will be asked for your computer password.
sudo -- sh -c -e "echo '# Hide Apple Music Images\n127.0.0.1    is1-ssl.mzstatic.com\n127.0.0.1    is2-ssl.mzstatic.com\n127.0.0.1    is3-ssl.mzstatic.com\n127.0.0.1    is4-ssl.mzstatic.com\n127.0.0.1    is5-ssl.mzstatic.com' >> /etc/hosts"
  1. Paste in the following command to refresh your DNS cache, and then press "Enter" to run the command.
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Note that this blocks specific servers that Apple uses to store content as of writing, but this may change over time.

# ...keep existing /etc/hosts stuff above...
# Hide Apple Music Images
127.0.0.1 is1-ssl.mzstatic.com
127.0.0.1 is2-ssl.mzstatic.com
127.0.0.1 is3-ssl.mzstatic.com
127.0.0.1 is4-ssl.mzstatic.com
127.0.0.1 is5-ssl.mzstatic.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment