How To Cloak Affiliate Links in 3 Simple Steps

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInPin on Pinterest

Recently I learned a simple and cool way to Cloak Affiliate Links.

Those of you who have experience with affiliate marketing already know what an affiliate link looks like.

For those of you who don’t, they look a little something like this…

The problem here isn’t just that affiliate URLS are ugly. Affiliate links also have low click conversions rates compared to cloaked affiliate links.

So, here’s how you cloak an affiliate link in 3 simple steps

 1. Create a folder in your HTML directory

This should be something like or

2. Create a folder within the folder

This folder should be named after the company you’ll be promoting. Let’s say you became an affiliate of Honda and you’re going to promote Honda products (don’t think Honda really has an affiliate program but let’s just use this as an example). We already created a folder called “recommends” and now we’re creating a new folder within our “recommends” folder named “honda.”

3. Create an index.php file and save it in the company folder

Create an index.php file and put the code below in the file. Put your affiliate link in the appropriate place.


header( ‘Location: PUT AFFILIATE URL HERE’ ) ;


The file is now saved at…

Now, whenever someone clicks a link or goes to…

they’ll be redirected to your affiliate url and you’ll get a commission

Pretty cool, right?


Leave a Comment:

Add Your Reply