Industry guru Dave Taylor offers tech support on technical and business topics, including iPhone, iPod, Microsoft Windows, Sony PSP, cellphones, online advertising, CSS, Web design, business, Unix, Linux, SEO, Mac OS X, and shell script programming.     


How do I quickly build Amazon affiliate links on my pages?

Dave, I notice that whenever you mention any products on Amazon, your links always go straight to the recommended product (rather than their annoying intermediate landing page where they try to sell you on other products) and neatly tuck your affiliate link in too. So, do tell, what's your secret technique?

Dave's Answer:

If you're already an Amazon affiliate, then you know their affiliate area has a nice "build a link" capability, highlighted on their Build Links to Amazon.com area. If you're not an affiliate, then, for goodness sake, go sign up!

Let's step through an example so you can see how the Amazon Affiliates program works, and then I'll show you how I make links myself. Since it's the holidays, let's do this by considering a game I've always loved, in an edition that my kids would doubtless really enjoy: Disney Monopoly.

To use the Amazon Affiliate "text link" system, I have to navigate to the page in a separate window, then copy and paste the URL of that page into their dialog box, then click "bulid link" to have the code generated. Here's the HTML they give me:

Disney Monopoly

Nice, but that's a long, torturous way to build these links if you just want to pop a few into a Web page or Weblog entry. Instead, here's how I do it...

First off, go to Amazon and find a page that you'd like to link to. Copy the URL by clicking on the address bar in your browser. It'll look something like this:

http://www.amazon.com/gp/product/B00005JG32/ref=cm_lm_fullview_prod_3/102-2173641-6432913?
%5Fencoding=UTF8&v=glance
Generally, you can just slap your affiliate code on the end of any Amazon URL and their system is smart enough to catch it and give you credit for the purchase. But that's really not the best solution. Instead, chop the URL down to immediately after the first sequence of letters and digits. In this case, it's B00005JG32 .

Stick with me. Once you've done this once, you'll see, it's just as easy as using the Amazon system, but much, much faster.

So the URL at this point is:

http://www.amazon.com/exec/obidos/ASIN/B00005JG32/
Now, all you need to do is add your affiliate link. My affiliate link ID is davetaylor, logically enough, so this is the minimalist URL to point to this Monopoly game:
http://www.amazon.com/exec/obidos/ASIN/B00005JG32/davetaylor
Now it's just time to drop this into a hypertext reference. That's done by using an a href="" sequence:
<a href="http://www.amazon.com/exec/obidos/ASIN/B00005JG32/davetaylor">
Disney Monopoly</a>
Perfect! Try clicking this link to see how it works.

Easy enough, isn't it?

It's also easy to include the image from an Amazon product and even make it clickable. Pop over to the product page and simply right click on the product image itself. You'll see a pop-up menu from your browser that includes "View Image", "Open Image In New Window" or something similar. Do that. Now you'll see just the product image itself (click here to see what I mean). If your browser's decent, it'll not only show the image, but the title will include the size of the image (this one's 160x160).

To include the image on your Web page just wrap the image URL in some rudimentary HTML:

<img src="url of the image" alt="product name" />
For bonus points, include height="height" width="width". Here's how that HTML would look for our Monopoly game:
<img src="http://images.amazon.com/images/P/B00005JG32.01._SCMZZZZZZZ_.jpg" 
 alt="Monopoly Deluxe" height="160" width="160" />
Here's the image as it'll show up on the page:

Monopoly Deluxe

Just about done. All that's left is to put the two pieces of HTML together, so that we have a clickable image. That's surprisingly straightforward. Just replace the text in the earlier hypertext reference with the img HTML instead:

<a href="http://www.amazon.com/exec/obidos/ASIN/B00005JG32/davetaylor">
<img src="http://images.amazon.com/images/P/B00005JG32.01._SCMZZZZZZZ_.jpg" 
 alt="Monopoly Deluxe" height="160" width="160" border="0" /></a>
That's all there is to it. To show you it's legit, click on the monopoly board below and watch how the affiliate link is saved as Amazon rewrites the URL to its internal system and shows you the page with that product:

Monopoly Deluxe

Finally, you can use the Amazon affiliate link building system, but I promise, once you start experimenting with this approach, you'll find it's considerably faster and much more flexible. Oh, and the affiliate payout for purchases is exactly the same as if you'd used their tool too.


