Amazon Associate OneLink

Amazon begin redirecting affiliate links to nearest regional Amazon website

Amazon, the behemoth online “everything” retailer, has virtual stores in many of the most populous and prosperous countries around the world. Many of these regional Amazon websites offer an affiliate program where Amazon associates can get a cut of the sale by sharing product links. Up until now, these links have only worked for the regional store it was generated for.

Amazon have introduced a system for that will redirect affiliate links to the Amazon regional website that is nearest for each user. I took a peek at how it all works.

Disclaimer: This website is an Amazon Associate partner. This is an informative article about technical details about said partner program.

Amazon Associate OneLink is the Amazon Associate program’s new feature where associates can link their Amazon Associate program accounts in the United States, United Kingdom, and Canada together. After an associate have linked their different regional accounts together, they can then install a JavaScript on their websites that will take care of redirecting users to the correct regional Amazon website with the correct sales tracking code for that region.

Prior to the introduction of OneLink, Amazon Associates would either have to come up with their own geo-targeting solution or license one of a handful of existing geographically aware redirect services specializing in Amazon affiliate links.

OneLink is a simple and fast way for Amazon associate partners to unlock affiliate revenue from users in markets they normally don’t reach. In my opinion, the feature is over a decade overdue but still very welcome.


The suggested deployment method on the Amazon Associate Central website is to include a JavaScript that goes through every link to detect Amazon links — including in banners and some Amazon widgets — to replace them with a special redirect link. The script will update existing Amazon links without the need for website owners to update existing links.

However, that JavaScript is quite inefficient. It does a lot of unnessecary operations, and slowly works its way over every link on a page to find any Amazon Associate links. It also adds 22,3 KiB (7,2 KiB compressed download) to the size of each page load where it’s included. I thought I’d see if the script was really necessary.

The script boils down to a simple redirect service that only works for Amazon Associates who’ve linked their regional Amazon Associate accounts beforehand. The redirect service detects your Amazon Associate “tag” in a link, figures out where the user is located using an IP address based geolocation lookup, and then replaces the associate tracking tag with the appropriate linked tag for the region, before the user is redirected to their local Amazon website.

Here is an example link that will be redirected to either Amazon.ca for users in Canada, Amazon.co.uk for users in the United Kingdom, or to Amazon.com for users in the United States or elsewhere:

https://assoc-redirect.amazon.com/g/r/https://www.amazon.com/dp/0316219282?tag=ctrltxt-20

The anatomy of this link is quite simple:

Redirect service + Amazon link + "?tag=" + associate ID
https://assoc-redirect.amazon.com/g/r/<amazon-link>?tag=<associate-id>

The above scheme doesn’t only work with Amazon product pages. It also works with other Amazon page links including search results, categories, mini-stores, and other pages you can link to as an Amazon associate. It also works with Amazon’s amzn.to shortlinks as long as they contain an Amazon associate ID tag.

You can use these direct-to-redirect links instead of the Amazon issued JavaScript replacement. This assumes you’ve got some control of your Amazon links and can update all of them quickly. If you need to update a lot of existing links and use Amazon Associate widgets or banners, you may want to use their JavaScript instead.

If you regenerate banners and widget code on the Amazon Associate Central website, it would seem you don’t need to include a separate piece of JavaScript to use OneLink. You still need the separate script (or the direct-to-redirect links) if you want to use OneLink for your plain affiliate links.


OneLink is currently only available for the the Amazon Associate programs in Canada, United Kingdom, and United States. These are Amazon’s largest English language markets. Although not stated explicitly by Amazon, I believe OneLink debut in these markets because the online retailer found it easiest to match products across their international catalogs when the stores at least speak the same language. Associates can choose between only allowing “direct matches” where product links must link to an exact copy of the product, or “close matches” where a very similar product or search results may be displayed in stead. The latter feature is the default, and I believe it’s a trick that easier to pull off technically when the product catalogs are all in the same language.