How To Hide Affiliate Links - Link Cloaking

Hello everybody and welcome back to JW's PC Tips once again. Today I will be showing my visitors how to hide affiliate links. I'm not sure if many other people know about this method as I thought of it all by myself one night when I was thinking of ways I could increase my ClickBank conversions. The method I am going to demonstrate today will require you to do very little of the dirty work and it is a very simple process which only requires a single file a server with the mod_rewrite module enabled and a folder.

First I would like to state that I have not done any ethical checking on this form of URL masking so if you get in trouble for any reason don't come blaming it on me... Though I seriously doubt there's anything wrong with this method. In a second I will list some prerequisites for you so you will know exactly what you will need before we begin, honestly though its very very simple.

Prerequisites

1.A website with access to the website's files.

2.The ability to create at least one folder on your website.

3.A website running Apache with mod_rewrite module enabled.

4.An affiliate link that you would like to hide/mask

5.Five minutes of spare time.

Got that? Lets begin.

Lets say I wanted to sell a product off the ClickBank Marketplace. It can be any product from any site but we're going to use ClickBank for this example. Once you're at the Marketplace lets find a product to sell...

Ah here we go, here is what ClickBank generated for you to send visitors to. Its a very crude and obvious method if you are trying to get your conversions up.

EXAMPLE:http://mrwomack.productcen.hop.clickbank.net/?tid=TRACKID

Most people settle for this but if you're looking to turn the above ClickBank URL into something less obvious and more direct then check out what I've turned the above URL into.

http://www.jwpctips.com/myproductcenter

See the difference? the latter link is both easier to remember and looks much more like it belongs on your site. There's also a way to take it a step further and make an actual page which does nothing more then track user statistics which will give you a better understanding of who, what, when where and how your users are using your links. But that's another article and if I get bugged enough to write how to do that then I'll make a tutorial on how to accomplish just that.

Lets break down exactly how I created this new sexy link to the ClickBank product on which I am wanting to sell. The first thing I did was logged into my website via FTP ( I use CuteFTP) and created a folder called "myproductcenter" the folder structure looks like this.

All I did was added a folder called "myproductcenter" to the current contents of my website. This folder can be called anything but for the sake of this demonstration lets keep it closely related to our product's name as possible. Moving on.

Inside the "myproductcenter" folder place a single file called ".htaccess" (No quotes of course). The .htaccess file should currently be empty as we haven't added anything to it. I have added a zipped .htaccess example to the end of this article for people having problems making a ".htacces" file.

The .htaccess file can be pretty complex so I won't go into depth in this article explaining all the mysterious wonders that can happen inside it but if you would like to learn more about how and what .htaccess files are then I suggest you read  up on the Apache How To .htaccess page for more information. For this demonstration we will only be adding some very basic commands which I will walk you through so don't worry if you looked at Apache's explanation to the .htaccess file :) Read on!

Once the .htaccess file is placed inside your myproductcenter folder then its time to edit the .htaccess file. If you are using CuteFTP then you should be able to edit the file directly from the FTP web server, if not then edit the file .htaccess file from your desktop with the following lines then upload it to your web server and rename it to ".htaccess"

Also note that the period at the beginning of the .htaccess file is imperative and must be there or else this will not work. Once again if you want to know why I can only reference the link above to "Apache How To .htaccess".

the following 2 lines should be placed inside your .htaccess file, I will explain on what should be edited to suit your affiliate needs. for now just use the example until you feel comfortable editing the file to suit you better.

 ---Place the two lines below inside the .htaccess file.---

RewriteEngine On

RewriteRule .* http://mrwomack.productcen.hop.clickbank.net/?tid=TRACKID [R,L]

--Place the two lines above inside the .htaccess file---

The first line RewriteEngine On simply enables the url http://www.jwpctips.com/myproductcenter to be invisibly redirected to my affiliate link which is http://mrwomack.productcen.hop.clickbank.net/?tid=TRACKID

The second line should be obvious. It contains the URL to which I would like my URL to be directed to after the user clicks on my website's link. What you should be doing now is editing your .htaccess file's second line to point to your affiliate link or whatever URL you would like your "myproductcenter" folder to redirect to.

Also keep in mind to ONLY edit the second line's URL leaving the "RewriteRule.^" and "[R,L]" in place. For example I could change the above .htaccess file to send everyone who visits my http://www.jwpctips.com/myproductcenter link to Google by making the following changes to my .htaccess file...

RewriteEngine On

RewriteRule .* http://www.google.com [R,L]

Placing the two lines above inside my .htaccess file will result in http://www.jwpctips.com/myproductcenter pointing to http://www.google.com silently. *Note my URL still points to my ClickBank product because I did not change my .htaccess file for this mini-demo*

If you haven't noticed yet using this method also changes the status bar in browsers to display http://www.jwpctips.com/myproductcenter instead of the actual affiliate link http://mrwomack.productcen.hop.clickbank.net/?tid=TRACKID which some internet users always look at when the hover over links to see where the link leads to.

This is basically it for this tutorial hope this helps out you folks who are wanting to get higher conversions on your sales, cloak affiliate URL's or just do some pretty neat things with websites

Always feel free to ask questions and leave comments in the comment box below.

AttachmentSize
htaccess.zip183 bytes

Post new comment

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options