Affiliate Link Cloaker Plugin
Introduction
This plugin will cloak an affiliate link in a similar fashion to a product called GC Affiliate Cloaker. It essentially spits out some JavaScript that opens the cloaked link in an iframe. Cloaking in this case is not for SEO purposes - it is to shorten URLs so they look prettier and also to prevent other affiliates from stealing your commissions. You can use a redirect plugin to accomplish the same thing, but this is easier as you make the “redirect” just like writing a post.
Installation
Installation is the same as most plugins, and if you’ve used widgets before you’ll know what to do. Please contact me if you’re having difficulty or you think something is broken. Here’s a step-by-step:
- Download the Affiliate Cloaker Plugin and extract link_cloaker.php
- Copy the file into your wp-content/plugins/ folder
- Go to the Plugins menu in WordPress and activate the Affiliate Cloaker plugin
Using the Affiliate Cloaker plugin
When you’re writing a post you’ll see additional options below the posting window. Click the “Cloaked?” checkbox and fill in the URL field with the destination URL (your affiliate link.) If you want to stop cloaking, just uncheck the box.
Screenshots
- Uncloaked post
- A cloaked affiliate link







I read somewhere that Google doesn’t look favorably toward redirected affiliate links, or redirected links period.
Please advise how this plugin (which is a potentially great idea by the way) is Google compliant?
Also how does one choose the anchor text for the affiliate link?
@Missy
This doesn’t redirect anything, it opens the affiliate link’s contents in an iframe. As a side note, redirects are a part of HTTP. What they don’t like is Googlejacking (using a 302 redirect to steal apparent PR from an existing site.)
I’m not sure what you mean by “Google compliant.” If you mean will Google ban your site for using it, I highly doubt it. All you’re doing here is using an iframe to open an affiliate offer. If you stuffed the post with keywords and used the plugin, they *might* count this as cloaking. I recommend using an empty post or page.
Also, there is no anchor text for the affiliate link since it’s not a link, it’s the source of the iframe’s contents that you specify.
When I open up a new post in WP this is what I see above the post. It has the check box and box for URL destination. Is this correct? When I go back and review the post and hover over the link word that I use to send someone to an affiliate it still shows the affiliate URL address in the lower left corner. Should I see this be cloaked? Am I wrong on this?
I’m new to this so bear with me. Thanks.
Link Cloaker
Cloaked?
Destination URL:
I’m having the same experience as Brian.
Let me add another question…
What if you have multiple affiliate (different affiliates)links on one page?
Thanks
@Brian
The plugin works as an alternative to a redirect. So, you create a post and if you want that post to redirect to an affiliate link instead of displaying the post, click the “Cloaked?” checkbox and fill in the URL. The next time a user hits that page the affiliate page will open in an iframe. It doesn’t cloak links inside the post, it cloaks the post itself.
It is possible to use this plugin for (static) pages in addition to blog-posts?
I first had Simple Lind Cloacker installed and it did not work. I then installed Affilitate Link cloacker. It still does not work. My Dashboard says it is installed and activated. I have followed each step dilligently (I believe) and am very frustrated/confused. No matter what I do the link causes “Oopps. The link appears to be broken” Folowing your format this is what I have in the “redirect window”:
kidsclothingoutlet.net/magic/http://magickidsusa.com - or
kidsclothingoutlet.net/go/magic/http://magickidsusa.com - nothing seems to make a difference.
Also FYI the “settings” panel on Wordpress does not show Affiliate Link Cloacker as an active link but the “Plugins” index shows it as active.
I attempted to download the Affiliate Cloaker Plugin and extract link_cloaker.php but was unable to open it. Windows could not recognize the program it was created in, or so the message said. Please help. Thank you. John