Music Exposure Home Page

Blog > Linking To The Apple iTunes Store

Blog post by Graham Needham on 7th December 2015

Things have changed in the world of iTunes Store links and not for the better. Traditional iTunes Store album/single links no longer work properly - if you sell music on the iTunes Store you will most likely be losing sales! Old style iTunes Store links no longer go directly to a single/album/artist page - the links now go to the Apple Music streaming service - if, and only if, that artist's music is available on Apple Music and the user has subscribed to Apple Music, will they see the correct page (and even then it's not guaranteed e.g. pre-orders) - so, in other words, the vast majority of iTunes Store users will not see what you are trying to link to! (Apple has hundreds of millions, possibly even billions of iTunes Store users but only around 20 million are Apple Music subscribers.) I've put together a quick 60 second video demonstrating the problem with a standard iTunes link in a web browser opening the iTunes application of a user that is not subscribed to Apple Music:


So this is what a user sees with an old/normal link e.g. https://itunes.apple.com/gb/album/smoke-mirrors/id1055105317 and this is only if the content is available on the Apple Music streaming service (note that there is no purchasing button so the only people making money here is Apple, the record label/artist isn't making anything and is losing any potential iTunes sale):
Old iTunes link in iTunes application

Worse still, this is what a user sees with an old/normal link e.g. https://itunes.apple.com/gb/album/smoke-mirrors/id1055105317 if the content is NOT available on the Apple Music streaming service (note that the link doesn't even go to an artist page, it just goes to the Apple Music homepage!):
Old iTunes link in iTunes application but not on Apple Music

This is what a user sees with a new/correct type of link (how to get new/correct links is outlined later in this blog post). Note the proper iTunes Store page and the purchasing button - labels and artists make money with this type of link:
New iTunes link in iTunes application opening to the iTunes Store

NOTE: The same thing happens across all devices and operating systems so this problem is equally an issue with all browsers and on OS X, Windows, iTunes, iOS and the iOS Music app!

Background

