Webmasters Tricks
*

My Tricks
Home Using "www2" Favicon Autodate Translation Tooltips Link Cloaking Track With 1 Pixel PHP Autodate SEO & Tables Screen Capture Website Scruffies
My Tools
Newbies School of Internet Marketing CheatKit Graphics Wizard CheatKit ListBuilder CheatKit Viral ListStorm Survey Convertor The Free Trial Machine ExitBlocker Cloak & Track Toolkit Forum Marketing Kit Scroller Control Newbies Starter Kit Ultimate Package Brander Affiliate PDF Brander Turbo Content SiteBuilder Content Rewriter Pro Grab That Sale! Web Protect Pro

Webmasters Cheat Kit - A Range Of Easy To Use Website ToolsPut some of my "tricks" to work on your website. The Webmasters CheatKit range of products helps you to build professional websites without needing a load of techie skills!

Click Here To Find What's In The "CheatKit"!

Link Cloaking

There are many reasons why you might want to hide the final destination of a link.

The most common reason is that you are trying to hide an affiliate link - to disguise the fact that it is an affiliate link and also to prevent your affiliate commission from being hijacked.

For example, your link to a ClickBank product will be something like this:

http://YourCBID.VendorCBID.hop.clickbank.net

All that a commission hijacker needs to do is replace "YourCBID" with his ClickBank ID, and you've lost your commission.

There's no shortage of ways that have been suggested to cloak your link. Here's a few of them - and the reasons why I don't think they're very good:

The Simple Redirect
This is used by many leading internet marketers. You simply to set up a page for each product you want to promote. This page has a simple "redirect" in the header of the page, sending the visitor to the sales page via your affiliate link. For example, you might set up a page called "product.html". In the header of this page you put this HTML code:

<meta http-equiv="Refresh" content="0;URL=http://www.someproduct.com/aff.php?aff=1234" />

The bit in red is your affiliate link, and that's where the visitor is sent when you upload the page and send them to, say, "www.mysite.com/product.html".

This is not very effective. It's not difficult to intercept the redirect page before it has time to send the visitor on - and then you can read the full affiliate link.

The PHP Redirect
This is a bit more secure. Again, you need a separate page for each product that you're promoting. This page must be a "PHP" page - i.e. the file name must end in .php instead of .html or .htm. There's nothing in this web page except the following code:

<?php $URL=http://www.someproduct.com/aff.php?aff=1234";
header ("Location: $URL");
exit();
?>

There's no way that anyone can intercept this page and read your affiliate link. But it does depend on your web hosting company supporting PHP (most do, although you might have a problem if your website is on a Windows server), but you still have the hassle of having to set up and upload a separate page for each product that you're promoting.

Now I want to show you a much easier way - you can promote as many products as you like simply by creating and uploading a single text file. It's the..   

.htaccess Redirect
The ".htaccess" file is a simple text file that can give a whole host of instructions to your web server. Here, we're just going to use the .htaccess file to send "redirect" instructions to your web server. Here's how to do it:

Step 1
Using a normal text editor, such as Windows NotePad (not a word processor or a web page editor), type these lines of text (changing the coloured bits as I explain below):

Redirect /product1 http://www.someproduct.com/aff.php?aff=1234
Redirect /product2 http://www.someotherproduct.com/go/256/
Redirect /product3.html http://YourCBID.VendorCBID.hop.clickbank.net

The green bits are the name of the fictitious file or directory that you are going to use in your cloaked link. For example, for the last affiliate link, you would send people to:

http://www.mysite.com/product3.html

.. and they would be redirected to the website address in red - your affiliate link.

You can have as many lines as you want in this file, so if you're promoting a wide variety of products, you can do this just through this one text file.

Important: Each redirect must be on a separate line, there must be a space between the word "Redirect" and the next part, and another space between that part and your affiliate link.

Step 2
Save this file as "htaccess.txt" and upload it using your FTP program to the root of your web server. If you are required to put all your web pages in a folder with a name such as "public_html", you must upload it into this folder.

Step 3
Again, through your FTP program, rename the file "htaccess.txt" on your web server to ".htaccess". It must have this file name. You can't create a file with this name on your PC, and that's why you need to rename the file when it's on your server.

Step 4
Finally, you must change the "file permissions" of the file ".htaccess" to "755". With many FTP programs, such as "FileZilla", all you need to do is right-click on the file name, select "File attributes.." and type the figures 755 into the box provided. This procedure varies slightly with different FTP programs.

This process might seem a little fiddly but remember, you only need to do it once for all your affiliate programs. If you later need to add more, just open the text file you created on your PC, add the extra line(s) and repeat steps 2 to 4.

Important: Before you upload and change the file name, make sure that there isn't already a .htaccess file in place already. If there is, then you'll need to download it, open it in a text editor, and add your Redirect lines. You can have many different server commands in the same .htaccess file, so as long as you don't overwrite any existing instructions, you should be OK. It's probably safest if you add your Redirect lines at the end of the existing commands.

Oh, and you can't use this method on a Windows server. It is only for Unix / Linux servers, which most people are probably using.

---

The .htaccess redirect method is about as secure as it can be and, although my instructions have been rather lengthy, it really is a rapid process.

Finally..

If you're looking for a high-powered link cloaking system with link tracking stats and a heap of powerful internet marketing tools, you really can't do better than this web software:

http://www.IanSays.com/IEndorse/GoTryThis

I've now been using this system for over a year, and the link above is an example of it in use - cloaking my affiliate link! I highly recommend it. Oh, and just to show that I can use the .htaccess system, here's the same link cloaked with a .htaccess file:

http://www.marketing-drive.com/gtt

I hope you've found this useful.

These "Webmasters Tricks" are presented without any guarantee that they will work on your website, on your computer or in your browser! As with any technology, you must test everything very carefully!

Ian Traynor is a professional webmaster and internet marketer. He owns the Webmasters CheatKit range of products, and produces the weekly "Marketing Update" newsletter. You can