Few days back, I shared how to cloak affiliate links in WordPress using plugin. Here I am going to share a simple yet effective way to hide your affiliate link. For this you won’t be needing any plugin. Which means it works for WordPress and Blogspot both.
It is always good to do things by yourself instead of using plugins as plugin may get outdated one day but these tricks will work forever.
Simple steps to cloak affiliate links
Step 1: You need to create a folder in your root directory. You can just go to your cpanel and create a folder in root directory (public www folder). The folder name can be anything. Suppose the folder name is “loves” then the structure would be something like:
http://www.yourdomainname.com/loves/
Step 2: In this step, you would need to create a new folder inside folder named “loves”. for example you are a affiliate member of “Hostgator” and want to promote “Hostgator”. Then create a folder named “Hostgator” inside folder “Loves”.
Structure:
http://www.yourdomainname.com/loves/Hostgator/
Step 3: Create a index.php file inside affiliate folder (in this case it’s Hostgator) and paste the below code in the file.
<?php
header( ‘Location: your actual affiliate link here’ ) ;
?>
Step 4: It’s done. you have your cloaked affiliate link, which is “http://www.yourdomainname.com/loves/Hostgator/
“. Use it anywhere. Don’t forget to add “nofollow” attribute while using link.
Benefits of cloaking affiliate links
- It will increase affiliate link CTR as people will more likely to click on these links. Actual affiliate links looks ugly and spammy and generally people won’t click on them.
- Cloaking will protect you from search engine penalty. Tip: Always use {rel=”nofollow”} while using cloaked link.
Lets take above example again:
your actual affiliate link would be like:
http://www.hostgator.com/1234?Id
After following above steps it would look like:
http://www.yourdomainname.com/loves/Hostgator
You need to use it in this way:
<a href="http://www.yourdomainname.com/loves/Hostgator" rel= "nofollow" target= "_blank"> Anchor text </a>
Let me know if you face any issue while following above steps to cloak affiliate links.
Image courtesy of pakorn at FreeDigitalPhotos.net
Parish says
This is a easy way. Nice tutorial.
Jeanine says
Great article with helpful tips. I have now set up the cloaking, but I was wondering about the following. Since all the links are redirects, it takes some seconds to load the links. Therefore I would like to show an “exit page” that says something like: Just waiting to redirect you to.. (shop name).. just a few seconds..
Do you have a tip on how to show an exit page like that?