Apple opened the online iTunes music store on 28th April 2003. Since then artists and labels have been able to sell their music digitally, online to the masses. Since the inception of the iTunes Store there has been a need to provide web links (URLs) to artists, albums, songs and music videos especially if you are the artist in question or record label releasing that music. There are several primary ways to get a basic iTunes link:

  1. iTunes Store - go to the relevant album, song or music video, click on the little down arrow next to the buy button and choose "Copy Link"
  2. iTunes Store - go to the relevant artist, album, song or music video, (right/control) click on the content text e.g. artist name or album title, choose "Copy Link"
  3. Apple Music - go to the relevant artist, album, song or music video, click on the three dots icon (•••) choose Share content type, then "Copy Link"
  4. generate the link using the iTunes Link Maker web site (choose the "Store Country" and 'Media Type' of "Music" (not Apple Music) and search for your content, select it (click on it) in the results and choose the type of link you want e.g. "<> Text Link"
You can then paste the link you have obtained wherever you want e.g. Email, social media, on a web site using a standard "a href" tag. Let's take a look at a typical iTunes link e.g. the standard link to the artist "Kloq":
https://itunes.apple.com/gb/artist/kloq/id218213579
This breaks down as follows:
  • https:// = this tells your computer to open a web browser and go to a web page (https instead of http simply means to try to use a secure/encrypted connection over an unsecure/not encrypted connection)
  • itunes.apple.com = this tells your web browser which web server to go to
  • gb = this is the iTunes store country code (gb = Great Britain - uses the ISO 3166-1 alpha-2 standard)
  • content-type/content-name/idxxx = this is the iTunes content code part which consists of three things in itself:
    • content type i.e. artist, music, or music-video
    • content name
    • content iTunes ID number (idxxx) - songs/single tracks use "id_albumid?i=id_songid" (xxx is the unique ID number for the content)
  • anything that follows the standard link after a question mark "?" tells your browser to do additional things after loading the relevant information e.g. set an affiliate cookie or when the "View in iTunes" button is clicked in the browser to open iTunes and go to a specific section of iTunes / iOS Music app e.g. the iTunes Store or Apple Music (see below). Multiple actions can be joined together on the end of the link with an ampersand character "&".

So what changed in 2015?

This has all worked perfectly since the inception of the original iTunes Store in 2003 but a couple of important things changed in the summer of 2015:

  1. the iTunes Store is now available in hundreds of different countries so there is now a need to geolocate links, clicks and customers
  2. Apple Music - Apple's new music streaming service

The first change, geolocation, is nice and easy to deal with. The web site part of an iTunes link can use a geolocation server for the end user instead of the standard "itunes.apple.com" server so you can replace that with "https://geo.itunes.apple.com". This means the browser is automatically redirected to the user's local country store rather than the default one in the USA. It also means you don't need to post different links for users in different countries - one link to rule them all (obviously the content iTunes ID number must be the same in each country and the product must be available in the user's local iTunes store for the link to work properly).

The second change, Apple Music, has a wider reaching problem for artists and labels alike. If you use a standard iTunes link such as the one obtained from the iTunes Store itself it no longer takes users to your content on the iTunes Store - it will load iTunes / the iOS Music app as usual but then instead of going directly to the content in the link it only opens Apple Music! And if that content is not specifically available on Apple Music, iTunes / the iOS Music app simply goes to the default Apple Music homepage instead and not to your content - this is especially true for pre-order items as it won't even load your Apple Music page! In addition, if the user does not have an Apple Music account iTunes / the iOS Music app may well load the default Apple Music homepage anyway, rather than go to your content. This means a lot of old links no longer work properly and worse still, the standard links obtained via the iTunes Store no longer work properly either.

What can you do?

You can tell iTunes / the iOS Music app to specifically open the iTunes Store and not Apple Music by adding an additional bit of code, "app=itunes", to the end of a standard iTunes link after a "?" question mark i.e. "?app=itunes" (you can also add an & to the end of "?app=itunes" if you have any other additional action codes such as an affiliate link e.g. "&at=11l7jb"). So a standard link using the new geolocation server and explicitly telling iTunes / the iOS Music app to use the iTunes Store now looks like this:

https://geo.itunes.apple.com/gb/artist/kloq/id218213579?app=itunes
…and with an affiliate link:
https://geo.itunes.apple.com/gb/artist/kloq/id218213579?app=itunes&at=11l7jb

I have a web site with iTunes links on it. What should I do?

Replace your old links with the updated links as per the information above. If you use static HTML pages I'm afraid you're going to need to go through all your pages and update any iTunes links manually. If you use a dynamically coded web site see the next question below.

If you need to generate new links use the official iTunes Link Maker web site (choose the "Store Country" and 'Media Type' of "Music" (not Apple Music) and search for the required content, select it (click on it) in the results and choose the type of link you want specifically "iTunes Badge" for the iTunes store (all the others generate a link to Apple Music which you probably don't want) - if you just want the "a href" link or the "iTunes content code" you can easily find it within the generated code.

What if Apple changes the links again in the future?

If you are not running a static web site (HTML only) you can easily program your web site to use dynamic iTunes link variables instead of hardcoded links/URLs (examples below are for PHP but similar programming will work for other environments such as .asp, Lasso, etc). The key is that the iTunes content code part of an iTunes link is unlikely to change. So, you can create separate variables for the four main types of music content and put them once in a header / include file:

$itunes_link_artist = "https://geo.itunes.apple.com/gb/content_code_goes_here?app=itunes"; $itunes_link_album = "https://geo.itunes.apple.com/gb/content_code_goes_here?app=itunes"; $itunes_link_song = "https://geo.itunes.apple.com/gb/content_code_goes_here?app=itunes"; $itunes_link_music_video = "https://geo.itunes.apple.com/gb/content_code_goes_here?app=itunes";

Then on the page at the appropriate part of the HTML code where you are providing an iTunes a href link replace "content_code_goes_here" with the correct content code e.g. for a text link use code similar to this:

<a href="<?php $itunes_content_code = "artist/kloq/id218213579"; echo str_replace("content_code_goes_here", $itunes_content_code, $itunes_link_artist); ?>" target="_blank">Kloq</a> For a graphic† link: <a href="<?php $itunes_content_code = "artist/kloq/id218213579"; echo str_replace("content_code_goes_here", $itunes_content_code, $itunes_link_artist); ?>" target="_blank"><img src="URL_to_your_graphic"/></a> † = Official iTunes badges can be downloaded from Apple

This way if Apple makes changes to the iTunes links you can update your site wide variables once, in the header / include file and as the content code doesn't change the iTunes links will automatically update across your entire site.

Please feel free to pass this information on to other artists and content managers - you can use the Blog Post reference URL/link to this blog post URL provided at the bottom of this page.



Blog post author = Graham Needham
Blog post created on = 7th December 2015
Blog post last revised = 31st August 2017 17:32
Link to this blog post = http://www.musicexposure.com/blog_post.php?29 (how to link to this web site - details)

This blog post is representative of the blog author's individual opinions and as such any opinions that may be expressed here may not necessarily reflect the views of everyone at Music Exposure or the holding company Burning Helix Limited.


See all other blog postings