In this blog entry, I gave you the low down on the PowWeb Affiliate Program and how easy it is to earn a lot money for virtually no effort.
One suggestion I had was for affiliates was to cloak their affiliate link. Here are just are a few reasons why cloaking your affiliate link is beneficial:
- It helps deter affiliate link hijacking
- You can use cloaking to make an easier to remember link
- It makes your link cleaner and prettier for your readers
Link cloaking isn’t a new idea. Guess who else is using it? Google. Anytime you do a search in Google, they show you the advertisers “Display URL”. The Display URL is a nice and clean public-facing url that the advertiser has chosen.
If you ever want to see the “real” url of an ad, right click on the title of an ad and go to copy shortcut. If you paste it somewhere, you’ll see that the ad is really going to some long arbitrary url like: google.com/?cp=ADFDGH0GbveRRGHvvweREZMeRTW
It doesn’t stop there. Google then redirects that long ugly url to the advertisers url of choice. This could be an affiliate link which then redirects the end user to the final location.
So for a lot of our affiliates advertising PowWeb in Google, this is what is going on:
User does a search > they see a pretty url such as powweb.com > they click on the link > the link goes to google.com/?cp=ADFDGH0GbveRRGHvvweREZMeRTW > which then redirects to the affiliates url such as: http://www.powweb.com/join/index.bml?AffID=565198 > which finally redirects to powweb.com.
So as you can see, both Google and the affiliate are using some form of link cloaking!
There are several ways of cloaking your affiliate link. Here are a few you might be interested in.
1. HTML Meta Redirect Method
This method utilizes a meta refresh to redirect a file on your hosting account to your affiliate link.
Here’s an example:
Let’s say we want to redirect traffic using a meta refresh from your site using the url http://www.myawesomedomain.com/powweb to your affiliate link: http://www.powweb.com/join/index.bml?AffID=565198
The first step would be for you to create a web accessible folder called “powweb”. For most PowWeb customers, you would create this folder within htdocs.
The second step is to create an index file to drop in the folder. The index file will contain the actual meta refresh.
Here is how it works:
When someone accesses http://www.myawesomedomain.com/powweb, the web server will serve up the index file within the powweb directory you created. Within the index file is some html which tells the browser where to redirect and when.
Here’s the fully valid code for our example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <meta http-equiv="Refresh" content="0;url=http://www.powweb.com/join/index.bml?AffID=565198" /> <title></title> </head> <body> </body> </html>
You can download this example by right clicking on this link and doing a “Save Target As.” You’ll need to edit the url within the code so that it redirects to your affiliate url.
2. .htaccess method
By using .htaccess, you are essentially telling your host/web server what to do with a url request before it serves any file. This is a little different from the aforementioned meta refresh which is processed by your browser after the page has already been served.
To use the .htaccess method, you still need to create a web accessible folder.
Remember our example. We’re trying to redirect http://www.myawesomedomain.com/powweb to your affiliate link: http://www.powweb.com/join/index.bml?AffID=565198.
It doesn’t have to be powweb though. If you wanted to direct customers to your affiliate via http://www.myawesomedomain.com/whatever, then the folder you would create would be called “whatever”.
Once the folder is created, you’ll want to drop in an .htaccess file.
Here is the code I created for this example:
Redirect /powweb http://www.powweb.com/join/index.bml?AffID=56519
/powweb is the name of the directory you want to redirect, and the url is your affiliate link.
3. PHP Header Redirect Method
This method utilizes php to redirect the end user to your affiliate link. Again, you’ll need to create a directory and drop a php file within that directory for this to work.
Here is the code for this example:
1 2 3
<?php header("Location:http://www.powweb.com/join/index.bml?AffID=565198"); ?>
There is only one part you need to modify, and that is the url string. You should replace it with your own affiliate link.
You can actually take these examples to another level and create a dynamic database-driven system which automates a lot of the link modifications for you. By doing so, you save a lot of time (if you are dealing with a lot of links) and make adding in additional features, such as a link tracking, easier.
Link cloaking isn’t always necessary, but it can definitely come in handy. In some cases, PHP or .htaccess may not always be available options so you’d want to use the meta refresh. Choosing which method to use really depends on your own unique situation. If you aren’t going to do much more than what I’ve mentioned above, then it’s really a matter of preference.
I did my own testing and the PHP method redirected the fastest. Hope this helps.