Affiliate link cloaker WordPress plugin

by Joe Brewer on July 11, 2011

Affiliate link cloaker is a free WordPress plugin that can geo target cloaked affiliate links. This plugin has the capability to generate a link like mhelpdesk and have visitors from the USA click on the link and get sent to, visitors from the UK sent to and so on.

In addition to this, these cloaked links can be automatically inserted into content. Keywords or phrases can be set to be changed to nofollowed links that open in a new window so that visitors are not taken away from your website.

Download the plugin from the WordPress plugin repository.

URL Trigger

This represents a folder which all links will sit on top of. The default is "recommends". Here is what the links look like straight after installation:

Choose this carefully after you install the plugin, otherwise you will manually have to update any links that are not auto generated if you want to change it later.

The table below the url trigger shows an overview of the links. If a line is red, then there is an issue with the link - this can be that there are no addresses or no default address.

This option tells the plugin to add the cloaked links into content. Links will only be added into content automatically if this option is set, search text has been specified and there is at least one address for the link to redirect to.

Replacement order
This is the order that the replacements are done within a post or page. Search text is replaced in ascending replacement order without links being nested. For example, if "Paris in the spring" is replaced with a link, Paris or spring cannot be subsequently be replaced.

Max Replacements
This is the number of replacements that are performed in a page or post. If this is set to zero all occurances of the keyword/phrase will be replaced.

Search Text
This is the keyword/phrase that will be turned into a link in the post or page.

Cloaked URL suffix
This is the text that will be placed at the end of the cloaked url. This must be unique.

Count Redirects
If this option is checked, the redirects will be counted and will be shown by each address in the address table.

Nofollow Link
If this option is checked, any replacements that are made automatically will use a rel="nofollow" tag.

Open link in new window
If this option is checked, any replacements that are made automatically will use a target="_blank" tag which will cause the link to open in a new window.

Redirect type
These is the http status code of the link - documentation for them can be found here. This will default to a 302 redirect. If this is set to a 301 redirect, most modern browsers will cache the redirect and any changes to the addresses below will not show for a specific user if they have already following the link.

New addresses can be added by clicking on the Add new address below the link options. Addresses must start with "http://" and at least one address must be set to default. If the Region Detect plugin has been installed, a list of countries will be displayed in a dropdown combo box - this can be used to geo target the addresses.

Be Sociable, Share!

{ 37 comments… read them below or add one }

Tevya July 25, 2011 at 11:53 am

Does this plugin support multiple keywords for each affiliate link? It looks like an awesome plugin, but that’s the one feature I’d really like to see (if it’s not there already). If you can just put a list of coma-separated keywords for the “Search Text” it would be very helpful. The reason being that you might refer to a product or service in various ways such as “Amazon” and “Amazon Marketplace” or something like that. You want the one with “marketplace” in it to link both words, but you also want “Amazon” and “” to be affiliate links when they’re entered in an article by themselves.

Joe Brewer July 25, 2011 at 4:39 pm

Hi Tenya

Thanks for you comment and kind words.

Currently multiple keywords/phrases are not supported per cloaked url. Great idea – I’ll look into adding this into the next version. At the moment, your keywords would have to setup different cloaked links – one for each keyword.

Thanks for the suggestion,

Tevya July 25, 2011 at 6:29 pm

No problem. Thanks for responding.

I tried out the plugin since posting above, and I’m really impressed overall. I think it’s nearly the perfect plugin for cloaking, auto-inserting, and managing affiliate links. Having an easy way to add multiple keywords/phrases would make it basically perfect. A truly awesome and powerful plugin with that feature.

Chris July 27, 2011 at 9:09 am


Are you planning to add wordpress multisite support? Plugin currently does not function properly with a multisite enabled blog…

Currently, it’s only possible to add cloaked urls on the main site, but not on any of the sub sites.

Joe Brewer July 27, 2011 at 4:51 pm

Great idea – I’ll add this to my list of features to add.

Joe Brewer July 27, 2011 at 5:27 pm

Chris, Have you network activated the plugin?