Updated July, 2006 to reflect changes in Amazon's inventory and to further simplify the affiliate URL link by using the "ASIN" shortcut.

Related HTML, JavaScript and Web Site Programming articles:
✔   How to Create Predefined Google Image Search Links?
Thanks for the Amazon URL [see Creating Amazon Search Links]. That worked beautifully. In fact, I sent you $5.00 for coffee in thanks....
✔   Can I embed a Facebook search box on my blog site?
I've seen your articles about how to add a Twitter or Google search box on a Web page, but I have a tougher...
✔   Can I use CSS for drop shadows on my blog?
I want to give my site a bit of a facelift and add some neat graphical elements. One of which is drop shadows....
✔   How can I embed interactive photo panoramas on my site/blog?
I read through your blog entry about how to take panoramic photos with iOS 6 and an iPhone 5 and got enthused. I've...
✔   How can I create a Twitter search URL shortcut?
I'd like to add a few Twitter search links to my Web site. Is that possible, or does Twitter prohibit this sort of...

Let's stay in touch!
Sign up for my weekly AskDaveTaylor Newsletter and you'll receive even more tech and gadget help right to your inbox, along with exclusive news and industry updates. It's good stuff. I promise!
    Enter your name: and your email addr:  




Categorized: Blogs and Blogging , HTML, JavaScript and Web Site Programming   (Article 3807, Written by )
Tagged: affiliate links, affiliate programs, amazon associates
Previous: Yushchenko poisoned by Dioxin: isn't that found in our meat and poultry?
Next: How do you avoid Information Overload?




Reader Comments To Date: 46

Kirk McElhearn said, on December 14, 2004 2:22 PM:

It's worth noting that this doesn't work with Amazon FR, though it does work with Amazon UK. The FR site wants an ASIN listing. I haven't tried with any others, since I don't have accounts with them.

Juan G. said, on May 6, 2005 2:08 AM:

Other people thinks that kind of link (with "tg/detail/-" instead of "ASIN") does not retain the associate ID:

Amazon Associates beware
http://www.kottke.org/03/02/amazon-associates-beware

But that's from February 2003. Maybe the things are different now, I don't know.

William Hungerford said, on December 23, 2005 7:54 PM:

Try the Amazon Affiliate Link Creator. It is the quickest and easiest way to create affiliate links for your blog and webpages. The software is freeware.

http://executivedatabases.com/amazon.html

William

Lt. D.N. Foss said, on July 18, 2006 10:05 AM:

There seem to be two problems with the instructions on this page.

1) The suggested abbreviated url's don't seem to work.

2) The Monopoly Deluxe example seems incomplete in the instructions because Amazon does not seem to have that image on their server anymore.

dan said, on November 27, 2006 3:44 PM:

I wrote a tool to make it easier for me to generate Amazon Affiliate links in case anyone's interested.

Jazmin said, on January 11, 2007 5:42 PM:

Hi,

Isn't this kind of alteration of Amazon's "Special Link" violate the Amazon Affiliate user agreement?

R.Pettinger said, on March 11, 2007 3:47 PM:

Thanks for this page. I found it very useful.

dan said, on March 19, 2007 1:00 PM:

Ack - I didn't realize the link to the tool I mentioned didn't have a link.

Here it is:

http://dan.hersam.com/tools/amazon.html

Robert said, on August 25, 2007 7:33 PM:

I'm confused, are you saying the links they give you are some how corrupt or it's hard to put the links on your site?

Joseph said, on September 25, 2007 9:24 AM:

Why would't you try Amazon Web services Tracking ID? Associates tools such as Build-a-Link and Amazon Recommends are helpful if you want to build Amazon links quickly and easily. But if you'd like to more deeply integrate their features and content into Amazon Web site, you might want to check out Amazon Web Services.

Zach Coelius said, on October 2, 2007 1:08 PM:

We are just rolling out a new link building tool for Amazon where all you have to do is highlight the text you want to link to amazon and we search their api and automatically create the link for you. Check it out here triggit.com

nordsieck said, on October 7, 2007 3:51 PM:

actually, your URL's are still longer than they have to be.

The shortest form is:

http://amazon.com/o/asin/###ISBN###/

faiz said, on October 17, 2007 8:35 PM:

