Bill Lovett

Localizing Links to Amazon.com

Posted on March 29th, 2006

Sometimes I post book reviews on this site. When I do, I include an image of the book in question. The process has never been very efficient, but last night I finally got my act together and upped the automation ante. Now all the review posts are consistent, and they include a link to Amazon.com. There's a new problem though: which Amazon site should I be linking to?

While reading the documentation on Amazon's Web Services, I saw that Amazon's global presence includes sites in France, Germany, Canada, the UK, and Japan. At least, "in" with respect to their domain names: amazon.fr, amazon.de, and so on.

So I'm all like, Finally! A reason to use MaxMind's GeoIP database. For every request of a book review post, look up the user's most likely country of origin and change the Amazon.com link accordingly. People from Japan should see a link to Amazon.jp. Send the French to Amazon.fr.

One of the benefits of writing your own blogging software is that you can implement these kinds of changes relatively easily. And so I did, I think. It's a bit hard to verify since my IP will always give me the U.S. link. Now I just need to figure out what to do with people from all the countries where Amazon doesn't have a presence.

Like the person who stopped by earlier today from Sydney, for example. There's no amazon.au. Ditto for my peeps in Brasilia and Madrid. Certainly the real answer to this problem would be for Amazon to open affiliate sites in every country around the world, (don't forget the existential one, amazon.is). I'll keep my fingers crossed, but in the mean time it seems a bit half-assed to localize for certain countries and not others. That seems to be the only option.

Back to the index of all blog entries