Chris July 28, 2011 at 2:33 am

Yes, I can access the plugin settings from the sub sites, but 2 are wrong so far as I can see now:
(This is on the “add new” page, and only on sub sites. Parent/primary site functions properly)
1. The bottom section where you input the actual affiliate url is missing.
2. When you click save after setting the options in the top section, the data isn’t actually saved.

BTW, This is on wp 3.2.1 multisite using sub domains.

Anzahl July 30, 2011 at 2:01 pm

I’d like to see an option to bold the linked keywords so that they stick out more and can be seen more clearly by the visitor.

Joe Brewer August 1, 2011 at 4:46 pm

Hi Anzahl. Thanks for the suggestion, however I think this is better achieved using css in whatever theme you are using

Stuart Forster August 2, 2011 at 6:45 am

I’d like to record my satisfaction with the prompt and effective help provided by Joe in relation to my competence in installing the Affiliate link cloaker WordPress plugin. This would be a bonus to anyone considering using affiliate links and I will give the plugin a plug on my forthcoming tell-people site!
Thanks Joe!

Tevya September 5, 2011 at 10:33 pm

I’m still loving this plugin. I have several ideas that could improve it, if you’re not overwhelmed with them already. However, I just have one that I think is very important that you should consider: search text should not be case sensetive. Currently it is, so if I put in “Amazon” but not “amazon” and then one of the authors on my site happens to not capitalize it, it doesn’t get linked. This would be a super nice (and I would imagine minor) update.

Jouvan Johnson September 6, 2011 at 10:01 am

Downloading this now to try on one of my sites it looks like it will be great but it is not yet tested on the latest version of wordpress.. I pray it still works :-s

Thanks for the plugin


Joe Brewer September 9, 2011 at 4:39 am

Hi Jouvan. You shouldnt have any issues – let me know if you do though, and I’ll do my best to help

Joe Brewer September 9, 2011 at 4:40 am

Hi Tevya. This will be in the next version of the plugin. Please let me know your other ideas and I’ll consider adding them.

Tevya September 9, 2011 at 2:12 pm

@Jouvan I’m using it on the latest version of WP and it works great, unless you’re talking about a pre-release version.

@Joe That’s awesome! Thanks for the great plugin, and fast response! I’m excited for the next version.

Most of my suggestions revolve around the idea that it’s still kinda cumbersome to add a bunch of new affiliate links to the plugin:
- let us set defaults that appear pre-filled when we go to create a new link. Eg. I always use “,” as the delimiter and want them to be active every time. It would speed the process greatly if we could set most of the defaults, so that we only had to fill the link URL and the keyword(s).
- have the default address available and one already added (but not pre-filled) when creating a new link. This way you can fill out the keywords, and also the URL, then just hit “save” once, rather than having to do the first portion, save, then click the add button, then add the URL and save again. It would just once again help simplify this process.

It seems like there was a 3rd, but I can’t remember it now. Thanks again.
Tevya´s last blog post ..How to Backup WordPress Before Upgrading

Joe Leighton September 22, 2011 at 5:30 pm

Hi Joe…Clicks on my cloaked link lead to an empty page on my site. Obviously, the cloaked link is not being redirected to the address url.

Cloaked link is this=>

Both Search Text and Cloaked URL Suffix are set to=> candins5mkngsccantop

The address URL works fine in a browser.

Site is setup on WordPress 2.8.4

Any ideas?

Thanks, Joe

Terry September 27, 2011 at 3:28 pm

Having trouble with it stripping out brackets from my tradedoubler url & therefore getting ‘Link not active’ page from TD
Is there a way around this?

HTML5 Forum September 28, 2011 at 4:23 pm

Hi and thanks for this.. ive noticed my affiliate earnings going down a lot of late as people are now catching onto affiliate link id’s and manually typing urls into their browsers, be interesting to see if this can increase my earnings back again.


Joe Leighton September 28, 2011 at 5:38 pm

re my comment sep 22 above.

Joe addressed my problem by email. Upon his suggestion I upgraded to the current version of WordPress. His link cloaker now works fine.