useful and quick. Thats what i like. The linking process from amazon is really hectic and you showed an easy method.

BobbyW said, on January 7, 2008 3:26 PM:

I'd like to just append my affiliate id to the end of a url like Dave does, but how do you know if it really works?

The code Amazon give you is a pain to generate going through their cumbersome interface. But I'd like to know that Dave's way actually works or that Amazon isn't likely to start rejecting links in that format...

Murphy said, on January 7, 2008 7:19 PM:

Bobby -

If you make a link the way Dave suggests and then open it you can check out the source code. You'll see your associate ID referenced throughout the html which is pretty convincing.

Peter said, on March 14, 2009 5:35 PM:

I am getting the following URL for mobile safari:

http://www.amazon.com/gp/aw/d.html/ref=mp_s_a_1/180-5891994-4397819?a=B001F7AHXM

Adding the affiliate code at the end does not work. Any suggestions?

Dane Cramer said, on May 6, 2009 10:17 PM:

I'm a 6 week newbie, awesome info! I'm definately coming back here again. You guy's sound like you really know your stuff. Now I'm off to become an Amazon and Ebay affiliate, lol.

Bristol Design said, on May 26, 2009 4:39 AM:

I came across this page as I was interested in why the amazon tool (as mentioned in Daves post) inserts a 1px by 1px image in the text link. Surely it serves no purpose?

For example it will generate
Buy This

Thanks for the info tho Dave.

moserw said, on July 12, 2009 10:53 PM:

Very helpful. I was searching for the exact same thing and you've answered it so perfectly. Thanks.

chucky1 said, on November 10, 2009 3:57 PM:

I think they changed the rules on Aug 15.

George Kao said, on January 8, 2010 11:37 PM:

I've made a tutorial video that makes this process even easier:
http://bit.ly/CreateAmazonLinks

There may be a MAJOR error in Dave's post above, in the section about "minimalist links". (I'm grateful for the many awesome blog posts Dave has here, but *this* one may be erroneous.)

Here's the error:

You can't just use the "davetaylor" tag. You also need the "-20" that comes afterwards. (I'm not sure what number Amazon has assigned to Dave, but mine's 20.)

So you need this kind of link...

http://www.amazon.com/exec/obidos/ASIN/B00005JG32/davetaylor-20

Instead of just...

http://www.amazon.com/exec/obidos/ASIN/B00005JG32/davetaylor

Sure, both links will go to the product...but only *one* of the formats above gets successfully tagged with Dave's affiliate account!

You can check this for yourself at the Amazon Associates Link Checker, here:

https://affiliate-program.amazon.com/gp/associates/network/tools/link-checker/main.html

Test both formats above by loading them into the link checker, then scroll down and click Check Link. (You need to test your OWN affiliate links... testing Dave's won't work.)

Again, check out the tutorial video that makes this process even easier and more accurate:
http://bit.ly/CreateAmazonLinks

AndBee said, on March 9, 2010 4:17 AM:

thanks and just followed your instruction and seems amazon have changed something now. i just cliked the get link and then the link shows up..is that ok also?

sberhan said, on June 10, 2010 9:40 PM:

Nice tips for working with Amazon URLs. You might find it easier to manipulate the URL via http://urlparser.com.

Govi said, on August 9, 2010 3:43 AM:

Hey Guys,

I have got the ISBN's for my products. How can I build a link using this with my associates ID?

Any help appreciated.

Thanks

Clinton Brits said, on October 3, 2010 10:37 AM:

This to me seems to be a reasonable way to do affiliate marketing because it gives me complete control of what i promoted and where it goes, how it looks ets but is amazon the only affiliate network that allows you to do this? All the networks i arrive at seem to use paste in scripts that generate the ads and it generates ads which seem like spam to me and frankly i just run my eyes over google ads without even taking notice.

RUTH said, on October 10, 2010 1:41 PM:

No matter what I do, the HTML code appears on my Blogger site as CODE instead of readable text. I am an Amazon.com affiliate and I have read all the instructions - but when I hightlight their HTML code and copy and paste, it's the same disaster. Whatever is the secret? Is there something missing from all the instruction?

James said, on December 5, 2010 5:47 AM:

I normally use this format amazon.com/dp/asin/?tag=tracking-id, this short and easy for me

Atrus said, on January 12, 2011 6:39 AM:

