Link Cloaking Plugin for WordPress
This is a plugin for WordPress that can automatically cloak outgoing links in your posts and/or pages.
Download plugin
(Note: May not be compatible with the latest version of Eclipse Link Cloaker.)
Features
- Choose what to cloak – all links, only the links you specify or no links at all.
- Choose where to cloak – posts, pages or both.
- Exception list – links pointing to domains in this list will not be cloaked. For example, this is useful if you have chosen to cloak all links but don’t want to cloak the links to your own domains.
- Compatible with all browsers – the link cloaker plugin doesn’t use JavaScript so it will work even for visitors that have disabled JS.
- “Smart” cloaking – relative, ambiguous or malformed URLs will not be cloaked. Better safe than sorry.
- If desired, you can also add your own cloaked links manually.
Examples
Lets say you’ve got a link you want to be cloaked.
<a href="http://example.com/?affiliate=me">Cloak Me</a>
Once you install the plugin, it will automatically, without requiring any configuration, turn it into a cloaked link when it’s displayed to a visitor:
<a href="http://yoursite.com/goto/Cloak_Me/12/34">Cloak Me</a>
Here’s a live example: Cloak Me
As an alternative to the fully automatic cloaking, you can switch the plugin to “selective cloaking” and tag the links you want to cloak manually:
<a href="http://example.com/?affiliate=me">Cloak Me<!--cloak--></a>
Note: The plugin does not actually edit your posts or permanently modify your links. Instead, it switches them on-the-fly whenever someone views them on your site. When editing a post in the admin panel, you will see the original, uncloaked link.
Download
Version 1.8.4 : link-cloaking-plugin.zip (16 KB)
Requirements :
- WordPress 2.8 – 3.3
mod_rewrite
. If “pretty permalinks” work on your blog then you probably have this already.
(Note: May not be compatible with the latest version of Eclipse Link Cloaker.)
Installation
- Download the link-cloaking-plugin.zip file.
- Unzip the file.
- Upload the `link-cloaking-plugin` folder to the `/wp-content/plugins/` directory.
- Activate the plugin through the ‘Plugins’ menu in WordPress.
- (Optional) Go to Settings -> Link Cloaking and modify the default settings to your liking.
FAQ
Why are some of my links not getting cloaked?
The most common possibilities are:
- Links in the sidebar, header, comment area and so on can’t be cloaked by the free version of the plugin. It only works on links in page/post body. Upgrade to the premium version to cloak links anywhere on the page.
- Links added using other plugins, theme features or custom fields are also supported only in the premium version.
- JavaScript links, as well as Flash and context-sensitive ads are not supported by any version of this plugin.
Why are none of my links getting cloaked?
- If using “Seletive cloaking”, make sure you have actually marked some links with the
<!--cloak-->
tag. - Double-check that the links in question aren’t added or modified by plugins, the theme, or custom fields.
- Contact me. You might have found a bug.
The exception list doesn’t seem to work. What could be the problem?
Make sure to enter only domain names in the “Exceptions” box. For example, given a link like “http://example.com/directory/page.html”, the domain name is the “example.com” part. So to prevent the plugin from cloaking that link, add “example.com” (sans quotes) to the “Exceptions” box. Entering the full URL or “http://example.com/” will not work.
Additionally, if some of your links point to example.com and some to www.example.com, you will need to add both of those to the exceptions.
Why do some cloaked links redirect me back to my homepage?
Most likely, your post(s) contain links created or modified by other plugins, the theme, or custom fields. Either remove those links, or upgrade to the premium version.
Why do some cloaked links redirect me back to my homepage?
See the previous question.
Why do cloaked links display a “Not Found” error?
- Make sure you’re using pretty permalinks.
- Your .htaccess might be out of date. To update it, go to Settings -> Permalinks and click “Save Changes”.
- Your hosting company may be blocking browser access to PHP files in the /wp-content/plugins/ directory, usually as a security measure. The free version of the plugin is not compatible with these hosts. Consider using the premium version instead.
I have a question not addressed in this FAQ. What should I do?
Either leave a comment below, or email me directly. My email address can be found on the contact page.
Related posts :
it doesnt work anymore…
[…] W-Shadow […]
I agree with you, thanks for sharing the info- no matter what- cloaking affiliate link is a matter to secure our own commision!
Seems to be broken…
Have it working when using Static Links but within the single.php ( ) it does nothing?
– .htaccess is correct
– setup is on Post & Page and Selective
Any ideas or possible fixes?
best,
ADs
The <!–cloak–> tag only works inside posts, not in template files.
Thanks, does it work template side in the Pro Version?
Yes, if you enable the “Cloak links in any part of the site” setting (the other option is to only cloak links inside posts, like the free version does).
Genius, thanks for that.
I should have a great usage example for you in about a week.
Best,
Ads
It doesn’t seem to cloak links generated from custom fields on the post.
any ideas?
Yes, this is a limitation of the free version. You need the premium version to cloak links generated from custom fields.
It doesn’t work for me neither
Plug in works fine with the exceptions that I have listed in the sidebar, however fails to work on most of the exception links that I have at the bottom of the static front page. Any ideas…
What do you mean by “exceptions”? Normally I would assume that exceptions are links that you don’t want to be cloaked, but then it makes no sense that the plugin would “fail to work on them”.
Either way, let me note that the free version generally doesn’t work with links outside post content.
I agree it makes no sense, but even though the sites are listed on the exceptions list on the link cloaking settings… it is still cloaking those sites.
You are correct that I do not want these links cloaked, but they are being cloaked anyway.
Hmm. Maybe your exception list is not formatted correctly? A common mistake is to enter the full URL of the link(s) you want to be excluded. In actuality, you only need to enter the domain name portion of the URL.
For example: “example.com” is correct, but “http://example.com/page” and “http://example.com/” are not.
What do you do with a domain that is marketing.about.com Should it be entered just like that or should it be shortened to just about.com ?
I had already checked my links to make sure they were in the correct format.
It should be entered as marketing.about.com.
By the way, I don’t see any links to marketing.about.com at the bottom of your front page (only in the sidebar).
Okay… will file that away in my notes. I realize that was applicable the bottom of the page… just a question that I had. I’ve found other deep links that work now, except for the CB Engine link and the Keyword Optimizer Pro links… Weird, may try to work out a different link to replace them. (That’s what I ended up doing with the others.)
Just a guess: Try re-saving your permalink settings.
So far so good! I am enjoying the plugin but wanted to find out about cloaking the final URL. I didn’t seem to find a reference to doing that…
Cloaking in the Status Bar was a breeze, what do I have to know to get the URL cloaked as well?
Thanks!