Making iTunes Subscription Easy

I’ve got two podcasts, one for model photography and the other for EMTs. They are both in iTunes, but it can be something of a pain to find them. Sure a user can search for them by name and they show up, but you’d really like them to be able to just type something into a browser and be taken straight to the iTunes subscribe page.

Plus in a podcast you need to say the URL and iTunes URLs are complicated. Too complicated to say and expect people to type it. Plus they often aren’t in front of a computer when they listen, so they need to be able to remember the URL to subscribe.

So what I do is tell them to “Enter www.emsnewbie.com/iTunes into any browser”. Which is easy to remember, easy to type, and gives me the power to change things in the future if I have to.

To do this I use an Redirect command in a .htaccess file. Most Unix based webservers allow these files and you can do a lot with one. But we’ll focus on just doing the iTunes redirect.

At the root of the directory on your web server you need to have a file named .htaccess. It may already exsist, especially if you are using blogging software like WordPress.

Since the file name begins with a period, it is normally invisible in Unix and may not be displayed in your FTP client. Tell your client to show invisible files to look for it.

Once you find the file, open it. Or create a new empty text file and name it .htaccess.

You will need to enter the following in the file.


<IfModule mod_rewrite.c>
RewriteEngine On
Redirect 301 /itunes http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=318136316
Redirect 301 /iTunes http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=318136316
</IfModule>

The key lines are the Redirect 301 lines. These tell the server to tell the browser to go somewhere else when a URL ending with iTunes comes in. Also notice that I have two lines because I found ModRewrite was case sensitive. There may be a way to do it so it isn’t but I don’t know it, so I just made two lines. Sometimes people remember the capital T and sometimes they don’t.

Remember I said the file may already exists because you are using WordPress? Well just follow the directions in the .htaccess WP created and don’t put your lines in the middle of theirs.

Should iTunes change the way they do their links in the future, I can change the URL here and nothing has to change anywhere else. Heck I use the /iTunes URL for links on the page, like the Subscribe in iTunes buttons.

This makes it much easier to tell people where to go to subscribe with iTunes. You could adapt this to a lot of different uses, but this will get you started.