US "-20", Fr "-21 " etc. Thanks for your post~

Thomas said, on January 19, 2011 5:24 PM:

Amazon's tools for creating links have improved quite a bit. There's even a script that you can put on your pages to auto link (with some direction and tuning) to keywords in your text.

Amazon also has some widgets that you can add that are kind of cool that display the products you choose.

The best results that I have found though are from plain old text links and picture links.

Ramesh said, on September 12, 2011 9:20 AM:

I am from India. I want to join Amazon Associates. I want to use Special link in the email body so that the email recipient will purchase the Amazon product by clicking on the link, which goes to Amazon website. Can I earn commission in this way? Pleas advise.

tanaka said, on September 26, 2011 3:32 AM:

Can i automaticly create 1.000.000.000 tracking id ?

Jan said, on November 23, 2011 6:10 AM:

Ramesh, the Amazon Alliliate terms don't allow any Special Links to be sent by email. You'd need a website or blog to earn commission.

Aish said, on January 30, 2012 10:20 AM:

A quick question: How do I let my friends buy from Amazon, no matter what they want to buy, using my affiliate ID?

I have a friend who is a frequent buyer on Amazon and offered to give me a start as an affiliate by buying things on Amazon using my links. The problem is I cannot keep sending her links every time she wants to buy something.

Jonathan said, on February 9, 2012 7:07 AM:

Thanks Dave. That's quite a cool way of setting up the links. I'll give it a try in my next post. It's not only quicker but i think it actually looks better then the blatant flash banners I've been using. It's subtle and easy but I'll have to be carefull not to mess it up.

jude said, on February 11, 2012 7:21 PM:

@Aish - same here! have you found out?

cashjay@ make money online said, on March 17, 2012 7:39 AM:

what is my direct amazon link? to add to my posts?

Jan Goodmaker said, on March 29, 2012 5:18 AM:

Just started with amazon marketing but did not know there were so many formats of affiliate links that can be used. Will be handy and easy to use.

Andy Fillioraan said, on May 7, 2012 9:55 PM:

Its new style of web. good content. Thanks Dave :)

Angela said, on June 7, 2012 10:23 AM:

I followed your instructions for adding my affiliate ID to the end of the first sequence of a product link--it works! Thanks! I'm writing an ebook and want to include my Amazon Associates links to further suggested reading. The link builder on the associates' site was not working at all--kept throwing up errors when I tried to link from a Word doc.

d said, on November 8, 2012 1:32 PM:

FYI: these don't work according to the amazon affiliate link checker that you can use when you log into your account.

Kim said, on November 21, 2012 3:42 AM:

The method did not work for me. Try using /?tag=affiliateid in the end instead. You can verify the link here:

https://affiliate-program.amazon.com/gp/associates/network/tools/link-checker/main.html

yoga said, on February 1, 2013 3:26 AM:

how can i get link from just "amazon todays deal" and then posting in my blog automatically? Thanks before

longza said, on February 28, 2013 6:39 PM:

I get to the end of the first episode of the product to add your affiliate ID followed your instructions - it works! I'm writing an ebook and include a link to my Amazon Associates would like to recommend reading.
http://www.laptopstablets24h.com/

Chris said, on March 17, 2013 7:09 PM:

I have just finished developing a product called Tweet Eye Affiliate. You can put your Amazon id into this software and search various keywords. When you have found products that you like with those keywords you can click Tweet and the software will tweet your selected Amazon products to Twitter Account with your Amazon affiliate ID. The software also has functionality to do scheduled tweets of any Amazon or eBay product with your affiliate ids.

Kat said, on March 19, 2013 2:52 PM:

Thank you, thank you, thank you!!!!

Starbucks coffee cup I do have a lot to say, and questions of my own for that matter, but first I'd like to say thank you, Dave, for all your helpful information by buying you a cup of coffee!

I do have a comment, now that you mention it!











I will never send you any unsolicited email. Ever.






Check This Out Too...

 
Look for Answers
Need Help? Ask Dave Taylor!


Follow Me on Pinterest

Find Me on Google+
ADT on G+
© 2002 - 2013 by Dave Taylor. All Rights Reserved.

Note: This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this web site or on any linked site. Further, please note that by submitting a question or comment you're agreeing to my terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site. My lawyer says "Thanks".
"Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.