Automatically Create and Cloak Amazon Affiliate Links in WordPress

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

10 thoughts on “Automatically Create and Cloak Amazon Affiliate Links in WordPress

    • 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!

  1. 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!

    • 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.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>