Automatically Create and Cloak Amazon Affiliate Links in WordPress

2009 December 29
by MK

I have written an article earlier on how to generally cloak and organize affiliate links in WordPress. But in this article I will show you how to setup your WordPress system so that you can easily create and cloak Amazon affiliate links on the fly.

The end results will be something like this. To link to an Amazon product, you would simply put

http://yourdomainname.com/amazon/[ASIN]

And this unique link of yours would forward to Amazon’s product and credit you for any sales. As you should’ve guessed, to link to a different product in Amazon’s catalog, you just change the ASIN number in the link above.

This should make it very convenient for you not only to link to Amazon, but also cloak your links effectively.

So, let me show you how to set this up…

First, you need to install the plugin Redirection. Through this plugin, you can setup automatic URL redirects.

Now, in your WordPress admin area, go to “Tools” and then “Redirection”.

You’ll see a section with the heading Add new redirection. Enter the following values in the form below it:

  • In Source URL, enter /amazon/([^/]*)
  • In Target URL, enter http://www.amazon.com/dp/$1/[Your Amazon Associate ID]
  • Make sure that you check the box that says Regular Expression
  • Click save, and you’re done!

Now, your blog will automatically direct visitors to Amazon products. All you have to do is supply the ASIN number like in the example above.

If you want more details or if you want to know how to do the same for your ClickBank links, check out my earlier article.

If you have any questions or if anything isn’t clear, feel free to ask in the comments.

I may create a WordPress plugin to make this even easier. Stay tuned for that.

Do any of these posts interest you, too?

  1. Best Way to Organize and Cloak Affiliate Links in WordPress
  2. Turn Keywords into Links with Word 2 Cash
  3. Squeezing the SEO Juice Out of Your Affiliates
  4. Website Idea: Collect Product Design Philosophies and Stories
5 Responses leave one →
  1. February 22, 2010

    thank you for your plugin. this is just what i need. but i have a question regarding your amazon syntax. you mentioned:
    http://yourdomainname.com/amazon/ASIN
    do we have to put ASIN inside [ ]

    also in target url:
    http://www.amazon.com/dp/$1/Your Amazon Associate ID]
    do we have to put the Amazon Associated ID inside [ ]

  2. MK permalink*
    February 23, 2010

    Oh, I see how that’s confusing. Thanks for bringing my attention to it.

    For `http://yourdomainname.com/amazon/[ASIN]` and `http://www.amazon.com/dp/$1/[Your Amazon Associate ID]`, the brackets are to be removed.

    However, these brackets `/amazon/([^/]*)` should be kept!

  3. March 15, 2010

    This is the perfect solution for me!

    I’ve been looking for a plug-in and instructions just like this – thank you : ).

  4. June 18, 2010

    Ok, actually I’m confused.

    I believe I set everything up according to your directions.

    The link works but my affiliate id is being displayed at the end of the url.

    Am I missing something?

    Thank You!

  5. MK permalink*
    June 21, 2010

    Jon, Yes, your Amazon affiliate ID will be displayed at the end of the URL. In fact, Amazon utilizes a few different formats for their affiliate links, and all of them show the ID of the affiliate. So, there’s no way around that.

Do you have a question, suggestion, or comment? Tell me!

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS