Tutorial : How to hide your affiliate links using Wordpress
While there are some plug-ins out there that may do this for you, most of them are paid, and for those of you that can’t afford them this tutorial should be a life saver. One of the biggest streams of income for bloggers are affiliate networks, disguising your affiliate links can significantly improve your overall conversion rate thus leading to more profits.
The idea behind this whole ‘cloaking’ process is to make the readers think the URL the reviewed or promoted product is pointing is actually an internal URL
The idea behind using this theory is that readers will click on it thinking it is an internal link on your site, rather than taking you to a third party site. Another benefit is that all of your blog’s links point toward an internal address on your domain, giving you control to update the URL easily. This helps avoid dead links whenever a company changes a URL and makes it easy to update your affiliate links when the need arises.
This job can be accomplished in many different ways, but as I’ve become quite familiar with PHP redirects, I’m going to talk about that method. Here are the steps I follow when I try to hide my affiliate links :
- Create a folder called “Trusted Links or Go ( any name can do ) .”
- Create a blank.php document and name it after the appropriate affiliate link you are using ( if you were going to use an affiliate link from Comission Junction you could very easily name it CJ ) .
- Now, paste the following code into the formerly created .php document :
<? header("Location: http://youraffiliatelink"); ?> - Save it into the folder created at step 1.
- Repeat steps 2-4 until you’ve created a .php file for each affiliate link.
- Go to your FTP and upload your folder directly to the www folder.
- Update all your affiliate links to point towards your new redirect!
Your redirect will look something like http://www.yourdomainname.com/trustedlinks/cj.php ( this is only an example ).
This was the easiest way I could think of and which I’ve been implementing on all of my blogs with quite a bit of success. If you know any other method, please share with the rest via the comment form.
If it's your first time here, you might want to