Increase Affiliate Income - Blindfolding Your Links
Making money online with affiliate links? Here’s a quick and dirty way to cover your tracks and push more visitors to your affiliate pages which will ultimately result in a few extra sales. I’m going to show you how this is possible using a simple PHP script.
Create a file called products.php (you can name it something else but if you do make sure you change it where applicable in the parts below). Now put something like this in it and change the URL’s to be whatever you want. You may need to create more elseif statements if you have a lot of affiliate links. Also make sure you put this code before ANY html for it to work, otherwise you’ll get a “headers already sent” error.
<?phpif ($go == product1) { //you can name "product1" anything, again make adjustments in your code later.$thislink = "http://affiliatesitelink.com/cars.php";}elseif ($go == product2) {$thislink = "http://affiliatesitelink.com/moneonline/";}elseif ($go == product3) { //just add more "elseif" statements for more products$thislink = "http://affiliatesitelink.com/loans.html";}else ($go == product4) { //note I end with a plain "else"$thislink = "http://affiliatesitelink.com/ebook.asp";}//Now the redirectheader(‘Location: ‘ . $thislink);?>- Download this code: 0907affiliatelinks1.txt
Mod Rewrite & .htaccess
Technically you could call links up now by doing http://domain.com/products.php?go=product1 or http://domain.com/products.php?go=product2 ect. Why stop there? If your server has mod_rewrite enabled (very likely it does these days) you can put something like this in a .htaccess file and upload it to your root directory:
Options +FollowSymLinksRewriteEngine onRewriteRule products/(.*)/?$ /products.php?go=$1- Download this code: 0907affiliatelinks2.txt
Note there is a space after the ‘$’. After this is in place you should be able to call up the affiliate redirect with a link like this:
http://domain.com/products/product2/ (with or without the slash)
Affiliates Links VIA ClickBank
If you promote something like ClickBank products on your site there’s a similar way to cover your tracks. This ones even quicker as we already know what to expect from each URL. Its consistent every time except for one thing. (two if you use their built in sales tracker)
<?php$cbid = "yourcbid"; //put your clickbank ID here$affiliate = "http://" . $cbid . "." . $affiliateid . ".hop.clickbank.net/?tid=" . $tid;header(‘Location: ‘ . $affiliate);?>- Download this code: 0907affiliatelinks3.txt
Three lines…not too bad. Again make sure its the first thing at the top of the page. Your content in the page will not matter at all (after the header redirect is ent it doesn’t read anything else). Your resulting link would look like this:
http://domain.com/products.php?go=affiliateid&tid=3
Your .htaccess rewrite rule will look something like this:
RewriteRule products/(.*)/(.*)/?$ /products.php?go=$1&tid=$2
Then you can call the link up using this:
http://domain.com/products/affiliateid/3/
You can do this with any affiliate link service that has a standardized way of linking to the products in their database.
The Logic Behind “Blind Folding” Affiliate Links
The way I see it is the visitor eventually will realize the link has directed them to another site. However, they are more likely and willing to check out that offer if you have provided them a link that appears to go to another page on your own site. Half the battle is getting them through the door so they can truly determine if that product interests them. If they didn’t click on the link they would have never known what they were missing if that visitor turns into a sale. Using something like TinyURL.com appears as a dodgy link to your visitors as I mentioned in Wrong Turn TLA - TinyURL Covering your Affiliate Links. If for nothing else it is a great way to log your visitors and track who clicks on what if you implement that with an SQL DB. Which brings me to the topic.
If you’re really clever you’ll use some mySQL and can generate usage reports by including a simple ADD query in your products.php code. This could give you insight into the behavior of your users since ClickBank doesn’t tell you how many times a person clicked through each link. Then its just a matter of creating a simple form and/or query page to show the usage for each. But that’s another day. If this is something you’re interested in seeing then comment on this page and I’ll make sure I write up a post on it sometime.
- Previous post in Marketing:
Digg Vote Spamming - How Accurate is Digg - Sabotage Or Experiment? - Previous post in Coding:
How Websites Show Portions Of Content For Preview Subscribers
- Next post in Marketing:
Marketing And Psychology - Understanding Visitors And Buyers - Next post in Coding:
Multi-Site Banner Managing - Advertising Displayed Based On Domain
Subscribe For Instant Updates.






September 7th, 2007 at 8:03 am
[…] Increase Affiliate Income - Blindfolding Your LinksMaking money online with affiliate links? Here sa quick and dirty way to cover your tracks and push more visitors to your affiliate pages which will ultimately result in a few extra sales. I m going to show you how this is possible … […]
September 8th, 2007 at 5:42 am
[…] Increase Affiliate Income , Click to READ. […]
September 8th, 2007 at 12:42 pm
Excellent simple script, I especially like how you use htaccess to use it. nice
September 18th, 2007 at 4:40 pm
This is a great post but if you don’t want to write or modify php code or htaccess rules every time you want to add or change an affiliate link and you’re using wordpress you might want to look into my new plugin that will let you manage all those links from a nice web interface inside wordpress admin:
Here is where you can find out more about this free plugin:
http://patchlog.com/wordpress/hidden-affiliate-links/
September 18th, 2007 at 7:26 pm
That plug-in looks great, but this tutorial is also for use on sites that don’t run wordpress
March 6th, 2008 at 4:54 pm
[…] There’s also a very useful script by Rob Mallon that you can use with htaccess to cloak your affiliate urls, I’ve not got any affiliate products on this site apart from my own elottery and uVme links but the script is useful to know for when/if I do. […]