I also added Clickbank tracking code to the cloaked URLs so I can see the exact origin of customer hits.

Many thanks, Joe, for a great plugin and your prompt and useful response to my issue.

Regards, Joe

Will October 30, 2011 at 5:05 pm

Simple question maybe but I am confused. What exactly goes into the “address” field.

Joe Brewer October 30, 2011 at 5:45 pm

Hi Will. The affiliate link goes in the address field

Will October 30, 2011 at 5:50 pm

Thanks Joe – I should have been more specific. Do you need to put a new address for every link since every product link has its own specific url? This can’t be what is intended, but I am not sure. Doing it that way on a site with 50 links to amazon products would result in 50 separate addresses.

Tevya October 31, 2011 at 12:21 pm

Hi, I’m having an issue with this plugin. I inserted an image right at the start of a post, and the plugin seems to be recognizing parts of the title and src attributes of the img tag, as keywords to link, and therefore ruining the img code. So instead of an image I see most of it in the post:

evernote-online-study-290×193.jpg” alt=”” width=”290″ height=”193″ />If you’re not completely satisfied

If I turn the plugin off, it works just fine. I can’t tell that I’ve done anything different with this plugin, other than it’s not linked to any thing, and is at the beginning of the post…. As I was typing I thought of adding a link to the image. After reinserting it with the link, it now works fine. So it appears that the plugin recognizes the link and leaves it alone, but if there’s no link around the image, it will detect words inside the src, title, etc.
Tevya´s last blog post ..How to Backup WordPress Before Upgrading

Stefano March 15, 2012 at 5:05 am

How can I prevent links to be “cloacked” in a specific post/page? Is it possible?

Joe Brewer March 15, 2012 at 6:24 pm

Hi Stefano. The plugin doesnt currently have this feature. However, it’s a good suggestion, so I’ll add it to the list of features for the next release.

Dana July 1, 2012 at 11:34 am

Hi, Joe
Thank you for the great plugin!
My question is , is there an option to reset/ start over the counter of redirects.

Dana´s last blog post ..*B.Mps: titolo sospeso, +5,39% teorico

Scott July 12, 2012 at 8:55 am

Hi Joe! Love the plugin! When will all these juicy updates be implemented – how often do you update the plugin?



Joe Brewer July 12, 2012 at 5:05 pm

Hi Dana. This feature is in the version that has just been released

Joe Brewer July 12, 2012 at 5:06 pm

Hi Scott. Thanks for the kind words – as you found, the details of the updates are in the post that follows this one. I havent updated the plugin for a long time, but if you have any ideas for features I’d love to hear them

Fugger July 27, 2012 at 12:53 pm

I have tremendously enjoyed this link cloaker! It makes everything look so much more professional. The stats are very up to date and informative. Excellent Job!
Fugger´s last blog post ..Feeling Tired, Scattered, and Overwhelmed?

Joe Brewer July 27, 2012 at 5:40 pm

Thanks Fugger!

Anes Amrani January 26, 2013 at 3:52 am

Thanks for the plugin it is awesome.

fausto May 12, 2013 at 7:07 pm

I find interesting this plugin

Jane Lerner December 22, 2013 at 4:55 pm

I wanted to know if this plugin allows you to mask my affiliate links in the address bar. I don’t want visitors to see my account information. How can this be done?
Jane Lerner´s last blog post ..Winter is here!!!

Joe Brewer December 22, 2013 at 5:15 pm

Hi Jane

Not 100% what you mean by masking affiliate links in the address bar – I havent got control over what address appears in the address bar when a link is followed to it’s final destination. Hoever what it can do is display a link like and have that redirect to a dog food affiliate site with your affiliate link.

Does that help?

John January 18, 2014 at 8:09 pm

Help Joe,
I can’t figure out how to use the cloaker. I don’t see it in WP 3.8.

John January 18, 2014 at 8:16 pm

…just found the cloaker panel in Menu/Settings.

Leave a Comment

CommentLuv badge

Previous post:

Next post: