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 :
Okay I opened firebug this time and re-entered my data to and it shows the following error in firebug; saveCloakedLink is not defined
http://medicallyfragilechild.com/wp-admin/tools.php?page=link-cloaking-plugin-links
Line 1
I also tried this in chrome:
$(‘myForm’).addEvent(‘submit’, function(e) {
Uncaught TypeError: Property ‘$’ of object [object DOMWindow] is not a function
Judging by the error message from Chrome, the problem is being caused by a different plugin. The link cloaker doesn’t have a line like that anywhere in it’s code, or even a form identified as “myform”.
Try selectively deactivating your other plugins until you find the culprit.
okay I went and found the plugin and disabled it. but I’m still unable to get the static cloak link to work. The error generated in both F.F & Chrome are now reading:
Uncaught ReferenceError: saveCloakedLink is not defined (line 144 of tools.php)
Hmm, try this version.
I still had the same problem after uploading the new version you sent, but I managed to find and fix the error. Turns out, the database table needed to be dropped I went and dropped the table “_cloaked_links” that the plugin creates (after a back up of data of course) and started a fresh install with v1.6 (file you sent me), it created a new table and it works now. for some odd reason it was not allowing the data to be written to the table in the database from the previous version but. it’s all good, thanks I appreciate all your help, you have an awesome lil plugin.
An issue that I’ve seen discussed on my forum recently is whether IE8 blocks the cookie from a cloaked affiliate link by it’s privacy settings. I’m no expert but it seems that this is happening with some cloakers and so we are losing sales.
Does your plugin interfere with cookie setting in IE8?
Also I have no follow selected, but when I look at my links there is no no follow in the code.
Any idea why that may be?
Thanks
The plugin doesn’t touch cookies, so I don’t think it should have any effect on that. However, I haven’t really tested that extensively. If you discover a case where the cookies are blocked when the link is cloaked by this plugin, let me know and I’ll see what I can do.
As for links missing nofollow, could you show me an example?
Hiya i dont think its server related, because 6 of my ten sites it works on and all on same server. its just 4 that dont :-S
Well, I’m out of ideas then.
Hello,
Is it possible to remove Link_Text_Here in http://domain.com/%5Bprefix%5D/Link_Text_Here/12/34
Thanks
No. However, you can create “static” cloaked links that have whatever text you choose in place of “Link_Text_Here”. See Tools -> Cloaked Links.
[…] want to use Amazon without plugin shops then you can go for a WP plugin that will cloak your links Link Cloaking Plugin for WordPress | W-Shadow.com Graham Reply With Quote + Reply to Thread « Previous […]
Thanx again
hello, I installed version 1.6 of the plugin on wp 3.0 but when I post a url example http://www.namesito.com/id56773 is not added. If I insert the url without http:// http://www.namesito.com/id56773 type is added but the hyperlink does not work. I tried with both IE and firefox but the problem is always present. What is the problem?
thanks
Hello,
I seem to be having the same problem as Stefano above when I try to create a static cloaked link. Without http, it will generate a “cloaked link”….though it is not functional. When I enter the entire url, including http://, and click “add”….it will not generate a cloaked link.
All of my other static links created previously remain in place. Some were created as recently as last week. Any advice you could give to resolve this issue would be greatly appreciated. Cheers!
Gah, looks like I need to set up a separate testing site just for PHP4. Or maybe drop PHP4 support.Disregard that, I commented on the wrong post.
All right, perhaps the 1.7 update I just released will help with the “http://” problem. At the very least, it should provide a better indication of what goes wrong when trying to add an URL that contains the protocol prefix.
I’ve been using the plug-in for many months and it has always worked perfectly. I tried to cloak a link today and it no longer works. When I click the tab to ADD, it says Adding link… and just freezes right there and never adds the cloaked link.
I have updated to the new version 1.7 and it still does not work.
Any help or suggestions would be appreciated.
I updated the plugin to version 1.7 but still does not work. If I enter the url without http:// it works, but if you insert the link are not added
And no error messages? That’s strange. Version 1.7 should display an error if something goes wrong server-side.
Check the JS console, maybe it’s a bug in there’s a bug in my JavaScript.