диета при панкреатите

Easy and FREE Ways To Cloak Your Affiliate Links

August 10, 2007 | Blogging Tips

Referrals are a great way to make money on your website or blog, however there are some issues in using the default referral link’s. The first is that they are usually very long and ugly. The second, and most important, is that many people won’t click on a link if it looks like an affiliate/referral link. It’s been said that this psychological phenomenon could be causing you to lose up to 40% of your potential referral income. That’s a big problem.

How Can We Change This?

By implementing a technique known as URL Cloaking we can both shorten the length of these link’s and alleviate some of the psychological aspects of affiliate/referral link’s. Here’s what I’m talking about.

Normal Affiliate URL:

Cloaked URL:

As you can see the cloaked URL looks much better and to the average user it looks just like a normal link on your site.

Ways To Cloak Your Referral Links

There are several ways to do this and there is even software and plugins you can purchase that will do it for you. But why pay for something you can quickly and easily do yourself, without paying a cent. Here are few options.

1. Using JavaScript
This is a method that has been used a lot, especially in the past. However, it’s not the best as it only masks the link in the browser status bar and a user can easily see your referral URL by right clicking on the link. Not to mention if you try to use this method in an email is basically worthless. The majority of email clients will just filter out the JavaScript.

I’m not going to give you an example because there are tons of ways to cloak a URL using JavaScript. If you really want to try this method, just do a search for “JavaScript URL Cloaking”, and you will find a lot of free scripts you can use.

2. Sub Domain Redirect
If you have one of those hosting accounts that allow unlimited sub-domains, this may be an option for you. The method for creating a sub-domain will very depending upon your control panel or admin interface, but should be very easy.

From the domain section in your control panel, create a new redirecting sub-domain. It would be something like “affiliate.yourdomain.com”, where “affiliate” would be something that identifies your affiliate. Then in the space that ask where you want to redirect to, add your referral link.

Now instead of linking directly with your referral link, you can link to your new sub-domain and it will automatically redirect for you.

3. PHP Redirect
This is a very simple and popular method however, you’ll need to make sure your hosting supports PHP (not usually a problem). Open a text editor and copy the following into a new document. Notice: I added an extra space after the “<" and before the ">” for display purposes. You’ll want to make sure you don’t include that in your file.

< ?php
? >

Replace “http://www.your-affiliate-link” with your actual affiliate link and save the file with a name you can associate with the affiliate (affiliate1.php). Upload the file to a directory on your server. You can upload them wherever, but I find it easier to create a directory just for these files.

Now when you want to link to your affiliate you can link to this file instead of your usual affiliate link and it will redirect for you.

4. Server Side Redirect
This is the method that I prefer and use here on Average Joe Blogger. It is a little more advanced and requires creating .htaccess files, but it’s honestly not that difficult. Here’s how you do it.

The first step is to setup a directory for these redirects. In the root of your directory create a new directory and name it “go”. The within that directory create more new directories for your affiliates (affiliate1, affiliate2, etc.). Now that we have our directory structure created, we’ll create an .htaccess file that will do the redirecting for each of these directories.

Open up a text editor and save a new document as .htaccess. You’ll want to make sure that there are no file extensions on the end of the file (example: .txt). Now copy and paste the following code in that file.

Redirect /go/YOURDIR http://www.your-affiliate-link/http://www.desired-affiliate-page

Replace “YOURDIR” with the affiliate directory you created earlier, replace “http://www.your-affiliate-link” with your affiliate link, and replace “http://www.desired-affiliate-page” with the landing page on the affiliates website you would like your visitors to go to. Then just save the file and upload to the corresponding affiliate directory. Rinse and repeat for the rest of your affiliates.


With just a few minutes you to can have nice looking affiliate links like Great Web Hosting, Awesome Vectors, Textures and Fonts or Earn Money Buy Selling Links.

If you enjoyed reading Average Joe Blogger why not subscribe to my RSS Feed or get it delivered directly to your email inbox.

One Response to “Easy and FREE Ways To Cloak Your Affiliate Links”

  1. MyAvatars 0.2 dcr |

    Nice. Options 3 & 4 look to be the best and easiest methods. For me, anyway.